summaryrefslogtreecommitdiff
path: root/qmpchannelswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmpchannelswindow.cpp')
-rw-r--r--qmpchannelswindow.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/qmpchannelswindow.cpp b/qmpchannelswindow.cpp
index 6aca878..635918e 100644
--- a/qmpchannelswindow.cpp
+++ b/qmpchannelswindow.cpp
@@ -1,7 +1,6 @@
#include <QCheckBox>
#include <QPushButton>
#include <QComboBox>
-#include <QLabel>
#include "qmpchannelswindow.hpp"
#include "ui_qmpchannelswindow.h"
#include "qmpmainwindow.hpp"
@@ -11,6 +10,7 @@ qmpchannelswindow::qmpchannelswindow(QWidget *parent) :
ui(new Ui::qmpchannelswindow)
{
ui->setupUi(this);
+ pselectw=new qmppresetselect(this);
connect(this,SIGNAL(dialogClosing()),parent,SLOT(dialogClosed()));
for(int i=0;i<16;++i)
{
@@ -22,7 +22,9 @@ qmpchannelswindow::qmpchannelswindow(QWidget *parent) :
QComboBox *cb=(QComboBox*)ui->twChannels->cellWidget(i,2);
//stub
cb->addItem("Internal fluidsynth");
- ui->twChannels->setCellWidget(i,3,new QLabel(""));
+ ui->twChannels->setCellWidget(i,3,new QDCLabel(""));
+ ((QDCLabel*)ui->twChannels->cellWidget(i,3))->setID(i);
+ connect(ui->twChannels->cellWidget(i,3),SIGNAL(onDoubleClick(int)),this,SLOT(showPresetWindow(int)));
ui->twChannels->setCellWidget(i,4,new QPushButton("..."));
}
ui->twChannels->setColumnWidth(0,32);
@@ -86,3 +88,9 @@ void qmpchannelswindow::on_pbUnsolo_clicked()
((qmpMainWindow*)this->parent())->getPlayer()->setSolo(i,false);
}
}
+
+void qmpchannelswindow::showPresetWindow(int chid)
+{
+ pselectw->show();
+ pselectw->setupWindow(chid);
+}