/[svn]/qsampler/trunk/src/qsamplerChannelStrip.cpp
ViewVC logotype

Annotation of /qsampler/trunk/src/qsamplerChannelStrip.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2108 - (hide annotations) (download)
Thu Jul 15 08:03:32 2010 UTC (13 years, 9 months ago) by capela
File size: 15699 byte(s)
* Sampler channel and instrument file requester support for
  other than GIG instrument files (*gig *.dls) has been added,
  now also allowing for SFZ instrument files (*.sfz) loading.

1 capela 1464 // qsamplerChannelStrip.cpp
2     //
3     /****************************************************************************
4 capela 2036 Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved.
5 schoenebeck 1667 Copyright (C) 2007, 2008 Christian Schoenebeck
6 capela 1464
7     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License
9     as published by the Free Software Foundation; either version 2
10     of the License, or (at your option) any later version.
11    
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License along
18     with this program; if not, write to the Free Software Foundation, Inc.,
19     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21     *****************************************************************************/
22    
23 capela 1499 #include "qsamplerAbout.h"
24 schoenebeck 1461 #include "qsamplerChannelStrip.h"
25    
26     #include "qsamplerMainForm.h"
27    
28 schoenebeck 1667 #include "qsamplerChannelFxForm.h"
29    
30     #include <QMessageBox>
31 capela 1499 #include <QDragEnterEvent>
32 capela 2108 #include <QFileInfo>
33 capela 2036 #include <QTimer>
34 schoenebeck 1461 #include <QUrl>
35    
36 schoenebeck 1691
37 schoenebeck 1461 // Channel status/usage usage limit control.
38     #define QSAMPLER_ERROR_LIMIT 3
39    
40 capela 1510 // Needed for lroundf()
41     #include <math.h>
42    
43     #ifndef CONFIG_ROUND
44     static inline long lroundf ( float x )
45     {
46     if (x >= 0.0f)
47     return long(x + 0.5f);
48     else
49     return long(x - 0.5f);
50     }
51     #endif
52    
53 capela 1514
54     namespace QSampler {
55    
56 capela 1558 //-------------------------------------------------------------------------
57     // QSampler::ChannelStrip -- Channel strip form implementation.
58     //
59    
60 capela 2036 // MIDI activity pixmap common resources.
61     int ChannelStrip::g_iMidiActivityRefCount = 0;
62     QPixmap *ChannelStrip::g_pMidiActivityLedOn = NULL;
63     QPixmap *ChannelStrip::g_pMidiActivityLedOff = NULL;
64    
65 capela 1514 // Channel strip activation/selection.
66     ChannelStrip *ChannelStrip::g_pSelectedStrip = NULL;
67    
68 capela 1509 ChannelStrip::ChannelStrip ( QWidget* pParent, Qt::WindowFlags wflags )
69     : QWidget(pParent, wflags)
70     {
71 capela 1510 m_ui.setupUi(this);
72 schoenebeck 1461
73 capela 1510 // Initialize locals.
74     m_pChannel = NULL;
75     m_iDirtyChange = 0;
76     m_iErrorCount = 0;
77 schoenebeck 1461
78 capela 2036 if (++g_iMidiActivityRefCount == 1) {
79 capela 2074 g_pMidiActivityLedOn = new QPixmap(":/images/ledon1.png");
80     g_pMidiActivityLedOff = new QPixmap(":/images/ledoff1.png");
81 capela 2036 }
82    
83     m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff);
84    
85     #ifndef CONFIG_EVENT_CHANNEL_MIDI
86     m_ui.MidiActivityLabel->setToolTip("MIDI activity (disabled)");
87     #endif
88    
89     m_pMidiActivityTimer = new QTimer(this);
90     m_pMidiActivityTimer->setSingleShot(true);
91    
92     QObject::connect(m_pMidiActivityTimer,
93     SIGNAL(timeout()),
94     SLOT(midiActivityLedOff())
95     );
96    
97 capela 1510 // Try to restore normal window positioning.
98     adjustSize();
99 capela 1466
100 capela 1509 QObject::connect(m_ui.ChannelSetupPushButton,
101 capela 1466 SIGNAL(clicked()),
102     SLOT(channelSetup()));
103 capela 1509 QObject::connect(m_ui.ChannelMutePushButton,
104 capela 1466 SIGNAL(toggled(bool)),
105     SLOT(channelMute(bool)));
106 capela 1509 QObject::connect(m_ui.ChannelSoloPushButton,
107 capela 1466 SIGNAL(toggled(bool)),
108     SLOT(channelSolo(bool)));
109 capela 1509 QObject::connect(m_ui.VolumeSlider,
110 capela 1466 SIGNAL(valueChanged(int)),
111     SLOT(volumeChanged(int)));
112 capela 1509 QObject::connect(m_ui.VolumeSpinBox,
113 capela 1466 SIGNAL(valueChanged(int)),
114     SLOT(volumeChanged(int)));
115 capela 1509 QObject::connect(m_ui.ChannelEditPushButton,
116 capela 1466 SIGNAL(clicked()),
117     SLOT(channelEdit()));
118 schoenebeck 1667 QObject::connect(m_ui.FxPushButton,
119     SIGNAL(clicked()),
120     SLOT(channelFxEdit()));
121 capela 1515
122     setSelected(false);
123 schoenebeck 1461 }
124    
125 capela 1513
126     ChannelStrip::~ChannelStrip (void)
127     {
128 capela 1515 setSelected(false);
129    
130 capela 1510 // Destroy existing channel descriptor.
131     if (m_pChannel)
132     delete m_pChannel;
133     m_pChannel = NULL;
134 capela 2036
135     if (--g_iMidiActivityRefCount == 0) {
136     if (g_pMidiActivityLedOn)
137     delete g_pMidiActivityLedOn;
138     g_pMidiActivityLedOn = NULL;
139     if (g_pMidiActivityLedOff)
140     delete g_pMidiActivityLedOff;
141     g_pMidiActivityLedOff = NULL;
142     }
143 schoenebeck 1461 }
144    
145    
146 capela 1499 // Window drag-n-drop event handlers.
147     void ChannelStrip::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent )
148 schoenebeck 1461 {
149     if (m_pChannel == NULL)
150 capela 1499 return;
151    
152     bool bAccept = false;
153    
154     if (pDragEnterEvent->source() == NULL) {
155     const QMimeData *pMimeData = pDragEnterEvent->mimeData();
156     if (pMimeData && pMimeData->hasUrls()) {
157     QListIterator<QUrl> iter(pMimeData->urls());
158     while (iter.hasNext()) {
159     const QString& sFilename = iter.next().toLocalFile();
160     if (!sFilename.isEmpty()) {
161 capela 2108 // bAccept = Channel::isDlsInstrumentFile(sFilename);
162     bAccept = QFileInfo(sFilename).exists();
163 capela 1499 break;
164 schoenebeck 1461 }
165     }
166     }
167     }
168    
169 capela 1499 if (bAccept)
170     pDragEnterEvent->accept();
171     else
172     pDragEnterEvent->ignore();
173 schoenebeck 1461 }
174    
175    
176     void ChannelStrip::dropEvent ( QDropEvent* pDropEvent )
177     {
178 capela 1499 if (m_pChannel == NULL)
179     return;
180 schoenebeck 1461
181 capela 1499 if (pDropEvent->source())
182     return;
183    
184     const QMimeData *pMimeData = pDropEvent->mimeData();
185     if (pMimeData && pMimeData->hasUrls()) {
186     QStringList files;
187     QListIterator<QUrl> iter(pMimeData->urls());
188     while (iter.hasNext()) {
189     const QString& sFilename = iter.next().toLocalFile();
190     if (!sFilename.isEmpty()) {
191     // Go and set the dropped instrument filename...
192     m_pChannel->setInstrument(sFilename, 0);
193     // Open up the channel dialog.
194     channelSetup();
195     break;
196     }
197     }
198 schoenebeck 1461 }
199     }
200    
201    
202     // Channel strip setup formal initializer.
203 capela 1558 void ChannelStrip::setup ( Channel *pChannel )
204 schoenebeck 1461 {
205 capela 1510 // Destroy any previous channel descriptor;
206     // (remember that once setup we own it!)
207     if (m_pChannel)
208     delete m_pChannel;
209 schoenebeck 1461
210 capela 1510 // Set the new one...
211     m_pChannel = pChannel;
212 schoenebeck 1461
213 capela 1510 // Stabilize this around.
214     updateChannelInfo();
215 schoenebeck 1461
216     // We'll accept drops from now on...
217     if (m_pChannel)
218     setAcceptDrops(true);
219     }
220    
221 capela 1513
222 schoenebeck 1461 // Channel secriptor accessor.
223 capela 1558 Channel *ChannelStrip::channel (void) const
224 schoenebeck 1461 {
225 capela 1510 return m_pChannel;
226 schoenebeck 1461 }
227    
228    
229     // Messages view font accessors.
230 capela 1509 QFont ChannelStrip::displayFont (void) const
231 schoenebeck 1461 {
232 capela 1510 return m_ui.EngineNameTextLabel->font();
233 schoenebeck 1461 }
234    
235     void ChannelStrip::setDisplayFont ( const QFont & font )
236     {
237 capela 1510 m_ui.EngineNameTextLabel->setFont(font);
238     m_ui.MidiPortChannelTextLabel->setFont(font);
239     m_ui.InstrumentNameTextLabel->setFont(font);
240     m_ui.InstrumentStatusTextLabel->setFont(font);
241 schoenebeck 1461 }
242    
243    
244     // Channel display background effect.
245     void ChannelStrip::setDisplayEffect ( bool bDisplayEffect )
246     {
247 capela 1499 QPalette pal;
248 capela 1507 pal.setColor(QPalette::Foreground, Qt::yellow);
249 capela 1509 m_ui.EngineNameTextLabel->setPalette(pal);
250     m_ui.MidiPortChannelTextLabel->setPalette(pal);
251 capela 1499 pal.setColor(QPalette::Foreground, Qt::green);
252     if (bDisplayEffect) {
253 capela 2074 QPixmap pm(":/images/displaybg1.png");
254 capela 1499 pal.setBrush(QPalette::Background, QBrush(pm));
255     } else {
256     pal.setColor(QPalette::Background, Qt::black);
257     }
258 capela 1509 m_ui.ChannelInfoFrame->setPalette(pal);
259 capela 1637 m_ui.InstrumentNameTextLabel->setPalette(pal);
260 capela 1509 m_ui.StreamVoiceCountTextLabel->setPalette(pal);
261 schoenebeck 1461 }
262    
263    
264     // Maximum volume slider accessors.
265     void ChannelStrip::setMaxVolume ( int iMaxVolume )
266     {
267 capela 1510 m_iDirtyChange++;
268     m_ui.VolumeSlider->setRange(0, iMaxVolume);
269     m_ui.VolumeSpinBox->setRange(0, iMaxVolume);
270     m_iDirtyChange--;
271 schoenebeck 1461 }
272    
273    
274     // Channel setup dialog slot.
275     bool ChannelStrip::channelSetup (void)
276     {
277     if (m_pChannel == NULL)
278     return false;
279    
280     // Invoke the channel setup dialog.
281     bool bResult = m_pChannel->channelSetup(this);
282     // Notify that this channel has changed.
283     if (bResult)
284     emit channelChanged(this);
285    
286     return bResult;
287     }
288    
289    
290     // Channel mute slot.
291     bool ChannelStrip::channelMute ( bool bMute )
292     {
293     if (m_pChannel == NULL)
294     return false;
295    
296     // Invoke the channel mute method.
297     bool bResult = m_pChannel->setChannelMute(bMute);
298     // Notify that this channel has changed.
299     if (bResult)
300     emit channelChanged(this);
301    
302     return bResult;
303     }
304    
305    
306     // Channel solo slot.
307     bool ChannelStrip::channelSolo ( bool bSolo )
308     {
309     if (m_pChannel == NULL)
310     return false;
311    
312     // Invoke the channel solo method.
313     bool bResult = m_pChannel->setChannelSolo(bSolo);
314     // Notify that this channel has changed.
315     if (bResult)
316     emit channelChanged(this);
317    
318     return bResult;
319     }
320    
321    
322     // Channel edit slot.
323     void ChannelStrip::channelEdit (void)
324     {
325     if (m_pChannel == NULL)
326     return;
327    
328     m_pChannel->editChannel();
329     }
330    
331 schoenebeck 1667 bool ChannelStrip::channelFxEdit (void)
332     {
333     MainForm *pMainForm = MainForm::getInstance();
334     if (!pMainForm || !channel())
335     return false;
336 schoenebeck 1461
337 schoenebeck 1667 pMainForm->appendMessages(QObject::tr("channel fx sends..."));
338    
339     bool bResult = false;
340    
341     #if CONFIG_FXSEND
342     ChannelFxForm *pChannelFxForm =
343 schoenebeck 1668 new ChannelFxForm(channel(), parentWidget());
344 schoenebeck 1667 if (pChannelFxForm) {
345     //pChannelForm->setup(this);
346     bResult = pChannelFxForm->exec();
347     delete pChannelFxForm;
348     }
349     #else // CONFIG_FXSEND
350     QMessageBox::critical(this,
351     QSAMPLER_TITLE ": " + tr("Unavailable"),
352     tr("Sorry, QSampler was built without FX send support!\n\n"
353     "(Make sure you have a recent liblscp when recompiling QSampler)"));
354     #endif // CONFIG_FXSEND
355    
356     return bResult;
357     }
358    
359 schoenebeck 1461 // Channel reset slot.
360     bool ChannelStrip::channelReset (void)
361     {
362     if (m_pChannel == NULL)
363     return false;
364    
365     // Invoke the channel reset method.
366     bool bResult = m_pChannel->channelReset();
367     // Notify that this channel has changed.
368     if (bResult)
369     emit channelChanged(this);
370    
371     return bResult;
372     }
373    
374    
375     // Update the channel instrument name.
376     bool ChannelStrip::updateInstrumentName ( bool bForce )
377     {
378     if (m_pChannel == NULL)
379     return false;
380    
381     // Do we refresh the actual name?
382     if (bForce)
383     m_pChannel->updateInstrumentName();
384    
385     // Instrument name...
386     if (m_pChannel->instrumentName().isEmpty()) {
387 capela 1513 if (m_pChannel->instrumentStatus() >= 0) {
388     m_ui.InstrumentNameTextLabel->setText(
389 capela 1558 ' ' + Channel::loadingInstrument());
390 capela 1513 } else {
391     m_ui.InstrumentNameTextLabel->setText(
392 capela 1558 ' ' + Channel::noInstrumentName());
393 capela 1513 }
394     } else {
395     m_ui.InstrumentNameTextLabel->setText(
396     ' ' + m_pChannel->instrumentName());
397     }
398 schoenebeck 1461
399     return true;
400     }
401    
402    
403     // Do the dirty volume change.
404     bool ChannelStrip::updateChannelVolume (void)
405     {
406 capela 1510 if (m_pChannel == NULL)
407     return false;
408 schoenebeck 1461
409 capela 1510 // Convert...
410     int iVolume = ::lroundf(100.0f * m_pChannel->volume());
411     // And clip...
412     if (iVolume < 0)
413     iVolume = 0;
414 schoenebeck 1461
415 capela 1510 // Flag it here, to avoid infinite recursion.
416     m_iDirtyChange++;
417     m_ui.VolumeSlider->setValue(iVolume);
418     m_ui.VolumeSpinBox->setValue(iVolume);
419     m_iDirtyChange--;
420 schoenebeck 1461
421 capela 1510 return true;
422 schoenebeck 1461 }
423    
424    
425     // Update whole channel info state.
426     bool ChannelStrip::updateChannelInfo (void)
427     {
428 capela 1510 if (m_pChannel == NULL)
429     return false;
430 schoenebeck 1461
431     // Check for error limit/recycle...
432     if (m_iErrorCount > QSAMPLER_ERROR_LIMIT)
433     return true;
434    
435 capela 1510 // Update strip caption.
436     QString sText = m_pChannel->channelName();
437     setWindowTitle(sText);
438 capela 1513 m_ui.ChannelSetupPushButton->setText('&' + sText);
439 schoenebeck 1461
440 capela 1510 // Check if we're up and connected.
441 schoenebeck 1461 MainForm* pMainForm = MainForm::getInstance();
442     if (pMainForm->client() == NULL)
443     return false;
444    
445 capela 1510 // Read actual channel information.
446     m_pChannel->updateChannelInfo();
447 schoenebeck 1461
448 capela 1510 // Engine name...
449 capela 1513 if (m_pChannel->engineName().isEmpty()) {
450     m_ui.EngineNameTextLabel->setText(
451 capela 1558 ' ' + Channel::noEngineName());
452 capela 1513 } else {
453     m_ui.EngineNameTextLabel->setText(
454     ' ' + m_pChannel->engineName());
455     }
456 schoenebeck 1461
457     // Instrument name...
458     updateInstrumentName(false);
459    
460 capela 1510 // MIDI Port/Channel...
461 schoenebeck 1461 QString sMidiPortChannel = QString::number(m_pChannel->midiPort()) + " / ";
462     if (m_pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)
463     sMidiPortChannel += tr("All");
464     else
465     sMidiPortChannel += QString::number(m_pChannel->midiChannel() + 1);
466 capela 1509 m_ui.MidiPortChannelTextLabel->setText(sMidiPortChannel);
467 schoenebeck 1461
468 capela 1499 // Common palette...
469     QPalette pal;
470     const QColor& rgbFore = pal.color(QPalette::Foreground);
471    
472 capela 1510 // Instrument status...
473     int iInstrumentStatus = m_pChannel->instrumentStatus();
474     if (iInstrumentStatus < 0) {
475 capela 1499 pal.setColor(QPalette::Foreground, Qt::red);
476 capela 1509 m_ui.InstrumentStatusTextLabel->setPalette(pal);
477 capela 1513 m_ui.InstrumentStatusTextLabel->setText(
478     tr("ERR%1").arg(iInstrumentStatus));
479 capela 1510 m_iErrorCount++;
480     return false;
481     }
482     // All seems normal...
483 capela 1499 pal.setColor(QPalette::Foreground,
484     iInstrumentStatus < 100 ? Qt::yellow : Qt::green);
485 capela 1510 m_ui.InstrumentStatusTextLabel->setPalette(pal);
486 capela 1513 m_ui.InstrumentStatusTextLabel->setText(
487     QString::number(iInstrumentStatus) + '%');
488 capela 1510 m_iErrorCount = 0;
489 schoenebeck 1461
490     #ifdef CONFIG_MUTE_SOLO
491 capela 1510 // Mute/Solo button state coloring...
492     bool bMute = m_pChannel->channelMute();
493 capela 1499 const QColor& rgbButton = pal.color(QPalette::Button);
494 capela 2068 const QColor& rgbButtonText = pal.color(QPalette::ButtonText);
495 capela 1499 pal.setColor(QPalette::Foreground, rgbFore);
496     pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton);
497 capela 2068 pal.setColor(QPalette::ButtonText, bMute ? Qt::darkYellow : rgbButtonText);
498 capela 1509 m_ui.ChannelMutePushButton->setPalette(pal);
499     m_ui.ChannelMutePushButton->setDown(bMute);
500 capela 1510 bool bSolo = m_pChannel->channelSolo();
501 capela 1499 pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton);
502 capela 2068 pal.setColor(QPalette::ButtonText, bSolo ? Qt::darkCyan : rgbButtonText);
503 capela 1509 m_ui.ChannelSoloPushButton->setPalette(pal);
504     m_ui.ChannelSoloPushButton->setDown(bSolo);
505 schoenebeck 1461 #else
506 capela 1509 m_ui.ChannelMutePushButton->setEnabled(false);
507     m_ui.ChannelSoloPushButton->setEnabled(false);
508 schoenebeck 1461 #endif
509    
510 capela 1510 // And update the both GUI volume elements;
511     // return success if, and only if, intrument is fully loaded...
512     return updateChannelVolume() && (iInstrumentStatus == 100);
513 schoenebeck 1461 }
514    
515    
516     // Update whole channel usage state.
517     bool ChannelStrip::updateChannelUsage (void)
518     {
519 capela 1510 if (m_pChannel == NULL)
520     return false;
521 schoenebeck 1461
522     MainForm *pMainForm = MainForm::getInstance();
523     if (pMainForm->client() == NULL)
524     return false;
525    
526     // This only makes sense on fully loaded channels...
527     if (m_pChannel->instrumentStatus() < 100)
528 capela 1510 return false;
529 schoenebeck 1461
530 capela 1510 // Get current channel voice count.
531 capela 1513 int iVoiceCount = ::lscp_get_channel_voice_count(
532     pMainForm->client(), m_pChannel->channelID());
533 capela 1510 // Get current stream count.
534 capela 1513 int iStreamCount = ::lscp_get_channel_stream_count(
535     pMainForm->client(), m_pChannel->channelID());
536 capela 1510 // Get current channel buffer fill usage.
537     // As benno has suggested this is the percentage usage
538     // of the least filled buffer stream...
539 capela 1513 int iStreamUsage = ::lscp_get_channel_stream_usage(
540     pMainForm->client(), m_pChannel->channelID());;
541 schoenebeck 1461
542 capela 1510 // Update the GUI elements...
543     m_ui.StreamUsageProgressBar->setValue(iStreamUsage);
544 capela 1513 m_ui.StreamVoiceCountTextLabel->setText(
545     QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount));
546 schoenebeck 1461
547 capela 1510 // We're clean.
548     return true;
549 schoenebeck 1461 }
550    
551    
552     // Volume change slot.
553     void ChannelStrip::volumeChanged ( int iVolume )
554     {
555 capela 1510 if (m_pChannel == NULL)
556     return;
557 schoenebeck 1461
558 capela 1510 // Avoid recursion.
559     if (m_iDirtyChange > 0)
560     return;
561 schoenebeck 1461
562 capela 1510 // Convert and clip.
563     float fVolume = (float) iVolume / 100.0f;
564     if (fVolume < 0.001f)
565     fVolume = 0.0f;
566 schoenebeck 1461
567 capela 1510 // Update the GUI elements.
568     if (m_pChannel->setVolume(fVolume)) {
569     updateChannelVolume();
570     emit channelChanged(this);
571     }
572 schoenebeck 1461 }
573    
574    
575     // Context menu event handler.
576     void ChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent )
577     {
578 capela 1510 if (m_pChannel == NULL)
579     return;
580 schoenebeck 1461
581 capela 1510 // We'll just show up the main form's edit menu (thru qsamplerChannel).
582     m_pChannel->contextMenuEvent(pEvent);
583 schoenebeck 1461 }
584    
585 capela 2036
586     void ChannelStrip::midiActivityLedOn (void)
587     {
588     m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOn);
589 capela 2038 m_pMidiActivityTimer->start(100);
590 schoenebeck 1691 }
591 schoenebeck 1461
592 capela 2036
593     void ChannelStrip::midiActivityLedOff (void)
594     {
595     m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff);
596     }
597    
598    
599 schoenebeck 1461 // Error count hackish accessors.
600     void ChannelStrip::resetErrorCount (void)
601     {
602     m_iErrorCount = 0;
603     }
604    
605 capela 1514
606     // Channel strip activation/selection.
607     void ChannelStrip::setSelected ( bool bSelected )
608     {
609     if (bSelected) {
610     if (g_pSelectedStrip == this)
611     return;
612     if (g_pSelectedStrip)
613     g_pSelectedStrip->setSelected(false);
614     g_pSelectedStrip = this;
615     } else {
616     if (g_pSelectedStrip == this)
617     g_pSelectedStrip = NULL;
618     }
619    
620     QPalette pal;
621     if (bSelected) {
622     const QColor& color = pal.midlight().color();
623     pal.setColor(QPalette::Background, color.dark(150));
624     pal.setColor(QPalette::Foreground, color.light(150));
625     }
626     QWidget::setPalette(pal);
627     }
628    
629    
630     bool ChannelStrip::isSelected (void) const
631     {
632     return (this == g_pSelectedStrip);
633     }
634    
635    
636 schoenebeck 1461 } // namespace QSampler
637 capela 1464
638    
639     // end of qsamplerChannelStrip.cpp

  ViewVC Help
Powered by ViewVC