summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/widgets/lcombo.h5
-rw-r--r--muse2/muse/widgets/tb1.cpp48
-rw-r--r--muse2/muse/widgets/tb1.h2
4 files changed, 41 insertions, 15 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index d6204c68..e91586ec 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,4 @@
+21.10.2010 Toolbar1 usage of Q3ListBox changed to QTableWidget. (p4.0.3 Tim)
20.10.2010
* Fixed: cmake should work now. (T356)
- Changed the QT4_WRAP_UI3 macro to generate <filename>.h instead of ui_<filename>.h
diff --git a/muse2/muse/widgets/lcombo.h b/muse2/muse/widgets/lcombo.h
index f2332847..bdeedcb6 100644
--- a/muse2/muse/widgets/lcombo.h
+++ b/muse2/muse/widgets/lcombo.h
@@ -12,7 +12,9 @@
#include <qcombobox.h>
class QString;
-class Q3ListBox;
+//class Q3ListBox;
+#include <QAbstractItemView>
+
//---------------------------------------------------------
// LabelCombo
@@ -33,6 +35,7 @@ class LabelCombo : public QWidget {
void insertItem(const QString& txt, int index=-1);
void setCurrentItem(int i) { box->setCurrentItem(i); }
//void setListBox(Q3ListBox* lb) { box->setListBox(lb); } // ddskrjo
+ void setView(QAbstractItemView* v) { box->setModel(v->model()); box->setView(v); } // p4.0.3
void setFocusPolicy ( Qt::FocusPolicy fp );
};
diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp
index 8aa6225f..0b1faac8 100644
--- a/muse2/muse/widgets/tb1.cpp
+++ b/muse2/muse/widgets/tb1.cpp
@@ -13,6 +13,7 @@
#include <qlayout.h>
#include <q3listbox.h>
#include <qtoolbutton.h>
+#include <QTableWidget> // p4.0.3
#include "config.h"
#include "lcombo.h"
@@ -81,18 +82,31 @@ Toolbar1::Toolbar1(Q3MainWindow* parent, int r, int q, bool sp)
raster = new LabelCombo(tr("Snap"), this);
quant = new LabelCombo(tr("Quantize"), this);
- Q3ListBox* rlist = new Q3ListBox(this);
- Q3ListBox* qlist = new Q3ListBox(this);
+ //Q3ListBox* rlist = new Q3ListBox(this);
+ //Q3ListBox* qlist = new Q3ListBox(this);
+ QTableWidget* rlist = new QTableWidget(10, 3, this); // p4.0.3
+ QTableWidget* qlist = new QTableWidget(8, 3, this); //
rlist->setMinimumWidth(95);
qlist->setMinimumWidth(95);
//raster->setListBox(rlist); ddskrjo
//quant->setListBox(qlist); ddskrjo
- rlist->setColumnMode(3);
- qlist->setColumnMode(3);
- for (int i = 0; i < 30; i++)
- rlist->insertItem(tr(rasterStrings[i]), i);
- for (int i = 0; i < 24; i++)
- qlist->insertItem(tr(quantStrings[i]), i);
+ raster->setView(rlist); // p4.0.3
+ quant->setView(qlist); //
+
+ //rlist->setColumnMode(3);
+ //qlist->setColumnMode(3);
+ //for (int i = 0; i < 30; i++)
+ // rlist->insertItem(tr(rasterStrings[i]), i);
+ //for (int i = 0; i < 24; i++)
+ // qlist->insertItem(tr(quantStrings[i]), i);
+ // p4.0.3
+ for (int j = 0; j < 3; j++)
+ for (int i = 0; i < 10; i++)
+ rlist->setItem(i, j, new QTableWidgetItem(tr(rasterStrings[i + j * 10])));
+ for (int j = 0; j < 3; j++)
+ for (int i = 0; i < 8; i++)
+ qlist->setItem(i, j, new QTableWidgetItem(tr(quantStrings[i + j * 8])));
+
setRaster(r);
setQuant(q);
@@ -101,15 +115,17 @@ Toolbar1::Toolbar1(Q3MainWindow* parent, int r, int q, bool sp)
//---------------------------------------------------
LabelCombo* to = new LabelCombo(tr("To"), this);
- Q3ListBox* toList = new Q3ListBox(this);
- //to->setListBox(toList); ddskrjo
- toList->insertItem(tr("All Events"), 0);
- toList->insertItem(tr("Looped Ev."), CMD_RANGE_LOOP);
- toList->insertItem(tr("Selected Ev."), CMD_RANGE_SELECTED);
- toList->insertItem(tr("Looped+Sel."), CMD_RANGE_LOOP | CMD_RANGE_SELECTED);
+// Q3ListBox* toList = new Q3ListBox(this);
+// //to->setListBox(toList); ddskrjo
+// toList->insertItem(tr("All Events"), 0);
+// toList->insertItem(tr("Looped Ev."), CMD_RANGE_LOOP);
+// toList->insertItem(tr("Selected Ev."), CMD_RANGE_SELECTED);
+// toList->insertItem(tr("Looped+Sel."), CMD_RANGE_LOOP | CMD_RANGE_SELECTED);
connect(raster, SIGNAL(activated(int)), SLOT(_rasterChanged(int)));
connect(quant, SIGNAL(activated(int)), SLOT(_quantChanged(int)));
+ //connect(raster, SIGNAL(cellActivated(int, int)), SLOT(_rasterChanged(int, int))); // p4.0.3
+ //connect(quant, SIGNAL(cellActivated(int, int)), SLOT(_quantChanged(int, int))); //
connect(to, SIGNAL(activated(int)), SIGNAL(toChanged(int)));
connect(solo, SIGNAL(toggled(bool)), SIGNAL(soloChanged(bool)));
pos->setEnabled(false);
@@ -120,8 +136,10 @@ Toolbar1::Toolbar1(Q3MainWindow* parent, int r, int q, bool sp)
//---------------------------------------------------------
void Toolbar1::_rasterChanged(int index)
+//void Toolbar1::_rasterChanged(int r, int c) // p4.0.3
{
emit rasterChanged(rasterTable[index]);
+ //emit rasterChanged(rasterTable[r + c * 10]); // p4.0.3
}
//---------------------------------------------------------
@@ -129,8 +147,10 @@ void Toolbar1::_rasterChanged(int index)
//---------------------------------------------------------
void Toolbar1::_quantChanged(int index)
+//void Toolbar1::_quantChanged(int r, int c) // p4.0.3
{
emit quantChanged(quantTable[index]);
+ //emit quantChanged(quantTable[r + c * 10]);
}
//---------------------------------------------------------
diff --git a/muse2/muse/widgets/tb1.h b/muse2/muse/widgets/tb1.h
index b6d7860a..d971f9f9 100644
--- a/muse2/muse/widgets/tb1.h
+++ b/muse2/muse/widgets/tb1.h
@@ -44,6 +44,8 @@ class Toolbar1 : public Q3ToolBar {
signals:
void rasterChanged(int);
void quantChanged(int);
+ //void rasterChanged(int, int); // p4.0.3
+ //void quantChanged(int, int); //
void soloChanged(bool);
void toChanged(int);