/[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 1513 by capela, Fri Nov 23 09:32:06 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  protected:  protected:
121      bool queryClose();  
122      void closeEvent(QCloseEvent* pCloseEvent);          bool queryClose();
123      void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);          void closeEvent(QCloseEvent* pCloseEvent);
124      void dropEvent(QDropEvent *pDropEvent);          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);
125      void customEvent(QEvent* pCustomEvent);          void dropEvent(QDropEvent *pDropEvent);
126      bool newSession();          void customEvent(QEvent* pCustomEvent);
127      bool openSession();          bool newSession();
128      bool saveSession(bool bPrompt);          bool openSession();
129      bool closeSession(bool bForce);          bool saveSession(bool bPrompt);
130      bool loadSessionFile(const QString& sFilename);          bool closeSession(bool bForce);
131      bool saveSessionFile(const QString& sFilename);          bool loadSessionFile(const QString& sFilename);
132      void updateSession();          bool saveSessionFile(const QString& sFilename);
133      void updateRecentFiles(const QString& sFilename);          void updateSession();
134      void updateInstrumentNames();          void updateRecentFiles(const QString& sFilename);
135      void updateDisplayFont();          void updateInstrumentNames();
136      void updateDisplayEffect();          void updateDisplayFont();
137      void updateMaxVolume();          void updateDisplayEffect();
138      void updateMessagesFont();          void updateMaxVolume();
139      void updateMessagesLimit();          void updateMessagesFont();
140      void updateMessagesCapture();          void updateMessagesLimit();
141      void startSchedule(int iStartDelay);          void updateMessagesCapture();
142      void stopSchedule();          void startSchedule(int iStartDelay);
143      void startServer();          void stopSchedule();
144      void stopServer();          void startServer();
145      bool startClient();          void stopServer();
146      void stopClient();          bool startClient();
147            void stopClient();
148    
149  private:  private:
     Ui::qsamplerMainForm ui;  
150    
151      qsamplerOptions *m_pOptions;          Ui::qsamplerMainForm m_ui;
152      qsamplerMessages *m_pMessages;  
153      QWorkspace *m_pWorkspace;          qsamplerOptions *m_pOptions;
154      QString m_sFilename;          qsamplerMessages *m_pMessages;
155      int m_iUntitled;          QWorkspace *m_pWorkspace;
156      int m_iDirtyCount;          QString m_sFilename;
157      lscp_client_t *m_pClient;          int m_iUntitled;
158      QProcess *m_pServer;          int m_iDirtyCount;
159      int m_iStartDelay;          lscp_client_t *m_pClient;
160      int m_iTimerDelay;          QProcess *m_pServer;
161      int m_iTimerSlot;          int m_iStartDelay;
162      QLabel *m_statusItem[5];          int m_iTimerDelay;
163      QList<ChannelStrip *> m_changedStrips;          int m_iTimerSlot;
164      InstrumentListForm *m_pInstrumentListForm;          QLabel *m_statusItem[5];
165      DeviceForm *m_pDeviceForm;          QList<ChannelStrip *> m_changedStrips;
166      static MainForm *g_pMainForm;          InstrumentListForm *m_pInstrumentListForm;
167      QSlider *m_pVolumeSlider;          DeviceForm *m_pDeviceForm;
168      QSpinBox *m_pVolumeSpinBox;          static MainForm *g_pMainForm;
169      int m_iVolumeChanging;          QSlider *m_pVolumeSlider;
170            QSpinBox *m_pVolumeSpinBox;
171  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();  
172  };  };
173    
174  } // namespace QSampler  } // namespace QSampler

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

  ViewVC Help
Powered by ViewVC