23 |
#ifndef __qsamplerMainForm_h |
#ifndef __qsamplerMainForm_h |
24 |
#define __qsamplerMainForm_h |
#define __qsamplerMainForm_h |
25 |
|
|
26 |
#include <Qt3Support> |
#include "ui_qsamplerMainForm.h" |
27 |
|
|
28 |
#include <QWorkspace> |
#include <lscp/client.h> |
|
#include <QList> |
|
|
#include <Q3PtrList> |
|
|
#include <QProcess> |
|
|
#include <QMenu> |
|
29 |
|
|
30 |
#include "ui_qsamplerMainForm.h" |
class qsamplerOptions; |
31 |
|
class qsamplerMessages; |
32 |
|
class qsamplerChannel; |
33 |
|
|
34 |
|
class QProcess; |
35 |
|
class QWorkspace; |
36 |
|
class QSpinBox; |
37 |
|
class QSlider; |
38 |
|
class QLabel; |
39 |
|
|
|
#include "qsamplerChannelStrip.h" |
|
|
#include "qsamplerMessages.h" |
|
|
#include "qsamplerInstrumentListForm.h" |
|
|
#include "qsamplerDeviceForm.h" |
|
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); |
void setup(qsamplerOptions* pOptions); |
58 |
lscp_client_t* client(void); |
|
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); |
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(void); |
|
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(void); |
|
81 |
void stabilizeForm(void); |
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: |
117 |
|
|
118 |
|
void updateRecentFilesMenu(); |
119 |
|
|
120 |
|
// Channel strip activation/selection. |
121 |
|
void activateStrip(QWidget *pWidget); |
122 |
|
|
123 |
protected: |
protected: |
124 |
bool queryClose(void); |
|
125 |
void closeEvent(QCloseEvent* pCloseEvent); |
bool queryClose(); |
126 |
bool decodeDragFiles(const QMimeSource* pEvent, QStringList& files); |
void closeEvent(QCloseEvent* pCloseEvent); |
127 |
void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); |
void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); |
128 |
void dropEvent(QDropEvent *pDropEvent); |
void dropEvent(QDropEvent *pDropEvent); |
129 |
void customEvent(QEvent* pCustomEvent); |
void customEvent(QEvent* pCustomEvent); |
130 |
bool newSession(void); |
bool newSession(); |
131 |
bool openSession(void); |
bool openSession(); |
132 |
bool saveSession(bool bPrompt); |
bool saveSession(bool bPrompt); |
133 |
bool closeSession(bool bForce); |
bool closeSession(bool bForce); |
134 |
bool loadSessionFile(const QString& sFilename); |
bool loadSessionFile(const QString& sFilename); |
135 |
bool saveSessionFile(const QString& sFilename); |
bool saveSessionFile(const QString& sFilename); |
136 |
void updateSession(); |
void updateSession(); |
137 |
void updateRecentFiles(const QString& sFilename); |
void updateRecentFiles(const QString& sFilename); |
138 |
void updateRecentFilesMenu(void); |
void updateInstrumentNames(); |
139 |
void updateInstrumentNames(void); |
void updateDisplayFont(); |
140 |
void updateDisplayFont(void); |
void updateDisplayEffect(); |
141 |
void updateDisplayEffect(void); |
void updateMaxVolume(); |
142 |
void updateMaxVolume(void); |
void updateMessagesFont(); |
143 |
void updateMessagesFont(void); |
void updateMessagesLimit(); |
144 |
void updateMessagesLimit(void); |
void updateMessagesCapture(); |
145 |
void updateMessagesCapture(void); |
void startSchedule(int iStartDelay); |
146 |
void startSchedule(int iStartDelay); |
void stopSchedule(); |
147 |
void stopSchedule(void); |
void startServer(); |
148 |
void startServer(void); |
void stopServer(); |
149 |
void stopServer(void); |
bool startClient(); |
150 |
bool startClient(void); |
void stopClient(); |
|
void stopClient(void); |
|
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 |
QMenu *m_pRecentFilesMenu; |
int m_iTimerSlot; |
167 |
Q3PtrList<ChannelStrip> m_changedStrips; |
QLabel *m_statusItem[5]; |
168 |
InstrumentListForm *m_pInstrumentListForm; |
QList<ChannelStrip *> m_changedStrips; |
169 |
DeviceForm *m_pDeviceForm; |
InstrumentListForm *m_pInstrumentListForm; |
170 |
static MainForm *g_pMainForm; |
DeviceForm *m_pDeviceForm; |
171 |
QSlider *m_pVolumeSlider; |
static MainForm *g_pMainForm; |
172 |
QSpinBox *m_pVolumeSpinBox; |
QSlider *m_pVolumeSlider; |
173 |
int m_iVolumeChanging; |
QSpinBox *m_pVolumeSpinBox; |
174 |
QToolBar* fileToolbar; |
int m_iVolumeChanging; |
|
QToolBar* editToolbar; |
|
|
QToolBar* channelsToolbar; |
|
|
|
|
|
private slots: |
|
|
void fileNew(void); |
|
|
void fileOpen(void); |
|
|
void fileOpenRecent(int iIndex); |
|
|
void fileSave(void); |
|
|
void fileSaveAs(void); |
|
|
void fileReset(void); |
|
|
void fileRestart(void); |
|
|
void fileExit(void); |
|
|
void editAddChannel(void); |
|
|
void editRemoveChannel(void); |
|
|
void editSetupChannel(void); |
|
|
void editEditChannel(void); |
|
|
void editResetChannel(void); |
|
|
void editResetAllChannels(void); |
|
|
void viewMenubar(bool bOn); |
|
|
void viewToolbar(bool bOn); |
|
|
void viewStatusbar(bool bOn); |
|
|
void viewMessages(bool bOn); |
|
|
void viewInstruments(void); |
|
|
void viewDevices(void); |
|
|
void viewOptions(void); |
|
|
void channelsArrange(void); |
|
|
void channelsAutoArrange(bool bOn); |
|
|
void helpAboutQt(void); |
|
|
void helpAbout(void); |
|
|
void volumeChanged(int iVolume); |
|
|
void channelStripChanged(ChannelStrip *pChannelStrip); |
|
|
void channelsMenuAboutToShow(); |
|
|
void channelsMenuActivated(int iChannel); |
|
|
void timerSlot(void); |
|
|
void readServerStdout(void); |
|
|
void processServerExit(void); |
|
175 |
}; |
}; |
176 |
|
|
177 |
} // namespace QSampler |
} // namespace QSampler |
179 |
#endif // __qsamplerMainForm_h |
#endif // __qsamplerMainForm_h |
180 |
|
|
181 |
|
|
|
// end of qsamplerMainForm.h |
|
182 |
|
// end of qsamplerMainForm.h |