summaryrefslogtreecommitdiff
path: root/muse2/muse/midiedit/dlist.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-22 13:25:15 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-22 13:25:15 +0000
commit14f8a08279d9266467d457707166b439fd080fa2 (patch)
tree0abba8c588e746854b88a670e120e839ce6fc843 /muse2/muse/midiedit/dlist.cpp
parent18ffe91b0c57250770c098bd39ff79a0983c2ab2 (diff)
code cleanup; only removed comments
Diffstat (limited to 'muse2/muse/midiedit/dlist.cpp')
-rw-r--r--muse2/muse/midiedit/dlist.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/muse2/muse/midiedit/dlist.cpp b/muse2/muse/midiedit/dlist.cpp
index 3b8670db..0b8bf3aa 100644
--- a/muse2/muse/midiedit/dlist.cpp
+++ b/muse2/muse/midiedit/dlist.cpp
@@ -23,9 +23,6 @@
#include "song.h"
#include "scrollscale.h"
-// enum DCols { COL_MUTE=0, COL_NAME, COL_QNT, COL_ENOTE, COL_LEN,
-// COL_ANOTE, COL_CHANNEL, COL_PORT,
-// COL_LV1, COL_LV2, COL_LV3, COL_LV4, COL_NONE=-1};
//---------------------------------------------------------
// draw
@@ -51,7 +48,6 @@ void DList::draw(QPainter& p, const QRect& rect)
if (yy > y + h)
break;
DrumMap* dm = &drumMap[i];
-// if (dm->selected)
if (dm == currentlySelected)
p.fillRect(x, yy, w, TH, Qt::yellow);
// else
@@ -60,13 +56,11 @@ void DList::draw(QPainter& p, const QRect& rect)
for (int k = 0; k < h->count(); ++k) {
int x = h->sectionPosition(k);
int w = h->sectionSize(k);
- ///QRect r = p.xForm(QRect(x+2, yy, w-4, TH));
QRect r = p.combinedTransform().mapRect(QRect(x+2, yy, w-4, TH));
QString s;
int align = Qt::AlignVCenter | Qt::AlignHCenter;
p.save();
- ///p.setWorldXForm(false);
p.setWorldMatrixEnabled(false);
switch (k) {
case COL_VOL:
@@ -149,16 +143,13 @@ void DList::draw(QPainter& p, const QRect& rect)
// vertical Lines
//---------------------------------------------------
- ///p.setWorldXForm(false);
p.setWorldMatrixEnabled(false);
int n = header->count();
x = 0;
for (int i = 0; i < n; i++) {
- //x += header->sectionSize(i);
x += header->sectionSize(header->visualIndex(i));
p.drawLine(x, 0, x, height());
}
- ///p.setWorldXForm(true);
p.setWorldMatrixEnabled(true);
}
@@ -178,7 +169,6 @@ void DList::devicesPopupMenu(DrumMap* t, int x, int y, bool changeAll)
if(n != t->port)
{
audio->msgIdle(true);
- //audio->msgRemapPortDrumCtlEvents(getSelectedInstrument(), -1, -1, n);
song->remapPortDrumCtrlEvents(getSelectedInstrument(), -1, -1, n);
audio->msgIdle(false);
t->port = n;
@@ -188,13 +178,11 @@ void DList::devicesPopupMenu(DrumMap* t, int x, int y, bool changeAll)
else {
audio->msgIdle(true);
// Delete all port controller events.
- //audio->msgChangeAllPortDrumCtrlEvents(false);
song->changeAllPortDrumCtrlEvents(false);
for (int i = 0; i < DRUM_MAPSIZE; i++)
drumMap[i].port = n;
// Add all port controller events.
- //audio->msgChangeAllPortDrumCtrlEvents(true);
song->changeAllPortDrumCtrlEvents(true);
audio->msgIdle(false);
@@ -328,13 +316,11 @@ void DList::viewMousePressEvent(QMouseEvent* ev)
if (ev->modifiers() & Qt::ControlModifier) {
audio->msgIdle(true);
// Delete all port controller events.
- //audio->msgChangeAllPortDrumCtrlEvents(false);
song->changeAllPortDrumCtrlEvents(false, true);
for (int i = 0; i < DRUM_MAPSIZE; i++)
drumMap[i].channel = val;
// Add all port controller events.
- //audio->msgChangeAllPortDrumCtrlEvents(true);
song->changeAllPortDrumCtrlEvents(true, true);
audio->msgIdle(false);
song->update(SC_DRUMMAP);
@@ -344,7 +330,6 @@ void DList::viewMousePressEvent(QMouseEvent* ev)
if(val != dm->channel)
{
audio->msgIdle(true);
- //audio->msgRemapPortDrumCtlEvents(pitch, -1, val, -1);
song->remapPortDrumCtrlEvents(pitch, -1, val, -1);
audio->msgIdle(false);
dm->channel = val;
@@ -419,7 +404,6 @@ void DList::viewMouseDoubleClickEvent(QMouseEvent* ev)
{
int x = ev->x();
int y = ev->y();
-// int button = ev->button();
unsigned pitch = y / TH;
int section = header->logicalIndexAt(x);
@@ -485,7 +469,6 @@ void DList::lineEdit(int line, int section)
break;
}
- // editor->setText(dm->name);
editor->end(false);
editor->setGeometry(colx, coly, colw, colh);
// In all cases but the column name, select all text:
@@ -648,7 +631,7 @@ DList::DList(QHeaderView* h, QWidget* parent, int ymag)
{
setBg(Qt::white);
if (!h){
- h = new QHeaderView(Qt::Horizontal, parent);}
+ h = new QHeaderView(Qt::Horizontal, parent);}
header = h;
scroll = 0;
//ORCAN- CHECK if really needed: header->setTracking(true);
@@ -670,8 +653,6 @@ DList::DList(QHeaderView* h, QWidget* parent, int ymag)
DList::~DList()
{
-// if (currentlySelected != 0)
-// currentlySelected->selected = false; //Reset the global thingie
}
//---------------------------------------------------------