From 8dc90ae27c24aec1851215f2cc28ee24eff01ea5 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 29 Dec 2015 23:54:24 +0800 Subject: Master Spark. (WTF) --- qmpchannelswindow.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'qmpchannelswindow.cpp') diff --git a/qmpchannelswindow.cpp b/qmpchannelswindow.cpp index 6aca878..635918e 100644 --- a/qmpchannelswindow.cpp +++ b/qmpchannelswindow.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #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); +} -- cgit v1.2.3