--- qsampler/trunk/src/qsamplerMainForm.h 2007/11/23 09:32:06 1513 +++ qsampler/trunk/src/qsamplerMainForm.h 2009/02/19 11:44:57 1840 @@ -1,8 +1,8 @@ // qsamplerMainForm.h // /**************************************************************************** - Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. - Copyright (C) 2007, Christian Schoenebeck + Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -27,23 +27,24 @@ #include -class qsamplerOptions; -class qsamplerMessages; -class qsamplerChannel; - class QProcess; class QWorkspace; class QSpinBox; class QSlider; class QLabel; - namespace QSampler { +class Options; +class Messages; +class Channel; class ChannelStrip; class DeviceForm; class InstrumentListForm; +//------------------------------------------------------------------------- +// QSampler::MainForm -- Main window form implementation. +// class MainForm : public QMainWindow { @@ -54,9 +55,9 @@ MainForm(QWidget *pParent = NULL); ~MainForm(); - void setup(qsamplerOptions* pOptions); + void setup(Options* pOptions); - qsamplerOptions* options() const; + Options* options() const; lscp_client_t* client() const; QString sessionName(const QString& sFilename); @@ -67,7 +68,8 @@ void appendMessagesError(const QString& s); void appendMessagesClient(const QString& s); - ChannelStrip* createChannelStrip(qsamplerChannel *pChannel); + ChannelStrip* createChannelStrip(Channel *pChannel); + void destroyChannelStrip(ChannelStrip* pChannelStrip); ChannelStrip* activeChannelStrip(); ChannelStrip* channelStripAt(int iChannel); ChannelStrip* channelStrip(int iChannelID); @@ -117,6 +119,9 @@ void updateRecentFilesMenu(); + // Channel strip activation/selection. + void activateStrip(QWidget *pWidget); + protected: bool queryClose(); @@ -139,10 +144,12 @@ void updateMessagesFont(); void updateMessagesLimit(); void updateMessagesCapture(); + void updateViewMidiDeviceStatusMenu(); + void updateAllChannelStrips(bool bRemoveDeadStrips); void startSchedule(int iStartDelay); void stopSchedule(); void startServer(); - void stopServer(); + void stopServer(bool bInteractive = false); bool startClient(); void stopClient(); @@ -150,14 +157,15 @@ Ui::qsamplerMainForm m_ui; - qsamplerOptions *m_pOptions; - qsamplerMessages *m_pMessages; + Options *m_pOptions; + Messages *m_pMessages; QWorkspace *m_pWorkspace; QString m_sFilename; int m_iUntitled; int m_iDirtyCount; lscp_client_t *m_pClient; QProcess *m_pServer; + bool bForceServerStop; int m_iStartDelay; int m_iTimerDelay; int m_iTimerSlot;