diff options
author | Tim E. Real <termtech@rogers.com> | 2010-10-30 05:56:34 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-10-30 05:56:34 +0000 |
commit | f93252011832243766a69e359a33b37e34328d7f (patch) | |
tree | f711ce49970f314a99bf67b4ca2dc325461f775c /muse2/muse | |
parent | ff3cde3dfc18ed4214a8d5f79490469216ae2f71 (diff) |
Fix Deicsonze crash and missing Organ. More work on Toolbar1 class.
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/waveedit/waveedit.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/widgets/lcombo.h | 2 | ||||
-rw-r--r-- | muse2/muse/widgets/tb1.cpp | 30 | ||||
-rw-r--r-- | muse2/muse/widgets/tb1.h | 3 |
4 files changed, 28 insertions, 11 deletions
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index 8ef2607d..270dc030 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -106,7 +106,7 @@ WaveEdit::WaveEdit(PartList* pl) connect(menuEdit, SIGNAL(activated(int)), SLOT(cmd(int))); //---------ToolBar---------------------------------- - tools = addToolBar(tr("waveedit-tools")); + tools = addToolBar(tr("Wave edit tools")); tools->addActions(undoRedo->actions()); Q3Accel* qa = new Q3Accel(this); @@ -123,7 +123,7 @@ WaveEdit::WaveEdit(PartList* pl) // ToolBar: Solo Cursor1 Cursor2 addToolBarBreak(); - tb1 = addToolBar(tr("pianoroll-tools")); + tb1 = addToolBar(tr("Pianoroll tools")); //tb1->setLabel(tr("weTools")); solo = new QToolButton(); diff --git a/muse2/muse/widgets/lcombo.h b/muse2/muse/widgets/lcombo.h index 6b0441c0..75524d0c 100644 --- a/muse2/muse/widgets/lcombo.h +++ b/muse2/muse/widgets/lcombo.h @@ -32,13 +32,13 @@ class LabelCombo : public QWidget { public slots: void clearFocus() { box->clearFocus(); } + void setCurrentIndex(int i) { box->setCurrentIndex(i); } public: LabelCombo(const QString& label, QWidget* parent, const char* name=0); void addItem(const QString& txt, const QVariant & userData = QVariant()) { box->addItem(txt, userData); } void insertItem(int index, const QString& txt, const QVariant & userData = QVariant()) { box->insertItem(index, txt, userData); } - void setCurrentIndex(int i) { box->setCurrentIndex(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 ) { box->setFocusPolicy(fp); } diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp index f65ce54b..a1847b1d 100644 --- a/muse2/muse/widgets/tb1.cpp +++ b/muse2/muse/widgets/tb1.cpp @@ -111,8 +111,8 @@ Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp) // p4.0.3 //QTableWidget* rlist = new QTableWidget(10, 3, this); //QTableWidget* qlist = new QTableWidget(8, 3, this); - QTableWidget* rlist = new QTableWidget(10, 3); - QTableWidget* qlist = new QTableWidget(8, 3); + rlist = new QTableWidget(10, 3); + qlist = new QTableWidget(8, 3); //addWidget(rlist); //addWidget(qlist); rlist->verticalHeader()->setDefaultSectionSize(22); @@ -196,6 +196,8 @@ Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp) connect(raster, SIGNAL(activated(int)), SLOT(_rasterChanged(int))); connect(quant, SIGNAL(activated(int)), SLOT(_quantChanged(int))); + //connect(rlist, SIGNAL(cellClicked(int,int)), SLOT(_rasterChanged(int, int))); + //connect(qlist, SIGNAL(cellClicked(int,int)), SLOT(_quantChanged(int,int))); //connect(to, SIGNAL(activated(int)), SIGNAL(toChanged(int))); connect(toList, SIGNAL(activated(int)), SIGNAL(toChanged(int))); connect(solo, SIGNAL(toggled(bool)), SIGNAL(soloChanged(bool))); @@ -206,18 +208,22 @@ Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp) // rasterChanged //--------------------------------------------------------- -void Toolbar1::_rasterChanged(int index) +void Toolbar1::_rasterChanged(int i) +//void Toolbar1::_rasterChanged(int r, int c) { - emit rasterChanged(rasterTable[index]); + emit rasterChanged(rasterTable[rlist->currentRow() + rlist->currentColumn() * 10]); + //emit rasterChanged(rasterTable[r + c * 10]); } //--------------------------------------------------------- // quantChanged //--------------------------------------------------------- -void Toolbar1::_quantChanged(int index) +void Toolbar1::_quantChanged(int i) +//void Toolbar1::_quantChanged(int r, int c) { - emit quantChanged(quantTable[index]); + emit quantChanged(quantTable[qlist->currentRow() + qlist->currentColumn() * 8]); + //emit quantChanged(quantTable[r + c * 8]); } //--------------------------------------------------------- @@ -267,11 +273,15 @@ void Toolbar1::setRaster(int val) for (unsigned i = 0; i < sizeof(rasterTable)/sizeof(*rasterTable); i++) { if (val == rasterTable[i]) { raster->setCurrentIndex(i); + //raster->setModelColumn(i / 10); + //raster->setCurrentIndex(i % 10); + //rlist->setCurrentCell(i % 10, i / 10); return; } } printf("setRaster(%d) not defined\n", val); - raster->setCurrentIndex(0); + //raster->setCurrentIndex(0); + rlist->setCurrentCell(0, 0); } //--------------------------------------------------------- @@ -283,11 +293,15 @@ void Toolbar1::setQuant(int val) for (unsigned i = 0; i < sizeof(quantTable)/sizeof(*quantTable); i++) { if (val == quantTable[i]) { quant->setCurrentIndex(i); + //quant->setModelColumn(i / 8); + //quant->setCurrentIndex(i % 8); + //qlist->setCurrentCell(i % 8, i / 8); return; } } printf("setQuant(%d) not defined\n", val); - quant->setCurrentIndex(0); + //quant->setCurrentIndex(0); + qlist->setCurrentCell(0, 0); } //--------------------------------------------------------- diff --git a/muse2/muse/widgets/tb1.h b/muse2/muse/widgets/tb1.h index ced2e8b8..803f55fd 100644 --- a/muse2/muse/widgets/tb1.h +++ b/muse2/muse/widgets/tb1.h @@ -19,6 +19,7 @@ class PitchLabel; class Track; class LabelCombo; class QToolButton; +class QTableWidget; //--------------------------------------------------------- // Toolbar1 @@ -30,7 +31,9 @@ class Toolbar1 : public QToolBar { // p4.0.4 PosLabel* pos; PitchLabel* pitch; LabelCombo* quant; + QTableWidget* qlist; LabelCombo* raster; + QTableWidget* rlist; bool showPitch; Q_OBJECT |