summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2010-11-19 06:34:25 +0000
committerTim E. Real <termtech@rogers.com>2010-11-19 06:34:25 +0000
commit2daa2c6057e5461f51944fd71681de0d6af637fe (patch)
treefe45cfeb981811d69e43a91a11db1103dd233118 /muse2/muse
parent33e67545f5954f18f463b0803f9dc1f440a9bd8a (diff)
Started some conversions of midieditor, pianoroll, drumedit, etc. incl. their QGridLayouts.
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/liste/listedit.cpp2
-rw-r--r--muse2/muse/master/masteredit.cpp2
-rw-r--r--muse2/muse/midiedit/drumedit.cpp11
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp15
-rw-r--r--muse2/muse/midieditor.cpp16
-rw-r--r--muse2/muse/midieditor.h7
-rw-r--r--muse2/muse/waveedit/waveedit.cpp4
7 files changed, 32 insertions, 25 deletions
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index 1879b6a8..b90fcb4f 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -507,7 +507,7 @@ ListEdit::ListEdit(PartList* pl)
mainGrid->setRowStretch(1, 100);
mainGrid->setColStretch(0, 100);
- mainGrid->addMultiCellWidget(liste, 1, 2, 0, 0);
+ mainGrid->addWidget(liste, 1, 0, 2, 1);
connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
songChanged(-1);
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index 5ec6e9b7..7f9a2f7e 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -199,7 +199,7 @@ MasterEdit::MasterEdit()
// mainGrid->addWidget(hLine(mainw), 7, 1);
mainGrid->addWidget(time2, 7, 1);
mainGrid->addWidget(hscroll, 8, 1);
- mainGrid->addMultiCellWidget(vscroll, 0, 9, 2, 2);
+ mainGrid->addWidget(vscroll, 0, 2, 10, 1);
// mainGrid->addWidget(corner, 9, 2, AlignBottom | AlignRight);
connect(tools2, SIGNAL(toolChanged(int)), canvas, SLOT(setTool(int)));
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index b8422e03..f23ae012 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -290,17 +290,18 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
mainGrid->setRowStretch(0, 100);
mainGrid->setColStretch(1, 100);
- mainGrid->addMultiCellWidget(split1, 0, 0, 0, 2);
+ mainGrid->addWidget(split1, 0, 0, 1, 3);
mainGrid->addWidget(ctrl, 1, 0);
mainGrid->addWidget(hscroll, 1, 1);
mainGrid->addWidget(corner, 1, 2, Qt::AlignBottom|Qt::AlignRight);
// mainGrid->addRowSpacing(1, hscroll->sizeHint().height());
+// mainGrid->addItem(new QSpacerItem(0, hscroll->sizeHint().height()), 1, 0);
split2 = new Splitter(Qt::Horizontal, split1, "split2");
split1w1 = new QWidget(split2, "split1w1");
QWidget* split1w2 = new QWidget(split2, "split1w2");
- Q3GridLayout* gridS1 = new Q3GridLayout(split1w1);
- Q3GridLayout* gridS2 = new Q3GridLayout(split1w2);
+ QGridLayout* gridS1 = new QGridLayout(split1w1);
+ QGridLayout* gridS2 = new QGridLayout(split1w2);
time = new MTScale(&_raster, split1w2, xscale);
canvas = new DrumCanvas(this, split1w2, xscale, yscale);
vscroll = new ScrollScale(-4, 1, yscale, DRUM_MAPSIZE*TH, Qt::Vertical, split1w2);
@@ -322,8 +323,8 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
gridS2->setRowStretch(1, 100);
gridS2->setColStretch(0, 100);
- gridS2->addMultiCellWidget(time, 0, 0, 0, 1);
- gridS2->addMultiCellWidget(hLine(split1w2), 1, 1, 0, 1);
+ gridS2->addWidget(time, 0, 0, 1, 2);
+ gridS2->addWidget(hLine(split1w2), 1, 0, 1, 2);
gridS2->addWidget(canvas, 2, 0);
gridS2->addWidget(vscroll, 2, 1);
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index 85057bba..7d93c582 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -243,14 +243,17 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
mainGrid->setRowStretch(0, 100);
mainGrid->setColStretch(1, 100);
- mainGrid->addMultiCellWidget(splitter, 0, 0, 0, 2);
+ mainGrid->addWidget(splitter, 0, 0, 1, 3);
mainGrid->addWidget(ctrl, 1, 0);
mainGrid->addWidget(hscroll, 1, 1);
mainGrid->addWidget(corner, 1, 2, Qt::AlignBottom|Qt::AlignRight);
- mainGrid->addRowSpacing(1, hscroll->sizeHint().height());
-
+
+ //mainGrid->addRowSpacing(1, hscroll->sizeHint().height());
+ mainGrid->addItem(new QSpacerItem(0, hscroll->sizeHint().height()), 1, 0);
+
QWidget* split1 = new QWidget(splitter, "split1");
QGridLayout* gridS1 = new QGridLayout(split1);
+ gridS1->setContentsMargins(0, 0, 0, 0);
time = new MTScale(&_raster, split1, xscale);
Piano* piano = new Piano(split1, yscale);
canvas = new PianoCanvas(this, split1, xscale, yscale);
@@ -266,8 +269,8 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
gridS1->setRowStretch(2, 100);
gridS1->setColStretch(1, 100);
- gridS1->addMultiCellWidget(time, 0, 0, 1, 2);
- gridS1->addMultiCellWidget(hLine(split1), 1, 1, 0, 2);
+ gridS1->addWidget(time, 0, 1, 1, 2);
+ gridS1->addWidget(hLine(split1), 1, 0, 1, 3);
gridS1->addWidget(piano, 2, 0);
gridS1->addWidget(canvas, 2, 1);
@@ -318,7 +321,7 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
connect(song, SIGNAL(songChanged(int)), SLOT(songChanged1(int)));
- setCaption(canvas->getCaption());
+ setWindowTitle(canvas->getCaption());
updateHScrollRange();
// connect to toolbar
diff --git a/muse2/muse/midieditor.cpp b/muse2/muse/midieditor.cpp
index 60a95643..58cf3d5e 100644
--- a/muse2/muse/midieditor.cpp
+++ b/muse2/muse/midieditor.cpp
@@ -10,11 +10,10 @@
#include "waveedit/waveview.h"
#include "scrollscale.h"
#include "mtscale.h"
-#include <qlayout.h>
-#include <qrect.h>
-#include <qcolor.h>
-//Added by qt3to4:
-#include <Q3GridLayout>
+#include <QLayout>
+#include <QRect>
+#include <QColor>
+#include <QGridLayout>
#include "xml.h"
#include "part.h"
#include "track.h"
@@ -37,7 +36,12 @@ MidiEditor::MidiEditor(int q, int r, PartList* pl,
wview = 0;
_curDrumInstrument = -1;
mainw = new QWidget(this);
- mainGrid = new Q3GridLayout(mainw);
+
+ ///mainGrid = new QGridLayout(mainw);
+ mainGrid = new QGridLayout();
+ mainw->setLayout(mainGrid);
+
+ mainGrid->setContentsMargins(0, 0, 0, 0);
setCentralWidget(mainw);
}
diff --git a/muse2/muse/midieditor.h b/muse2/muse/midieditor.h
index 16520698..ee98239c 100644
--- a/muse2/muse/midieditor.h
+++ b/muse2/muse/midieditor.h
@@ -10,12 +10,11 @@
#include "sig.h"
#include "cobject.h"
-//Added by qt3to4:
-#include <Q3GridLayout>
+//#include <QGridLayout>
class PartList;
class Xml;
-class Q3GridLayout;
+class QGridLayout;
class QWidget;
class QColor;
class EventCanvas;
@@ -46,7 +45,7 @@ class MidiEditor : public TopWin {
std::list<CtrlEdit*> ctrlEditList;
int _quant, _raster;
- Q3GridLayout* mainGrid;
+ QGridLayout* mainGrid;
QWidget* mainw;
virtual void readStatus(Xml&);
virtual void writeStatus(int, Xml&) const;
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 270dc030..2ab7188c 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -173,8 +173,8 @@ WaveEdit::WaveEdit(PartList* pl)
mainGrid->setRowStretch(0, 100);
mainGrid->setColStretch(0, 100);
- mainGrid->addMultiCellWidget(time, 0, 0, 0, 1);
- mainGrid->addMultiCellWidget(hLine(mainw), 1, 1, 0, 1);
+ mainGrid->addWidget(time, 0, 0, 1, 2);
+ mainGrid->addWidget(hLine(mainw), 1, 0, 1, 2);
mainGrid->addWidget(view, 2, 0);
mainGrid->addWidget(ymag, 2, 1);
mainGrid->addWidget(hscroll, 3, 0);