/[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 1509 by capela, Thu Nov 22 11:10:44 2007 UTC revision 2978 by capela, Mon Aug 15 19:10:16 2016 UTC
# Line 1  Line 1 
1  // qsamplerMainForm.h  // qsamplerMainForm.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2016, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, Christian Schoenebeck     Copyright (C) 2007,2008,2015 Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 25  Line 25 
25    
26  #include "ui_qsamplerMainForm.h"  #include "ui_qsamplerMainForm.h"
27    
28  #include "qsamplerMessages.h"  #include <lscp/client.h>
 #include "qsamplerChannelStrip.h"  
 #include "qsamplerInstrumentListForm.h"  
 #include "qsamplerDeviceForm.h"  
29    
 class QWorkspace;  
30  class QProcess;  class QProcess;
31    class QMdiArea;
32    class QMdiSubWindow;
33    class QSocketNotifier;
34    class QSpinBox;
35    class QSlider;
36    class QLabel;
37    
38  namespace QSampler {  namespace QSampler {
39    
40    class Options;
41    class Messages;
42    class Channel;
43    class ChannelStrip;
44  class DeviceForm;  class DeviceForm;
45    class InstrumentListForm;
46    
47    //-------------------------------------------------------------------------
48    // QSampler::MainForm -- Main window form implementation.
49    //
50    
51  class MainForm : public QMainWindow  class MainForm : public QMainWindow
52  {  {
# Line 47  public: Line 57  public:
57          MainForm(QWidget *pParent = NULL);          MainForm(QWidget *pParent = NULL);
58          ~MainForm();          ~MainForm();
59    
60          void setup(qsamplerOptions* pOptions);          void setup(Options* pOptions);
61    
62          qsamplerOptions* options() const;          Options* options() const;
63          lscp_client_t* client() const;          lscp_client_t* client() const;
64    
65          QString sessionName(const QString& sFilename);          QString sessionName(const QString& sFilename);
66    
67          void appendMessages(const QString& s);          void appendMessages(const QString& sText);
68          void appendMessagesColor(const QString& s, const QString& c);          void appendMessagesColor(const QString& sText, const QString& sColor);
69          void appendMessagesText(const QString& s);          void appendMessagesText(const QString& sText);
70          void appendMessagesError(const QString& s);          void appendMessagesError(const QString& sText);
71          void appendMessagesClient(const QString& s);          void appendMessagesClient(const QString& sText);
72    
73          ChannelStrip* createChannelStrip(qsamplerChannel *pChannel);          ChannelStrip *createChannelStrip(Channel *pChannel);
74          ChannelStrip* activeChannelStrip();          void destroyChannelStrip(ChannelStrip *pChannelStrip);
75          ChannelStrip* channelStripAt(int iChannel);          ChannelStrip *activeChannelStrip();
76          ChannelStrip* channelStrip(int iChannelID);          ChannelStrip *channelStripAt(int iChannel);
77            ChannelStrip *channelStrip(int iChannelID);
78    
79          void contextMenuEvent(QContextMenuEvent *pEvent);          void contextMenuEvent(QContextMenuEvent *pEvent);
80    
# Line 106  public slots: Line 117  public slots:
117          void sessionDirty();          void sessionDirty();
118          void stabilizeForm();          void stabilizeForm();
119    
120            void handle_sigusr1();
121    
122  protected slots:  protected slots:
123    
124          void updateRecentFilesMenu();          void updateRecentFilesMenu();
125    
126            // Channel strip activation/selection.
127            void activateStrip(QMdiSubWindow *pMdiSubWindow);
128    
129            // Channel toolbar orientation change.
130            void channelsToolbarOrientation(Qt::Orientation orientation);
131    
132  protected:  protected:
133    
134            void addChannelStrip();
135            void removeChannelStrip();
136    
137          bool queryClose();          bool queryClose();
138          void closeEvent(QCloseEvent* pCloseEvent);          void closeEvent(QCloseEvent* pCloseEvent);
139          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);
140          void dropEvent(QDropEvent *pDropEvent);          void dropEvent(QDropEvent *pDropEvent);
141          void customEvent(QEvent* pCustomEvent);          void customEvent(QEvent *pCustomEvent);
142            void resizeEvent(QResizeEvent *);
143          bool newSession();          bool newSession();
144          bool openSession();          bool openSession();
145          bool saveSession(bool bPrompt);          bool saveSession(bool bPrompt);
# Line 132  protected: Line 155  protected:
155          void updateMessagesFont();          void updateMessagesFont();
156          void updateMessagesLimit();          void updateMessagesLimit();
157          void updateMessagesCapture();          void updateMessagesCapture();
158            void updateViewMidiDeviceStatusMenu();
159            void updateAllChannelStrips(bool bRemoveDeadStrips);
160          void startSchedule(int iStartDelay);          void startSchedule(int iStartDelay);
161          void stopSchedule();          void stopSchedule();
162          void startServer();          void startServer();
163          void stopServer();          void stopServer(bool bInteractive = false);
164          bool startClient();          bool startClient();
165          void stopClient();          void stopClient();
166    
# Line 143  private: Line 168  private:
168    
169          Ui::qsamplerMainForm m_ui;          Ui::qsamplerMainForm m_ui;
170    
171          qsamplerOptions *m_pOptions;          Options *m_pOptions;
172          qsamplerMessages *m_pMessages;          Messages *m_pMessages;
173          QWorkspace *m_pWorkspace;          QMdiArea *m_pWorkspace;
174            QSocketNotifier *m_pUsr1Notifier;
175          QString m_sFilename;          QString m_sFilename;
176          int m_iUntitled;          int m_iUntitled;
177            int m_iDirtySetup;
178          int m_iDirtyCount;          int m_iDirtyCount;
179          lscp_client_t *m_pClient;          lscp_client_t *m_pClient;
180          QProcess *m_pServer;          QProcess *m_pServer;
181            bool bForceServerStop;
182          int m_iStartDelay;          int m_iStartDelay;
183          int m_iTimerDelay;          int m_iTimerDelay;
184          int m_iTimerSlot;          int m_iTimerSlot;

Legend:
Removed from v.1509  
changed lines
  Added in v.2978

  ViewVC Help
Powered by ViewVC