/[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 3128 by capela, Thu Apr 27 11:09:16 2017 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-2017, 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 QMdiSubWindow;
32    class QSocketNotifier;
33    class QSpinBox;
34    class QSlider;
35    class QLabel;
36    
37  namespace QSampler {  namespace QSampler {
38    
39    class Workspace;
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 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 96  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 103  public slots: Line 123  public slots:
123          void timerSlot();          void timerSlot();
124          void readServerStdout();          void readServerStdout();
125          void processServerExit();          void processServerExit();
         void sessionDirty();  
         void stabilizeForm();  
126    
127  protected slots:          void handle_sigusr1();
128    
129          void updateRecentFilesMenu();          // Channel strip activation/selection.
130            void activateStrip(QMdiSubWindow *pMdiSubWindow);
131    
132            // Channel toolbar orientation change.
133            void channelsToolbarOrientation(Qt::Orientation orientation);
134    
135  protected:  protected:
136    
137            void addChannelStrip();
138            void removeChannelStrip();
139    
140          bool queryClose();          bool queryClose();
141          void closeEvent(QCloseEvent* pCloseEvent);          void closeEvent(QCloseEvent* pCloseEvent);
142          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);          void dragEnterEvent(QDragEnterEvent *pDragEnterEvent);
143          void dropEvent(QDropEvent *pDropEvent);          void dropEvent(QDropEvent *pDropEvent);
144          void customEvent(QEvent* pCustomEvent);          void customEvent(QEvent *pCustomEvent);
145          bool newSession();          bool newSession();
146          bool openSession();          bool openSession();
147          bool saveSession(bool bPrompt);          bool saveSession(bool bPrompt);
# Line 132  protected: Line 157  protected:
157          void updateMessagesFont();          void updateMessagesFont();
158          void updateMessagesLimit();          void updateMessagesLimit();
159          void updateMessagesCapture();          void updateMessagesCapture();
160            void updateViewMidiDeviceStatusMenu();
161            void updateAllChannelStrips(bool bRemoveDeadStrips);
162    
163          void startSchedule(int iStartDelay);          void startSchedule(int iStartDelay);
164          void stopSchedule();          void stopSchedule();
165          void startServer();          void startServer();
166          void stopServer();          void stopServer(bool bInteractive = false);
167          bool startClient();          bool startClient();
168          void stopClient();          void stopClient();
169    
# Line 143  private: Line 171  private:
171    
172          Ui::qsamplerMainForm m_ui;          Ui::qsamplerMainForm m_ui;
173    
174          qsamplerOptions *m_pOptions;          Options *m_pOptions;
175          qsamplerMessages *m_pMessages;          Messages *m_pMessages;
176          QWorkspace *m_pWorkspace;          Workspace *m_pWorkspace;
177            QSocketNotifier *m_pUsr1Notifier;
178          QString m_sFilename;          QString m_sFilename;
179          int m_iUntitled;          int m_iUntitled;
180            int m_iDirtySetup;
181          int m_iDirtyCount;          int m_iDirtyCount;
182          lscp_client_t *m_pClient;          lscp_client_t *m_pClient;
183          QProcess *m_pServer;          QProcess *m_pServer;
184            bool m_bForceServerStop;
185          int m_iStartDelay;          int m_iStartDelay;
186          int m_iTimerDelay;          int m_iTimerDelay;
187          int m_iTimerSlot;          int m_iTimerSlot;

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

  ViewVC Help
Powered by ViewVC