23 |
#ifndef __qsamplerMainForm_h |
#ifndef __qsamplerMainForm_h |
24 |
#define __qsamplerMainForm_h |
#define __qsamplerMainForm_h |
25 |
|
|
|
#include <Qt3Support> |
|
|
|
|
|
#include <QWorkspace> |
|
|
#include <QList> |
|
|
#include <Q3PtrList> |
|
|
#include <QProcess> |
|
|
#include <QMenu> |
|
|
|
|
26 |
#include "ui_qsamplerMainForm.h" |
#include "ui_qsamplerMainForm.h" |
27 |
|
|
|
#include "qsamplerChannelStrip.h" |
|
28 |
#include "qsamplerMessages.h" |
#include "qsamplerMessages.h" |
29 |
|
#include "qsamplerChannelStrip.h" |
30 |
#include "qsamplerInstrumentListForm.h" |
#include "qsamplerInstrumentListForm.h" |
31 |
#include "qsamplerDeviceForm.h" |
#include "qsamplerDeviceForm.h" |
32 |
|
|
33 |
|
class QWorkspace; |
34 |
|
class QProcess; |
35 |
|
|
36 |
|
|
37 |
namespace QSampler { |
namespace QSampler { |
38 |
|
|
39 |
class DeviceForm; |
class DeviceForm; |
40 |
|
|
41 |
class MainForm : public QMainWindow { |
class MainForm : public QMainWindow |
42 |
Q_OBJECT |
{ |
43 |
|
Q_OBJECT |
44 |
|
|
45 |
public: |
public: |
46 |
MainForm(QWidget* parent = 0); |
|
47 |
~MainForm(); |
MainForm(QWidget *pParent = NULL); |
48 |
void setup(qsamplerOptions* pOptions); |
~MainForm(); |
49 |
void contextMenuEvent(QContextMenuEvent *pEvent); |
|
50 |
qsamplerOptions* options(void); |
void setup(qsamplerOptions* pOptions); |
51 |
lscp_client_t* client(void); |
|
52 |
QString sessionName(const QString& sFilename); |
qsamplerOptions* options() const; |
53 |
void appendMessages(const QString& s); |
lscp_client_t* client() const; |
54 |
void appendMessagesColor(const QString& s, const QString& c); |
|
55 |
void appendMessagesText(const QString& s); |
QString sessionName(const QString& sFilename); |
56 |
void appendMessagesError(const QString& s); |
|
57 |
void appendMessagesClient(const QString& s); |
void appendMessages(const QString& s); |
58 |
ChannelStrip* createChannelStrip(qsamplerChannel *pChannel); |
void appendMessagesColor(const QString& s, const QString& c); |
59 |
ChannelStrip* activeChannelStrip(void); |
void appendMessagesText(const QString& s); |
60 |
ChannelStrip* channelStripAt(int iChannel); |
void appendMessagesError(const QString& s); |
61 |
ChannelStrip* channelStrip(int iChannelID); |
void appendMessagesClient(const QString& s); |
62 |
static MainForm* getInstance(void); |
|
63 |
|
ChannelStrip* createChannelStrip(qsamplerChannel *pChannel); |
64 |
|
ChannelStrip* activeChannelStrip(); |
65 |
|
ChannelStrip* channelStripAt(int iChannel); |
66 |
|
ChannelStrip* channelStrip(int iChannelID); |
67 |
|
|
68 |
|
void contextMenuEvent(QContextMenuEvent *pEvent); |
69 |
|
|
70 |
|
static MainForm* getInstance(); |
71 |
|
|
72 |
public slots: |
public slots: |
73 |
void sessionDirty(void); |
|
74 |
void stabilizeForm(void); |
void fileNew(); |
75 |
|
void fileOpen(); |
76 |
|
void fileOpenRecent(); |
77 |
|
void fileSave(); |
78 |
|
void fileSaveAs(); |
79 |
|
void fileReset(); |
80 |
|
void fileRestart(); |
81 |
|
void fileExit(); |
82 |
|
void editAddChannel(); |
83 |
|
void editRemoveChannel(); |
84 |
|
void editSetupChannel(); |
85 |
|
void editEditChannel(); |
86 |
|
void editResetChannel(); |
87 |
|
void editResetAllChannels(); |
88 |
|
void viewMenubar(bool bOn); |
89 |
|
void viewToolbar(bool bOn); |
90 |
|
void viewStatusbar(bool bOn); |
91 |
|
void viewMessages(bool bOn); |
92 |
|
void viewInstruments(); |
93 |
|
void viewDevices(); |
94 |
|
void viewOptions(); |
95 |
|
void channelsArrange(); |
96 |
|
void channelsAutoArrange(bool bOn); |
97 |
|
void helpAboutQt(); |
98 |
|
void helpAbout(); |
99 |
|
void volumeChanged(int iVolume); |
100 |
|
void channelStripChanged(ChannelStrip *pChannelStrip); |
101 |
|
void channelsMenuAboutToShow(); |
102 |
|
void channelsMenuActivated(); |
103 |
|
void timerSlot(); |
104 |
|
void readServerStdout(); |
105 |
|
void processServerExit(); |
106 |
|
void sessionDirty(); |
107 |
|
void stabilizeForm(); |
108 |
|
|
109 |
|
protected slots: |
110 |
|
|
111 |
|
void updateRecentFilesMenu(); |
112 |
|
|
113 |
protected: |
protected: |
114 |
bool queryClose(void); |
|
115 |
void closeEvent(QCloseEvent* pCloseEvent); |
bool queryClose(); |
116 |
bool decodeDragFiles(const QMimeSource* pEvent, QStringList& files); |
void closeEvent(QCloseEvent* pCloseEvent); |
117 |
void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); |
void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); |
118 |
void dropEvent(QDropEvent *pDropEvent); |
void dropEvent(QDropEvent *pDropEvent); |
119 |
void customEvent(QEvent* pCustomEvent); |
void customEvent(QEvent* pCustomEvent); |
120 |
bool newSession(void); |
bool newSession(); |
121 |
bool openSession(void); |
bool openSession(); |
122 |
bool saveSession(bool bPrompt); |
bool saveSession(bool bPrompt); |
123 |
bool closeSession(bool bForce); |
bool closeSession(bool bForce); |
124 |
bool loadSessionFile(const QString& sFilename); |
bool loadSessionFile(const QString& sFilename); |
125 |
bool saveSessionFile(const QString& sFilename); |
bool saveSessionFile(const QString& sFilename); |
126 |
void updateSession(); |
void updateSession(); |
127 |
void updateRecentFiles(const QString& sFilename); |
void updateRecentFiles(const QString& sFilename); |
128 |
void updateRecentFilesMenu(void); |
void updateInstrumentNames(); |
129 |
void updateInstrumentNames(void); |
void updateDisplayFont(); |
130 |
void updateDisplayFont(void); |
void updateDisplayEffect(); |
131 |
void updateDisplayEffect(void); |
void updateMaxVolume(); |
132 |
void updateMaxVolume(void); |
void updateMessagesFont(); |
133 |
void updateMessagesFont(void); |
void updateMessagesLimit(); |
134 |
void updateMessagesLimit(void); |
void updateMessagesCapture(); |
135 |
void updateMessagesCapture(void); |
void startSchedule(int iStartDelay); |
136 |
void startSchedule(int iStartDelay); |
void stopSchedule(); |
137 |
void stopSchedule(void); |
void startServer(); |
138 |
void startServer(void); |
void stopServer(); |
139 |
void stopServer(void); |
bool startClient(); |
140 |
bool startClient(void); |
void stopClient(); |
|
void stopClient(void); |
|
141 |
|
|
142 |
private: |
private: |
|
Ui::qsamplerMainForm ui; |
|
143 |
|
|
144 |
qsamplerOptions *m_pOptions; |
Ui::qsamplerMainForm m_ui; |
145 |
qsamplerMessages *m_pMessages; |
|
146 |
QWorkspace *m_pWorkspace; |
qsamplerOptions *m_pOptions; |
147 |
QString m_sFilename; |
qsamplerMessages *m_pMessages; |
148 |
int m_iUntitled; |
QWorkspace *m_pWorkspace; |
149 |
int m_iDirtyCount; |
QString m_sFilename; |
150 |
lscp_client_t *m_pClient; |
int m_iUntitled; |
151 |
QProcess *m_pServer; |
int m_iDirtyCount; |
152 |
int m_iStartDelay; |
lscp_client_t *m_pClient; |
153 |
int m_iTimerDelay; |
QProcess *m_pServer; |
154 |
int m_iTimerSlot; |
int m_iStartDelay; |
155 |
QLabel *m_statusItem[5]; |
int m_iTimerDelay; |
156 |
QMenu *m_pRecentFilesMenu; |
int m_iTimerSlot; |
157 |
Q3PtrList<ChannelStrip> m_changedStrips; |
QLabel *m_statusItem[5]; |
158 |
InstrumentListForm *m_pInstrumentListForm; |
QList<ChannelStrip *> m_changedStrips; |
159 |
DeviceForm *m_pDeviceForm; |
InstrumentListForm *m_pInstrumentListForm; |
160 |
static MainForm *g_pMainForm; |
DeviceForm *m_pDeviceForm; |
161 |
QSlider *m_pVolumeSlider; |
static MainForm *g_pMainForm; |
162 |
QSpinBox *m_pVolumeSpinBox; |
QSlider *m_pVolumeSlider; |
163 |
int m_iVolumeChanging; |
QSpinBox *m_pVolumeSpinBox; |
164 |
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); |
|
165 |
}; |
}; |
166 |
|
|
167 |
} // namespace QSampler |
} // namespace QSampler |