/[svn]/qsampler/trunk/src/qsamplerMainForm.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerMainForm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1499 by capela, Tue Nov 20 16:48:04 2007 UTC revision 1514 by capela, Fri Nov 23 10:51:37 2007 UTC
# Line 25  Line 25 
25    
26  #include "ui_qsamplerMainForm.h"  #include "ui_qsamplerMainForm.h"
27    
28  #include "qsamplerMessages.h"  #include <lscp/client.h>
29  #include "qsamplerChannelStrip.h"  
30  #include "qsamplerInstrumentListForm.h"  class qsamplerOptions;
31  #include "qsamplerDeviceForm.h"  class qsamplerMessages;
32    class qsamplerChannel;
33    
 class QWorkspace;  
34  class QProcess;  class QProcess;
35    class QWorkspace;
36    class QSpinBox;
37    class QSlider;
38    class QLabel;
39    
40    
41  namespace QSampler {  namespace QSampler {
42    
43    class ChannelStrip;
44  class DeviceForm;  class DeviceForm;
45    class InstrumentListForm;
46    
47    
48    class MainForm : public QMainWindow
49    {
50            Q_OBJECT
51    
 class MainForm : public QMainWindow {  
 Q_OBJECT  
52  public:  public:
53      MainForm(QWidget* parent = 0);  
54     ~MainForm();          MainForm(QWidget *pParent = NULL);
55      void setup(qsamplerOptions* pOptions);          ~MainForm();
56      void contextMenuEvent(QContextMenuEvent *pEvent);  
57      qsamplerOptions* options();          void setup(qsamplerOptions* pOptions);
58      lscp_client_t* client();  
59      QString sessionName(const QString& sFilename);          qsamplerOptions* options() const;
60      void appendMessages(const QString& s);          lscp_client_t* client() const;
61      void appendMessagesColor(const QString& s, const QString& c);  
62      void appendMessagesText(const QString& s);          QString sessionName(const QString& sFilename);
63      void appendMessagesError(const QString& s);  
64      void appendMessagesClient(const QString& s);          void appendMessages(const QString& s);
65      ChannelStrip* createChannelStrip(qsamplerChannel *pChannel);          void appendMessagesColor(const QString& s, const QString& c);
66      ChannelStrip* activeChannelStrip();          void appendMessagesText(const QString& s);
67      ChannelStrip* channelStripAt(int iChannel);          void appendMessagesError(const QString& s);
68      ChannelStrip* channelStrip(int iChannelID);          void appendMessagesClient(const QString& s);
69      static MainForm* getInstance();  
70            ChannelStrip* createChannelStrip(qsamplerChannel *pChannel);
71            ChannelStrip* activeChannelStrip();
72            ChannelStrip* channelStripAt(int iChannel);
73            ChannelStrip* channelStrip(int iChannelID);
74    
75            void contextMenuEvent(QContextMenuEvent *pEvent);
76    
77            static MainForm* getInstance();
78    
79  public slots:  public slots:
80      void sessionDirty();  
81      void stabilizeForm();          void fileNew();
82            void fileOpen();
83            void fileOpenRecent();
84            void fileSave();
85            void fileSaveAs();
86            void fileReset();
87            void fileRestart();
88            void fileExit();
89            void editAddChannel();
90            void editRemoveChannel();
91            void editSetupChannel();
92            void editEditChannel();
93            void editResetChannel();
94            void editResetAllChannels();
95            void viewMenubar(bool bOn);
96            void viewToolbar(bool bOn);
97            void viewStatusbar(bool bOn);
98            void viewMessages(bool bOn);
99            void viewInstruments();
100            void viewDevices();
101            void viewOptions();
102            void channelsArrange();
103            void channelsAutoArrange(bool bOn);
104            void helpAboutQt();
105            void helpAbout();
106            void volumeChanged(int iVolume);
107            void channelStripChanged(ChannelStrip *pChannelStrip);
108            void channelsMenuAboutToShow();
109            void channelsMenuActivated();
110            void timerSlot();
111            void readServerStdout();
112            void processServerExit();
113            void sessionDirty();
114            void stabilizeForm();
115    
116  protected slots:  protected slots:
117    
118      void updateRecentFilesMenu();          void updateRecentFilesMenu();
119    
120            // Channel strip activation/selection.
121            void activateStrip(QWidget *pWidget);
122    
123  protected:  protected:
124      bool queryClose();  
125      void closeEvent(QCloseEvent* pCloseEvent);          bool queryClose();
126      void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);          void closeEvent(QCloseEvent* pCloseEvent);
127      void dropEvent(QDropEvent *pDropEvent);          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);
128      void customEvent(QEvent* pCustomEvent);          void dropEvent(QDropEvent *pDropEvent);
129      bool newSession();          void customEvent(QEvent* pCustomEvent);
130      bool openSession();          bool newSession();
131      bool saveSession(bool bPrompt);          bool openSession();
132      bool closeSession(bool bForce);          bool saveSession(bool bPrompt);
133      bool loadSessionFile(const QString& sFilename);          bool closeSession(bool bForce);
134      bool saveSessionFile(const QString& sFilename);          bool loadSessionFile(const QString& sFilename);
135      void updateSession();          bool saveSessionFile(const QString& sFilename);
136      void updateRecentFiles(const QString& sFilename);          void updateSession();
137      void updateInstrumentNames();          void updateRecentFiles(const QString& sFilename);
138      void updateDisplayFont();          void updateInstrumentNames();
139      void updateDisplayEffect();          void updateDisplayFont();
140      void updateMaxVolume();          void updateDisplayEffect();
141      void updateMessagesFont();          void updateMaxVolume();
142      void updateMessagesLimit();          void updateMessagesFont();
143      void updateMessagesCapture();          void updateMessagesLimit();
144      void startSchedule(int iStartDelay);          void updateMessagesCapture();
145      void stopSchedule();          void startSchedule(int iStartDelay);
146      void startServer();          void stopSchedule();
147      void stopServer();          void startServer();
148      bool startClient();          void stopServer();
149      void stopClient();          bool startClient();
150            void stopClient();
151    
152  private:  private:
     Ui::qsamplerMainForm ui;  
153    
154      qsamplerOptions *m_pOptions;          Ui::qsamplerMainForm m_ui;
155      qsamplerMessages *m_pMessages;  
156      QWorkspace *m_pWorkspace;          qsamplerOptions *m_pOptions;
157      QString m_sFilename;          qsamplerMessages *m_pMessages;
158      int m_iUntitled;          QWorkspace *m_pWorkspace;
159      int m_iDirtyCount;          QString m_sFilename;
160      lscp_client_t *m_pClient;          int m_iUntitled;
161      QProcess *m_pServer;          int m_iDirtyCount;
162      int m_iStartDelay;          lscp_client_t *m_pClient;
163      int m_iTimerDelay;          QProcess *m_pServer;
164      int m_iTimerSlot;          int m_iStartDelay;
165      QLabel *m_statusItem[5];          int m_iTimerDelay;
166      QList<ChannelStrip *> m_changedStrips;          int m_iTimerSlot;
167      InstrumentListForm *m_pInstrumentListForm;          QLabel *m_statusItem[5];
168      DeviceForm *m_pDeviceForm;          QList<ChannelStrip *> m_changedStrips;
169      static MainForm *g_pMainForm;          InstrumentListForm *m_pInstrumentListForm;
170      QSlider *m_pVolumeSlider;          DeviceForm *m_pDeviceForm;
171      QSpinBox *m_pVolumeSpinBox;          static MainForm *g_pMainForm;
172      int m_iVolumeChanging;          QSlider *m_pVolumeSlider;
173            QSpinBox *m_pVolumeSpinBox;
174  private slots:          int m_iVolumeChanging;
     void fileNew();  
     void fileOpen();  
     void fileOpenRecent();  
     void fileSave();  
     void fileSaveAs();  
     void fileReset();  
     void fileRestart();  
     void fileExit();  
     void editAddChannel();  
     void editRemoveChannel();  
     void editSetupChannel();  
     void editEditChannel();  
     void editResetChannel();  
     void editResetAllChannels();  
     void viewMenubar(bool bOn);  
     void viewToolbar(bool bOn);  
     void viewStatusbar(bool bOn);  
     void viewMessages(bool bOn);  
     void viewInstruments();  
     void viewDevices();  
     void viewOptions();  
     void channelsArrange();  
     void channelsAutoArrange(bool bOn);  
     void helpAboutQt();  
     void helpAbout();  
     void volumeChanged(int iVolume);  
     void channelStripChanged(ChannelStrip *pChannelStrip);  
     void channelsMenuAboutToShow();  
     void channelsMenuActivated();  
     void timerSlot();  
     void readServerStdout();  
     void processServerExit();  
175  };  };
176    
177  } // namespace QSampler  } // namespace QSampler

Legend:
Removed from v.1499  
changed lines
  Added in v.1514

  ViewVC Help
Powered by ViewVC