24 |
#include <qmessagebox.h> |
#include <qmessagebox.h> |
25 |
#include <qfileinfo.h> |
#include <qfileinfo.h> |
26 |
#include <qtooltip.h> |
#include <qtooltip.h> |
27 |
|
#include <qpopupmenu.h> |
28 |
|
|
29 |
#include <math.h> |
#include <math.h> |
30 |
|
|
38 |
void qsamplerChannelStrip::init (void) |
void qsamplerChannelStrip::init (void) |
39 |
{ |
{ |
40 |
// Initialize locals. |
// Initialize locals. |
41 |
m_pMainForm = NULL; |
m_pMainForm = NULL; |
42 |
m_iChannelID = 0; |
m_pChannel = NULL; |
|
|
|
|
// m_sEngineName = "(No engine)"; |
|
|
// m_sInstrumentFile = "(No instrument)"; |
|
|
m_iInstrumentNr = 0; |
|
|
m_sMidiDriver = "ALSA"; // DEPRECATED. |
|
|
m_iMidiDevice = 0; |
|
|
m_iMidiPort = 0; |
|
|
m_iMidiChannel = 0; |
|
|
m_sAudioDriver = "ALSA"; // DEPRECATED. |
|
|
m_iAudioDevice = 0; |
|
|
m_fVolume = 0.0; |
|
|
|
|
43 |
m_iDirtyChange = 0; |
m_iDirtyChange = 0; |
44 |
|
|
45 |
// Try to restore normal window positioning. |
// Try to restore normal window positioning. |
50 |
// Kind of destructor. |
// Kind of destructor. |
51 |
void qsamplerChannelStrip::destroy (void) |
void qsamplerChannelStrip::destroy (void) |
52 |
{ |
{ |
53 |
|
// Destroy existing channel descriptor. |
54 |
|
if (m_pChannel) |
55 |
|
delete m_pChannel; |
56 |
|
m_pChannel = NULL; |
57 |
} |
} |
58 |
|
|
59 |
|
|
60 |
// Channel strip setup formal initializer. |
// Channel strip setup formal initializer. |
61 |
void qsamplerChannelStrip::setup ( qsamplerMainForm *pMainForm, int iChannelID ) |
void qsamplerChannelStrip::setup ( qsamplerMainForm *pMainForm, int iChannelID ) |
62 |
{ |
{ |
63 |
m_iDirtyChange = 0; |
// Set main form reference. |
64 |
m_pMainForm = pMainForm; |
m_pMainForm = pMainForm; |
65 |
|
|
66 |
setChannelID(iChannelID); |
// Destroy any previous channel descriptor. |
67 |
} |
if (m_pChannel) |
68 |
|
delete m_pChannel; |
69 |
|
|
70 |
// The global options settings delegated property. |
// Create a new one... |
71 |
qsamplerOptions *qsamplerChannelStrip::options (void) |
m_pChannel = new qsamplerChannel(pMainForm); |
72 |
{ |
// And set appropriate settings. |
73 |
if (m_pMainForm == NULL) |
if (m_pChannel) { |
74 |
return NULL; |
m_pChannel->setChannelID(iChannelID); |
75 |
|
m_iDirtyChange = 0; |
|
return m_pMainForm->options(); |
|
|
} |
|
|
|
|
|
|
|
|
// The client descriptor delegated property. |
|
|
lscp_client_t *qsamplerChannelStrip::client (void) |
|
|
{ |
|
|
if (m_pMainForm == NULL) |
|
|
return NULL; |
|
|
|
|
|
return m_pMainForm->client(); |
|
|
} |
|
|
|
|
|
|
|
|
// Channel-ID (aka Sammpler-Channel) accessors. |
|
|
int qsamplerChannelStrip::channelID (void) |
|
|
{ |
|
|
return m_iChannelID; |
|
|
} |
|
|
|
|
|
void qsamplerChannelStrip::setChannelID ( int iChannelID ) |
|
|
{ |
|
|
m_iChannelID = iChannelID; |
|
|
|
|
|
updateChannelInfo(); |
|
|
} |
|
|
|
|
|
|
|
|
// Engine name accessors. |
|
|
QString& qsamplerChannelStrip::engineName (void) |
|
|
{ |
|
|
return m_sEngineName; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::loadEngine ( const QString& sEngineName ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
if (::lscp_load_engine(client(), sEngineName.latin1(), m_iChannelID) != LSCP_OK) { |
|
|
appendMessagesClient("lscp_load_engine"); |
|
|
return false; |
|
|
} |
|
|
|
|
|
m_sEngineName = sEngineName; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// Instrument filename accessors. |
|
|
QString& qsamplerChannelStrip::instrumentFile (void) |
|
|
{ |
|
|
return m_sInstrumentFile; |
|
|
} |
|
|
|
|
|
// Instrument index accessors. |
|
|
int qsamplerChannelStrip::instrumentNr (void) |
|
|
{ |
|
|
return m_iInstrumentNr; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::loadInstrument ( const QString& sInstrumentFile, int iInstrumentNr ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
if (::lscp_load_instrument(client(), sInstrumentFile.latin1(), iInstrumentNr, m_iChannelID) != LSCP_OK) { |
|
|
appendMessagesClient("lscp_load_instrument"); |
|
|
return false; |
|
|
} |
|
|
|
|
|
m_sInstrumentFile = sInstrumentFile; |
|
|
m_iInstrumentNr = iInstrumentNr; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// MIDI driver type accessors (DEPRECATED). |
|
|
QString& qsamplerChannelStrip::midiDriver (void) |
|
|
{ |
|
|
return m_sMidiDriver; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::setMidiDriver ( const QString& sMidiDriver ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
if (::lscp_set_channel_midi_type(client(), m_iChannelID, sMidiDriver.latin1()) != LSCP_OK) { |
|
|
appendMessagesClient("lscp_set_channel_midi_type"); |
|
|
return false; |
|
|
} |
|
|
|
|
|
m_sMidiDriver = sMidiDriver; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// MIDI device accessors. |
|
|
int qsamplerChannelStrip::midiDevice (void) |
|
|
{ |
|
|
return m_iMidiDevice; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::setMidiDevice ( int iMidiDevice ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
// FIXME: call this when LSCP becomes stable. |
|
|
// if (::lscp_set_channel_midi_device(client(), m_iChannelID, iMidiDevice) != LSCP_OK) { |
|
|
// appendMessagesClient("lscp_set_channel_midi_device"); |
|
|
// return false; |
|
|
// } |
|
|
|
|
|
m_iMidiDevice = iMidiDevice; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// MIDI port number accessor. |
|
|
int qsamplerChannelStrip::midiPort (void) |
|
|
{ |
|
|
return m_iMidiPort; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::setMidiPort ( int iMidiPort ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
// FIXME: call this when LSCP becomes stable. |
|
|
// if (::lscp_set_channel_midi_port(client(), m_iChannelID, iMidiPort) != LSCP_OK) { |
|
|
// appendMessagesClient("lscp_set_channel_midi_port"); |
|
|
// return false; |
|
|
// } |
|
|
|
|
|
m_iMidiPort = iMidiPort; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// MIDI channel accessor. |
|
|
int qsamplerChannelStrip::midiChannel (void) |
|
|
{ |
|
|
return m_iMidiChannel; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::setMidiChannel ( int iMidiChannel ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
// FIXME: call this when LSCP becomes stable. |
|
|
// if (::lscp_set_channel_midi_channel(client(), m_iChannelID, iMidiChannel) != LSCP_OK) { |
|
|
// appendMessagesClient("lscp_set_channel_midi_channel"); |
|
|
// return false; |
|
|
// } |
|
|
|
|
|
m_iMidiChannel = iMidiChannel; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// Audio device accessor. |
|
|
int qsamplerChannelStrip::audioDevice (void) |
|
|
{ |
|
|
return m_iAudioDevice; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::setAudioDevice ( int iAudioDevice ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
// FIXME: call this when LSCP becomes stable. |
|
|
// if (::lscp_set_channel_audio_device(client(), m_iChannelID, iAudioDevice) != LSCP_OK) { |
|
|
// appendMessagesClient("lscp_set_channel_audio_device"); |
|
|
// return false; |
|
|
// } |
|
|
|
|
|
m_iAudioDevice = iAudioDevice; |
|
|
return true; |
|
|
} |
|
|
|
|
|
|
|
|
// Audio driver type accessors (DEPRECATED). |
|
|
QString& qsamplerChannelStrip::audioDriver (void) |
|
|
{ |
|
|
return m_sAudioDriver; |
|
|
} |
|
|
|
|
|
bool qsamplerChannelStrip::setAudioDriver ( const QString& sAudioDriver ) |
|
|
{ |
|
|
if (client() == NULL) |
|
|
return false; |
|
|
|
|
|
if (::lscp_set_channel_audio_type(client(), m_iChannelID, sAudioDriver.latin1()) != LSCP_OK) { |
|
|
appendMessagesClient("lscp_set_channel_audio_type"); |
|
|
return false; |
|
76 |
} |
} |
77 |
|
|
78 |
m_sAudioDriver = sAudioDriver; |
// Stabilize this around. |
79 |
return true; |
updateChannelInfo(); |
|
} |
|
|
|
|
|
|
|
|
// Channel volume accessors. |
|
|
float qsamplerChannelStrip::volume (void) |
|
|
{ |
|
|
return m_fVolume; |
|
80 |
} |
} |
81 |
|
|
82 |
bool qsamplerChannelStrip::setVolume ( float fVolume ) |
// Channel secriptor accessor. |
83 |
|
qsamplerChannel *qsamplerChannelStrip::channel (void) |
84 |
{ |
{ |
85 |
if (client() == NULL) |
return m_pChannel; |
|
return false; |
|
|
|
|
|
if (::lscp_set_channel_volume(client(), m_iChannelID, fVolume) != LSCP_OK) { |
|
|
appendMessagesClient("lscp_set_channel_volume"); |
|
|
return false; |
|
|
} |
|
|
|
|
|
m_fVolume = fVolume; |
|
|
return true; |
|
86 |
} |
} |
87 |
|
|
88 |
|
|
95 |
void qsamplerChannelStrip::setDisplayFont ( const QFont & font ) |
void qsamplerChannelStrip::setDisplayFont ( const QFont & font ) |
96 |
{ |
{ |
97 |
EngineNameTextLabel->setFont(font); |
EngineNameTextLabel->setFont(font); |
|
InstrumentNameTextLabel->setFont(font); |
|
98 |
MidiPortChannelTextLabel->setFont(font); |
MidiPortChannelTextLabel->setFont(font); |
99 |
|
InstrumentNameTextLabel->setFont(font); |
100 |
|
InstrumentStatusTextLabel->setFont(font); |
101 |
} |
} |
102 |
|
|
103 |
// Channel setup dialog. |
|
104 |
|
// Channel setup dialog slot. |
105 |
void qsamplerChannelStrip::channelSetup (void) |
void qsamplerChannelStrip::channelSetup (void) |
106 |
{ |
{ |
107 |
|
showChannelSetup(false); |
108 |
|
} |
109 |
|
|
110 |
|
|
111 |
|
// Channel setup dialog. |
112 |
|
void qsamplerChannelStrip::showChannelSetup ( bool bNew ) |
113 |
|
{ |
114 |
qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this); |
qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(this); |
115 |
if (pChannelForm) { |
if (pChannelForm) { |
116 |
pChannelForm->setup(this); |
pChannelForm->setup(m_pChannel, bNew); |
117 |
if (pChannelForm->exec()) { |
if (pChannelForm->exec()) { |
118 |
updateChannelInfo(); |
updateChannelInfo(); |
119 |
emit channelChanged(this); |
emit channelChanged(this); |
126 |
// Update whole channel info state. |
// Update whole channel info state. |
127 |
void qsamplerChannelStrip::updateChannelInfo (void) |
void qsamplerChannelStrip::updateChannelInfo (void) |
128 |
{ |
{ |
129 |
|
if (m_pChannel == NULL) |
130 |
|
return; |
131 |
|
|
132 |
// Update strip caption. |
// Update strip caption. |
133 |
QString sText = tr("Channel %1").arg(m_iChannelID); |
QString sText = tr("Channel %1").arg(m_pChannel->channelID()); |
134 |
setCaption(sText); |
setCaption(sText); |
135 |
ChannelSetupPushButton->setText(sText); |
ChannelSetupPushButton->setText(sText); |
136 |
|
|
137 |
// Check if we're up and connected. |
// Check if we're up and connected. |
138 |
if (client() == NULL) |
if (m_pChannel->client() == NULL) |
139 |
return; |
return; |
140 |
|
|
141 |
// Read channel information. |
// Read actual channel information. |
142 |
lscp_channel_info_t *pChannelInfo = ::lscp_get_channel_info(client(), m_iChannelID); |
m_pChannel->updateChannelInfo(); |
|
if (pChannelInfo == NULL) { |
|
|
appendMessagesClient("lscp_get_channel_info"); |
|
|
// appendMessagesError(tr("Could not get channel information.\n\nSorry.")); |
|
|
} else { |
|
|
// Cache in channel information. |
|
|
m_sEngineName = pChannelInfo->engine_name; |
|
|
m_sInstrumentFile = pChannelInfo->instrument_file; |
|
|
m_iInstrumentNr = pChannelInfo->instrument_nr; |
|
|
m_iMidiDevice = pChannelInfo->midi_device; |
|
|
m_iMidiPort = pChannelInfo->midi_port; |
|
|
m_iMidiChannel = pChannelInfo->midi_channel; |
|
|
m_iAudioDevice = pChannelInfo->audio_device; |
|
|
m_fVolume = pChannelInfo->volume; |
|
|
} |
|
143 |
|
|
144 |
// Set some proper display values. |
// Set some proper display values. |
145 |
|
const QString sIndent = " "; |
146 |
|
|
147 |
// Engine name... |
// Engine name... |
148 |
if (m_sEngineName.isEmpty()) |
if (m_pChannel->engineName().isEmpty()) |
149 |
EngineNameTextLabel->setText(tr("(No engine)")); |
EngineNameTextLabel->setText(sIndent + tr("(No engine)")); |
150 |
else |
else |
151 |
EngineNameTextLabel->setText(m_sEngineName); |
EngineNameTextLabel->setText(sIndent + m_pChannel->engineName()); |
152 |
|
|
153 |
// Instrument name... |
// Instrument name... |
154 |
if (m_sInstrumentFile.isEmpty()) |
if (m_pChannel->instrumentFile().isEmpty()) |
155 |
InstrumentNameTextLabel->setText(tr("(No instrument)")); |
InstrumentNameTextLabel->setText(sIndent + tr("(No instrument)")); |
156 |
else |
else |
157 |
InstrumentNameTextLabel->setText(QString("%1 [%2]") |
InstrumentNameTextLabel->setText(sIndent + QString("%1 [%2]") |
158 |
.arg(QFileInfo(m_sInstrumentFile).fileName()).arg(m_iInstrumentNr)); |
.arg(QFileInfo(m_pChannel->instrumentFile()).fileName()).arg(m_pChannel->instrumentNr())); |
159 |
|
|
160 |
|
// Instrument status... |
161 |
|
int iInstrumentStatus = m_pChannel->instrumentStatus(); |
162 |
|
if (iInstrumentStatus < 0) { |
163 |
|
InstrumentStatusTextLabel->setPaletteForegroundColor(Qt::red); |
164 |
|
InstrumentStatusTextLabel->setText(tr("ERR%1").arg(iInstrumentStatus)); |
165 |
|
} else { |
166 |
|
InstrumentStatusTextLabel->setPaletteForegroundColor(iInstrumentStatus < 100 ? Qt::yellow : Qt::green); |
167 |
|
InstrumentStatusTextLabel->setText(QString::number(iInstrumentStatus) + "%"); |
168 |
|
} |
169 |
|
|
170 |
// MIDI Port/Channel... |
// MIDI Port/Channel... |
171 |
MidiPortChannelTextLabel->setText(QString("%1 / %2") |
if (m_pChannel->midiChannel() > 0) |
172 |
.arg(m_iMidiPort).arg(m_iMidiChannel)); |
MidiPortChannelTextLabel->setText(QString("%1 / %2").arg(m_pChannel->midiPort()).arg(m_pChannel->midiChannel())); |
173 |
|
else |
174 |
|
MidiPortChannelTextLabel->setText(QString("%1 / *").arg(m_pChannel->midiPort())); |
175 |
|
|
176 |
// And update the both GUI volume elements. |
// And update the both GUI volume elements. |
177 |
updateChannelVolume(); |
updateChannelVolume(); |
178 |
} |
} |
181 |
// Do the dirty volume change. |
// Do the dirty volume change. |
182 |
void qsamplerChannelStrip::updateChannelVolume (void) |
void qsamplerChannelStrip::updateChannelVolume (void) |
183 |
{ |
{ |
184 |
|
if (m_pChannel == NULL) |
185 |
|
return; |
186 |
|
|
187 |
// Convert... |
// Convert... |
188 |
#ifdef CONFIG_ROUND |
#ifdef CONFIG_ROUND |
189 |
int iVolume = (int) ::round(100.0 * m_fVolume); |
int iVolume = (int) ::round(100.0 * m_pChannel->volume()); |
190 |
#else |
#else |
191 |
double fIPart = 0.0; |
double fIPart = 0.0; |
192 |
double fFPart = ::modf(100.0 * m_fVolume, &fIPart); |
double fFPart = ::modf(100.0 * m_pChannel->volume(), &fIPart); |
193 |
int iVolume = (int) fIPart; |
int iVolume = (int) fIPart; |
194 |
if (fFPart >= +0.5) |
if (fFPart >= +0.5) |
195 |
iVolume++; |
iVolume++; |
199 |
#endif |
#endif |
200 |
|
|
201 |
// And clip... |
// And clip... |
202 |
if (iVolume > 100) |
if (iVolume < 0) |
|
iVolume = 100; |
|
|
else if (iVolume < 0) |
|
203 |
iVolume = 0; |
iVolume = 0; |
204 |
|
|
205 |
// Flag it here, to avoid infinite recursion. |
// Flag it here, to avoid infinite recursion. |
213 |
// Update whole channel usage state. |
// Update whole channel usage state. |
214 |
void qsamplerChannelStrip::updateChannelUsage (void) |
void qsamplerChannelStrip::updateChannelUsage (void) |
215 |
{ |
{ |
216 |
if (client() == NULL) |
if (m_pChannel == NULL) |
217 |
|
return; |
218 |
|
if (m_pChannel->client() == NULL) |
219 |
|
return; |
220 |
|
|
221 |
|
// Conditionally update whole channel status info. |
222 |
|
if (m_pChannel->instrumentStatus() >= 0 && m_pChannel->instrumentStatus() < 100) { |
223 |
|
updateChannelInfo(); |
224 |
|
// Once we get a complete instrument load, try a implied reset channel.... |
225 |
|
if (m_pChannel->instrumentStatus() == 100) |
226 |
|
m_pChannel->resetChannel(); |
227 |
|
} |
228 |
|
// Leave, if we still have an erroneus or incomplete instrument load. |
229 |
|
if (m_pChannel->instrumentStatus() < 100) |
230 |
return; |
return; |
231 |
|
|
232 |
// Get current channel voice count. |
// Get current channel voice count. |
233 |
int iVoiceCount = ::lscp_get_channel_voice_count(client(), m_iChannelID); |
int iVoiceCount = ::lscp_get_channel_voice_count(m_pChannel->client(), m_pChannel->channelID()); |
234 |
// Get current stream count. |
// Get current stream count. |
235 |
int iStreamCount = ::lscp_get_channel_stream_count(client(), m_iChannelID); |
int iStreamCount = ::lscp_get_channel_stream_count(m_pChannel->client(), m_pChannel->channelID()); |
236 |
// Get current channel buffer fill usage. |
// Get current channel buffer fill usage. |
237 |
// As benno has suggested this is the percentage usage |
// As benno has suggested this is the percentage usage |
238 |
// of the least filled buffer stream... |
// of the least filled buffer stream... |
239 |
int iStreamUsage = 0; |
int iStreamUsage = ::lscp_get_channel_stream_usage(m_pChannel->client(), m_pChannel->channelID());; |
240 |
if (iStreamCount > 0) { |
|
|
lscp_buffer_fill_t *pBufferFill = ::lscp_get_channel_buffer_fill(client(), LSCP_USAGE_PERCENTAGE, m_iChannelID); |
|
|
if (pBufferFill) { |
|
|
for (int iStream = 0; iStream < iStreamCount; iStream++) { |
|
|
if (iStreamUsage > (int) pBufferFill[iStream].stream_usage || iStream == 0) |
|
|
iStreamUsage = pBufferFill[iStream].stream_usage; |
|
|
} |
|
|
} |
|
|
} |
|
241 |
// Update the GUI elements... |
// Update the GUI elements... |
242 |
StreamUsageProgressBar->setProgress(iStreamUsage); |
StreamUsageProgressBar->setProgress(iStreamUsage); |
243 |
StreamVoiceCountTextLabel->setText(QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount)); |
StreamVoiceCountTextLabel->setText(QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount)); |
247 |
// Volume change slot. |
// Volume change slot. |
248 |
void qsamplerChannelStrip::volumeChanged ( int iVolume ) |
void qsamplerChannelStrip::volumeChanged ( int iVolume ) |
249 |
{ |
{ |
250 |
|
if (m_pChannel == NULL) |
251 |
|
return; |
252 |
|
|
253 |
// Avoid recursion. |
// Avoid recursion. |
254 |
if (m_iDirtyChange > 0) |
if (m_iDirtyChange > 0) |
255 |
return; |
return; |
256 |
|
|
257 |
// Convert and clip. |
// Convert and clip. |
258 |
float fVolume = (float) iVolume / 100.0; |
float fVolume = (float) iVolume / 100.0; |
259 |
if (fVolume > 1.0) |
if (fVolume < 0.001) |
|
fVolume = 1.0; |
|
|
else if (fVolume < 0.0) |
|
260 |
fVolume = 0.0; |
fVolume = 0.0; |
261 |
|
|
262 |
// Update the GUI elements. |
// Update the GUI elements. |
263 |
if (setVolume(fVolume)) { |
if (m_pChannel->setVolume(fVolume)) { |
264 |
updateChannelVolume(); |
updateChannelVolume(); |
265 |
emit channelChanged(this); |
emit channelChanged(this); |
266 |
} |
} |
267 |
} |
} |
268 |
|
|
269 |
|
|
270 |
// Redirected messages output methods. |
// Context menu event handler. |
271 |
void qsamplerChannelStrip::appendMessages( const QString& s ) |
void qsamplerChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent ) |
272 |
{ |
{ |
273 |
m_pMainForm->appendMessages(s); |
if (m_pMainForm == NULL) |
274 |
} |
return; |
275 |
|
|
276 |
void qsamplerChannelStrip::appendMessagesColor( const QString& s, const QString& c ) |
// We'll just show up the main form's edit menu. |
277 |
{ |
m_pMainForm->contextMenuEvent(pEvent); |
|
m_pMainForm->appendMessagesColor(s, c); |
|
|
} |
|
|
|
|
|
void qsamplerChannelStrip::appendMessagesText( const QString& s ) |
|
|
{ |
|
|
m_pMainForm->appendMessagesText(s); |
|
278 |
} |
} |
279 |
|
|
|
void qsamplerChannelStrip::appendMessagesError( const QString& s ) |
|
|
{ |
|
|
m_pMainForm->appendMessagesError(s); |
|
|
} |
|
280 |
|
|
281 |
void qsamplerChannelStrip::appendMessagesClient( const QString& s ) |
// Maximum volume slider accessors. |
282 |
|
void qsamplerChannelStrip::setMaxVolume ( int iMaxVolume ) |
283 |
{ |
{ |
284 |
m_pMainForm->appendMessagesClient(s); |
m_iDirtyChange++; |
285 |
|
VolumeSlider->setRange(0, iMaxVolume); |
286 |
|
VolumeSpinBox->setRange(0, iMaxVolume); |
287 |
|
m_iDirtyChange--; |
288 |
} |
} |
289 |
|
|
290 |
|
|
291 |
// end of qsamplerChannelStrip.ui.h |
// end of qsamplerChannelStrip.ui.h |
|
|
|