1 |
// qsamplerMainForm.h |
// qsamplerMainForm.h |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, Christian Schoenebeck |
Copyright (C) 2007, 2008 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 |
27 |
|
|
28 |
#include <lscp/client.h> |
#include <lscp/client.h> |
29 |
|
|
|
class qsamplerOptions; |
|
|
class qsamplerMessages; |
|
|
class qsamplerChannel; |
|
|
|
|
30 |
class QProcess; |
class QProcess; |
31 |
class QWorkspace; |
class QWorkspace; |
32 |
class QSpinBox; |
class QSpinBox; |
33 |
class QSlider; |
class QSlider; |
34 |
class QLabel; |
class QLabel; |
35 |
|
|
|
|
|
36 |
namespace QSampler { |
namespace QSampler { |
37 |
|
|
38 |
|
class Options; |
39 |
|
class Messages; |
40 |
|
class Channel; |
41 |
class ChannelStrip; |
class ChannelStrip; |
42 |
class DeviceForm; |
class DeviceForm; |
43 |
class InstrumentListForm; |
class InstrumentListForm; |
44 |
|
|
45 |
|
//------------------------------------------------------------------------- |
46 |
|
// QSampler::MainForm -- Main window form implementation. |
47 |
|
// |
48 |
|
|
49 |
class MainForm : public QMainWindow |
class MainForm : public QMainWindow |
50 |
{ |
{ |
55 |
MainForm(QWidget *pParent = NULL); |
MainForm(QWidget *pParent = NULL); |
56 |
~MainForm(); |
~MainForm(); |
57 |
|
|
58 |
void setup(qsamplerOptions* pOptions); |
void setup(Options* pOptions); |
59 |
|
|
60 |
qsamplerOptions* options() const; |
Options* options() const; |
61 |
lscp_client_t* client() const; |
lscp_client_t* client() const; |
62 |
|
|
63 |
QString sessionName(const QString& sFilename); |
QString sessionName(const QString& sFilename); |
68 |
void appendMessagesError(const QString& s); |
void appendMessagesError(const QString& s); |
69 |
void appendMessagesClient(const QString& s); |
void appendMessagesClient(const QString& s); |
70 |
|
|
71 |
ChannelStrip* createChannelStrip(qsamplerChannel *pChannel); |
ChannelStrip* createChannelStrip(Channel *pChannel); |
72 |
|
void destroyChannelStrip(ChannelStrip* pChannelStrip); |
73 |
ChannelStrip* activeChannelStrip(); |
ChannelStrip* activeChannelStrip(); |
74 |
ChannelStrip* channelStripAt(int iChannel); |
ChannelStrip* channelStripAt(int iChannel); |
75 |
ChannelStrip* channelStrip(int iChannelID); |
ChannelStrip* channelStrip(int iChannelID); |
119 |
|
|
120 |
void updateRecentFilesMenu(); |
void updateRecentFilesMenu(); |
121 |
|
|
122 |
|
// Channel strip activation/selection. |
123 |
|
void activateStrip(QWidget *pWidget); |
124 |
|
|
125 |
protected: |
protected: |
126 |
|
|
127 |
bool queryClose(); |
bool queryClose(); |
144 |
void updateMessagesFont(); |
void updateMessagesFont(); |
145 |
void updateMessagesLimit(); |
void updateMessagesLimit(); |
146 |
void updateMessagesCapture(); |
void updateMessagesCapture(); |
147 |
|
void updateViewMidiDeviceStatusMenu(); |
148 |
|
void updateAllChannelStrips(bool bRemoveDeadStrips); |
149 |
void startSchedule(int iStartDelay); |
void startSchedule(int iStartDelay); |
150 |
void stopSchedule(); |
void stopSchedule(); |
151 |
void startServer(); |
void startServer(); |
152 |
void stopServer(); |
void stopServer(bool bInteractive = false); |
153 |
bool startClient(); |
bool startClient(); |
154 |
void stopClient(); |
void stopClient(); |
155 |
|
|
157 |
|
|
158 |
Ui::qsamplerMainForm m_ui; |
Ui::qsamplerMainForm m_ui; |
159 |
|
|
160 |
qsamplerOptions *m_pOptions; |
Options *m_pOptions; |
161 |
qsamplerMessages *m_pMessages; |
Messages *m_pMessages; |
162 |
QWorkspace *m_pWorkspace; |
QWorkspace *m_pWorkspace; |
163 |
QString m_sFilename; |
QString m_sFilename; |
164 |
int m_iUntitled; |
int m_iUntitled; |
165 |
int m_iDirtyCount; |
int m_iDirtyCount; |
166 |
lscp_client_t *m_pClient; |
lscp_client_t *m_pClient; |
167 |
QProcess *m_pServer; |
QProcess *m_pServer; |
168 |
|
bool bForceServerStop; |
169 |
int m_iStartDelay; |
int m_iStartDelay; |
170 |
int m_iTimerDelay; |
int m_iTimerDelay; |
171 |
int m_iTimerSlot; |
int m_iTimerSlot; |