summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/muse/ctrl/ctrldialog.cpp30
-rw-r--r--muse/muse/ctrl/ctrldialog.ui10
2 files changed, 35 insertions, 5 deletions
diff --git a/muse/muse/ctrl/ctrldialog.cpp b/muse/muse/ctrl/ctrldialog.cpp
index d17b005d..9be7f79a 100644
--- a/muse/muse/ctrl/ctrldialog.cpp
+++ b/muse/muse/ctrl/ctrldialog.cpp
@@ -33,6 +33,13 @@ CtrlDialog::CtrlDialog(Track* track, int currentId, QWidget* parent)
: QDialog(parent)
{
setupUi(this);
+ QTreeWidgetItem* header = tw->headerItem();
+ header->setTextAlignment(0, Qt::AlignLeft);
+ header->setTextAlignment(1, Qt::AlignHCenter);
+ header->setSizeHint(1, QSize(30, 20));
+ header->setToolTip(0, tr("controller name"));
+ header->setToolTip(1, tr("flag if controller contains data"));
+
QTreeWidgetItem* ci;
if (track->type() == Track::MIDI) {
//
@@ -72,6 +79,9 @@ CtrlDialog::CtrlDialog(Track* track, int currentId, QWidget* parent)
int id = (idx + 1) * 0x1000 + i;
QTreeWidgetItem* cci = new QTreeWidgetItem(ci, id);
cci->setText(0, name);
+ Ctrl* ctrl = track->getController(id);
+ if (!ctrl->empty())
+ cci->setText(1, "*");
if (id == currentId) {
tw->setCurrentItem(cci);
tw->setItemSelected(cci, true);
@@ -87,6 +97,9 @@ CtrlDialog::CtrlDialog(Track* track, int currentId, QWidget* parent)
continue;
ci = new QTreeWidgetItem(tw, i->id);
ci->setText(0, i->name);
+ Ctrl* ctrl = track->getController(i->id);
+ if (!ctrl->empty())
+ ci->setText(1, "*");
if (i->id == currentId) {
tw->setCurrentItem(ci);
tw->setItemSelected(ci, true);
@@ -99,6 +112,9 @@ CtrlDialog::CtrlDialog(Track* track, int currentId, QWidget* parent)
for (iControllerName i = cn->begin(); i != cn->end(); ++i) {
ci = new QTreeWidgetItem(tw, i->id);
ci->setText(0, i->name);
+ Ctrl* ctrl = track->getController(i->id);
+ if (!ctrl->empty())
+ ci->setText(1, "*");
if (i->id == currentId) {
tw->setCurrentItem(ci);
@@ -112,14 +128,20 @@ CtrlDialog::CtrlDialog(Track* track, int currentId, QWidget* parent)
//
MidiChannel* mc = ((MidiTrack*)track)->channel();
if (mc) {
+ ci = new QTreeWidgetItem(tw, CTRL_NO_CTRL);
+ ci->setText(0, tr("Midi Channel Controller"));
+
ControllerNameList* cn = mc->controllerNames();
for (iControllerName i = cn->begin(); i != cn->end(); ++i) {
- ci = new QTreeWidgetItem(tw, i->id);
- ci->setText(0, i->name);
+ QTreeWidgetItem* cci = new QTreeWidgetItem(ci, i->id);
+ cci->setText(0, i->name);
+ Ctrl* ctrl = mc->getController(i->id);
+ if (!ctrl->empty())
+ cci->setText(1, "*");
if (i->id == currentId) {
- tw->setCurrentItem(ci);
- tw->setItemSelected(ci, true);
+ tw->setCurrentItem(cci);
+ tw->setItemSelected(cci, true);
}
}
}
diff --git a/muse/muse/ctrl/ctrldialog.ui b/muse/muse/ctrl/ctrldialog.ui
index c63482d9..cdb3c5b8 100644
--- a/muse/muse/ctrl/ctrldialog.ui
+++ b/muse/muse/ctrl/ctrldialog.ui
@@ -27,14 +27,22 @@
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
+ <property name="uniformRowHeights" >
+ <bool>true</bool>
+ </property>
<property name="columnCount" >
- <number>1</number>
+ <number>2</number>
</property>
<column>
<property name="text" >
<string>Controller</string>
</property>
</column>
+ <column>
+ <property name="text" >
+ <string>A</string>
+ </property>
+ </column>
</widget>
</item>
<item>