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; |
45 |
~MainForm(); |
~MainForm(); |
46 |
void setup(qsamplerOptions* pOptions); |
void setup(qsamplerOptions* pOptions); |
47 |
void contextMenuEvent(QContextMenuEvent *pEvent); |
void contextMenuEvent(QContextMenuEvent *pEvent); |
48 |
qsamplerOptions* options(void); |
qsamplerOptions* options(); |
49 |
lscp_client_t* client(void); |
lscp_client_t* client(); |
50 |
QString sessionName(const QString& sFilename); |
QString sessionName(const QString& sFilename); |
51 |
void appendMessages(const QString& s); |
void appendMessages(const QString& s); |
52 |
void appendMessagesColor(const QString& s, const QString& c); |
void appendMessagesColor(const QString& s, const QString& c); |
54 |
void appendMessagesError(const QString& s); |
void appendMessagesError(const QString& s); |
55 |
void appendMessagesClient(const QString& s); |
void appendMessagesClient(const QString& s); |
56 |
ChannelStrip* createChannelStrip(qsamplerChannel *pChannel); |
ChannelStrip* createChannelStrip(qsamplerChannel *pChannel); |
57 |
ChannelStrip* activeChannelStrip(void); |
ChannelStrip* activeChannelStrip(); |
58 |
ChannelStrip* channelStripAt(int iChannel); |
ChannelStrip* channelStripAt(int iChannel); |
59 |
ChannelStrip* channelStrip(int iChannelID); |
ChannelStrip* channelStrip(int iChannelID); |
60 |
static MainForm* getInstance(void); |
static MainForm* getInstance(); |
61 |
|
|
62 |
public slots: |
public slots: |
63 |
void sessionDirty(void); |
void sessionDirty(); |
64 |
void stabilizeForm(void); |
void stabilizeForm(); |
65 |
|
|
66 |
|
protected slots: |
67 |
|
|
68 |
|
void updateRecentFilesMenu(); |
69 |
|
|
70 |
protected: |
protected: |
71 |
bool queryClose(void); |
bool queryClose(); |
72 |
void closeEvent(QCloseEvent* pCloseEvent); |
void closeEvent(QCloseEvent* pCloseEvent); |
|
bool decodeDragFiles(const QMimeSource* pEvent, QStringList& files); |
|
73 |
void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); |
void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); |
74 |
void dropEvent(QDropEvent *pDropEvent); |
void dropEvent(QDropEvent *pDropEvent); |
75 |
void customEvent(QEvent* pCustomEvent); |
void customEvent(QEvent* pCustomEvent); |
76 |
bool newSession(void); |
bool newSession(); |
77 |
bool openSession(void); |
bool openSession(); |
78 |
bool saveSession(bool bPrompt); |
bool saveSession(bool bPrompt); |
79 |
bool closeSession(bool bForce); |
bool closeSession(bool bForce); |
80 |
bool loadSessionFile(const QString& sFilename); |
bool loadSessionFile(const QString& sFilename); |
81 |
bool saveSessionFile(const QString& sFilename); |
bool saveSessionFile(const QString& sFilename); |
82 |
void updateSession(); |
void updateSession(); |
83 |
void updateRecentFiles(const QString& sFilename); |
void updateRecentFiles(const QString& sFilename); |
84 |
void updateRecentFilesMenu(void); |
void updateInstrumentNames(); |
85 |
void updateInstrumentNames(void); |
void updateDisplayFont(); |
86 |
void updateDisplayFont(void); |
void updateDisplayEffect(); |
87 |
void updateDisplayEffect(void); |
void updateMaxVolume(); |
88 |
void updateMaxVolume(void); |
void updateMessagesFont(); |
89 |
void updateMessagesFont(void); |
void updateMessagesLimit(); |
90 |
void updateMessagesLimit(void); |
void updateMessagesCapture(); |
|
void updateMessagesCapture(void); |
|
91 |
void startSchedule(int iStartDelay); |
void startSchedule(int iStartDelay); |
92 |
void stopSchedule(void); |
void stopSchedule(); |
93 |
void startServer(void); |
void startServer(); |
94 |
void stopServer(void); |
void stopServer(); |
95 |
bool startClient(void); |
bool startClient(); |
96 |
void stopClient(void); |
void stopClient(); |
97 |
|
|
98 |
private: |
private: |
99 |
Ui::qsamplerMainForm ui; |
Ui::qsamplerMainForm ui; |
110 |
int m_iTimerDelay; |
int m_iTimerDelay; |
111 |
int m_iTimerSlot; |
int m_iTimerSlot; |
112 |
QLabel *m_statusItem[5]; |
QLabel *m_statusItem[5]; |
113 |
QMenu *m_pRecentFilesMenu; |
QList<ChannelStrip *> m_changedStrips; |
|
Q3PtrList<ChannelStrip> m_changedStrips; |
|
114 |
InstrumentListForm *m_pInstrumentListForm; |
InstrumentListForm *m_pInstrumentListForm; |
115 |
DeviceForm *m_pDeviceForm; |
DeviceForm *m_pDeviceForm; |
116 |
static MainForm *g_pMainForm; |
static MainForm *g_pMainForm; |
119 |
int m_iVolumeChanging; |
int m_iVolumeChanging; |
120 |
|
|
121 |
private slots: |
private slots: |
122 |
void fileNew(void); |
void fileNew(); |
123 |
void fileOpen(void); |
void fileOpen(); |
124 |
void fileOpenRecent(int iIndex); |
void fileOpenRecent(); |
125 |
void fileSave(void); |
void fileSave(); |
126 |
void fileSaveAs(void); |
void fileSaveAs(); |
127 |
void fileReset(void); |
void fileReset(); |
128 |
void fileRestart(void); |
void fileRestart(); |
129 |
void fileExit(void); |
void fileExit(); |
130 |
void editAddChannel(void); |
void editAddChannel(); |
131 |
void editRemoveChannel(void); |
void editRemoveChannel(); |
132 |
void editSetupChannel(void); |
void editSetupChannel(); |
133 |
void editEditChannel(void); |
void editEditChannel(); |
134 |
void editResetChannel(void); |
void editResetChannel(); |
135 |
void editResetAllChannels(void); |
void editResetAllChannels(); |
136 |
void viewMenubar(bool bOn); |
void viewMenubar(bool bOn); |
137 |
void viewToolbar(bool bOn); |
void viewToolbar(bool bOn); |
138 |
void viewStatusbar(bool bOn); |
void viewStatusbar(bool bOn); |
139 |
void viewMessages(bool bOn); |
void viewMessages(bool bOn); |
140 |
void viewInstruments(void); |
void viewInstruments(); |
141 |
void viewDevices(void); |
void viewDevices(); |
142 |
void viewOptions(void); |
void viewOptions(); |
143 |
void channelsArrange(void); |
void channelsArrange(); |
144 |
void channelsAutoArrange(bool bOn); |
void channelsAutoArrange(bool bOn); |
145 |
void helpAboutQt(void); |
void helpAboutQt(); |
146 |
void helpAbout(void); |
void helpAbout(); |
147 |
void volumeChanged(int iVolume); |
void volumeChanged(int iVolume); |
148 |
void channelStripChanged(ChannelStrip *pChannelStrip); |
void channelStripChanged(ChannelStrip *pChannelStrip); |
149 |
void channelsMenuAboutToShow(); |
void channelsMenuAboutToShow(); |
150 |
void channelsMenuActivated(int iChannel); |
void channelsMenuActivated(); |
151 |
void timerSlot(void); |
void timerSlot(); |
152 |
void readServerStdout(void); |
void readServerStdout(); |
153 |
void processServerExit(void); |
void processServerExit(); |
154 |
}; |
}; |
155 |
|
|
156 |
} // namespace QSampler |
} // namespace QSampler |