/[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 1702 by schoenebeck, Sun Feb 17 13:53:00 2008 UTC revision 3668 by schoenebeck, Sun Dec 22 13:47:40 2019 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-2019, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, 2008 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 28  Line 28 
28  #include <lscp/client.h>  #include <lscp/client.h>
29    
30  class QProcess;  class QProcess;
31  class QWorkspace;  class QMdiSubWindow;
32    class QSocketNotifier;
33  class QSpinBox;  class QSpinBox;
34  class QSlider;  class QSlider;
35  class QLabel;  class QLabel;
36    
37  namespace QSampler {  namespace QSampler {
38    
39    class Workspace;
40  class Options;  class Options;
41  class Messages;  class Messages;
42  class Channel;  class Channel;
# Line 52  class MainForm : public QMainWindow Line 54  class MainForm : public QMainWindow
54    
55  public:  public:
56    
57          MainForm(QWidget *pParent = NULL);          MainForm(QWidget *pParent = nullptr);
58          ~MainForm();          ~MainForm();
59    
60          void setup(Options* pOptions);          void setup(Options *pOptions);
61    
62          Options* 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(Channel *pChannel);          ChannelStrip *createChannelStrip(Channel *pChannel);
74          void destroyChannelStrip(ChannelStrip* pChannelStrip);          void destroyChannelStrip(ChannelStrip *pChannelStrip);
75          ChannelStrip* activeChannelStrip();          ChannelStrip *activeChannelStrip();
76          ChannelStrip* channelStripAt(int iChannel);          ChannelStrip *channelStripAt(int iChannel);
77          ChannelStrip* channelStrip(int iChannelID);          ChannelStrip *channelStrip(int iChannelID);
78    
79            void channelsArrangeAuto();
80          void contextMenuEvent(QContextMenuEvent *pEvent);          void contextMenuEvent(QContextMenuEvent *pEvent);
81            void sessionDirty();
82    
83          static MainForm* getInstance();          static MainForm *getInstance();
84    
85  public slots:  public slots:
86    
# Line 105  public slots: Line 109  public slots:
109          void channelsAutoArrange(bool bOn);          void channelsAutoArrange(bool bOn);
110          void helpAboutQt();          void helpAboutQt();
111          void helpAbout();          void helpAbout();
112    
113            void stabilizeForm();
114    
115    protected slots:
116    
117            void updateRecentFilesMenu();
118    
119          void volumeChanged(int iVolume);          void volumeChanged(int iVolume);
120          void channelStripChanged(ChannelStrip *pChannelStrip);          void channelStripChanged(ChannelStrip *pChannelStrip);
121          void channelsMenuAboutToShow();          void channelsMenuAboutToShow();
# Line 112  public slots: Line 123  public slots:
123          void timerSlot();          void timerSlot();
124          void readServerStdout();          void readServerStdout();
125          void processServerExit();          void processServerExit();
126          void sessionDirty();          void doAutoReconnectClient();
         void stabilizeForm();  
   
 protected slots:  
127    
128          void updateRecentFilesMenu();          void handle_sigusr1();
129            void handle_sigterm();
130    
131          // Channel strip activation/selection.          // Channel strip activation/selection.
132          void activateStrip(QWidget *pWidget);          void activateStrip(QMdiSubWindow *pMdiSubWindow);
133    
134            // Channel toolbar orientation change.
135            void channelsToolbarOrientation(Qt::Orientation orientation);
136    
137  protected:  protected:
138    
139            void addChannelStrip();
140            void removeChannelStrip();
141    
142          bool queryClose();          bool queryClose();
143          void closeEvent(QCloseEvent* pCloseEvent);          void closeEvent(QCloseEvent* pCloseEvent);
144          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);
145          void dropEvent(QDropEvent *pDropEvent);          void dropEvent(QDropEvent *pDropEvent);
146          void customEvent(QEvent* pCustomEvent);          void customEvent(QEvent *pCustomEvent);
147          bool newSession();          bool newSession();
148          bool openSession();          bool openSession();
149          bool saveSession(bool bPrompt);          bool saveSession(bool bPrompt);
# Line 146  protected: Line 161  protected:
161          void updateMessagesCapture();          void updateMessagesCapture();
162          void updateViewMidiDeviceStatusMenu();          void updateViewMidiDeviceStatusMenu();
163          void updateAllChannelStrips(bool bRemoveDeadStrips);          void updateAllChannelStrips(bool bRemoveDeadStrips);
164    
165          void startSchedule(int iStartDelay);          void startSchedule(int iStartDelay);
166          void stopSchedule();          void stopSchedule();
167          void startServer();          void startServer();
168          void stopServer(bool bInteractive = false);          void stopServer(bool bInteractive = false);
169          bool startClient();          bool startClient(bool bReconnectOnly = false);
170          void stopClient();          void stopClient();
171            void startAutoReconnectClient();
172    
173  private:  private:
174    
# Line 159  private: Line 176  private:
176    
177          Options *m_pOptions;          Options *m_pOptions;
178          Messages *m_pMessages;          Messages *m_pMessages;
179          QWorkspace *m_pWorkspace;          Workspace *m_pWorkspace;
180            QSocketNotifier *m_pSigusr1Notifier;
181            QSocketNotifier *m_pSigtermNotifier;
182          QString m_sFilename;          QString m_sFilename;
183          int m_iUntitled;          int m_iUntitled;
184            int m_iDirtySetup;
185          int m_iDirtyCount;          int m_iDirtyCount;
186          lscp_client_t *m_pClient;          lscp_client_t *m_pClient;
187          QProcess *m_pServer;          QProcess *m_pServer;
188          bool bForceServerStop;          bool m_bForceServerStop;
189          int m_iStartDelay;          int m_iStartDelay;
190          int m_iTimerDelay;          int m_iTimerDelay;
191          int m_iTimerSlot;          int m_iTimerSlot;

Legend:
Removed from v.1702  
changed lines
  Added in v.3668

  ViewVC Help
Powered by ViewVC