summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-24 18:13:48 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-24 18:13:48 +0000
commit9defbf3c671ccb70ff4b29f222ea9fb9227099b2 (patch)
tree025bb8014a7b4aeb67b0e61dbfdeddf9da6c3d2a
parent9c9671d3220561d4094b47b3c0eba20c42c17d08 (diff)
more doubleclick-lineedits for the drum list
-rw-r--r--muse2/muse/midiedit/dlist.cpp48
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp1
2 files changed, 39 insertions, 10 deletions
diff --git a/muse2/muse/midiedit/dlist.cpp b/muse2/muse/midiedit/dlist.cpp
index 3b8670db..7640b38e 100644
--- a/muse2/muse/midiedit/dlist.cpp
+++ b/muse2/muse/midiedit/dlist.cpp
@@ -256,7 +256,7 @@ void DList::viewMousePressEvent(QMouseEvent* ev)
dm->mute = !dm->mute;
break;
case COL_PORT:
- if (button == Qt::RightButton) {
+ if ((button == Qt::RightButton) || (button == Qt::LeftButton)) {
bool changeAll = ev->modifiers() & Qt::ControlModifier;
devicesPopupMenu(dm, mapx(x), mapy(pitch * TH), changeAll);
}
@@ -425,7 +425,8 @@ void DList::viewMouseDoubleClickEvent(QMouseEvent* ev)
int section = header->logicalIndexAt(x);
if ((section == COL_NAME || section == COL_VOL || section == COL_LEN || section == COL_LV1 ||
- section == COL_LV2 || section == COL_LV3 || section == COL_LV4) && (ev->button() == Qt::LeftButton))
+ section == COL_LV2 || section == COL_LV3 || section == COL_LV4 || section == COL_CHANNEL ||
+ section == COL_QNT) && (ev->button() == Qt::LeftButton))
{
lineEdit(pitch, section);
}
@@ -483,6 +484,14 @@ void DList::lineEdit(int line, int section)
case COL_LV4:
editor->setText(QString::number(dm->lv4));
break;
+
+ case COL_QNT:
+ editor->setText(QString::number(dm->quant));
+ break;
+
+ case COL_CHANNEL:
+ editor->setText(QString::number(dm->channel+1));
+ break;
}
// editor->setText(dm->name);
@@ -551,22 +560,35 @@ void DList::returnPressed()
{
///val = atoi(editor->text().ascii());
val = atoi(editor->text().toAscii().constData());
- if (selectedColumn != COL_LEN)
+
+ switch (selectedColumn)
{
- if(selectedColumn == COL_VOL)
- {
+ case COL_VOL:
if (val > 200) //Check bounds for volume
val = 200;
if (val < 0)
val = 0;
- }
- else
- {
+ break;
+
+ case COL_LV1:
+ case COL_LV2:
+ case COL_LV3:
+ case COL_LV4:
if (val > 127) //Check bounds for lv1-lv4 values
val = 127;
if (val < 0)
val = 0;
- }
+ break;
+
+ case COL_CHANNEL:
+ val--;
+ if (val >= 16)
+ val = 15;
+ if (val < 0)
+ val = 0;
+ break;
+
+ default: break;
}
}
@@ -600,6 +622,14 @@ void DList::returnPressed()
editEntry->lv4 = val;
break;
+ case COL_QNT:
+ editEntry->quant = val;
+ break;
+
+ case COL_CHANNEL:
+ editEntry->channel = val;
+ break;
+
default:
printf("Return pressed in unknown column\n");
break;
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index f8815185..c090ea32 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -4280,7 +4280,6 @@ void staff_t::apply_lasso(QRect rect, set<Event*>& already_processed)
* between, for example, when a cis is tied to a des
*
* CURRENT TODO
- * o add music-keyboard-bindings for "insert rest" and "increase note length"
* o maybe support step-recording in score editor as well?
*
* IMPORTANT TODO