diff options
author | Florian Jung <flo@windfisch.org> | 2011-04-24 12:39:59 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-04-24 12:39:59 +0000 |
commit | 57ffdd0790adc1460ea60310f1a3698e51b0248b (patch) | |
tree | 66bdf6e508d73932f303b23c6dacd0b6a00c9051 /muse2/muse/midiedit | |
parent | cf6951a578be0e6c5d4b550a3f2f294c33f27548 (diff) | |
parent | efac864c25429cdb853fba82484606f94fb6d4ec (diff) |
ScoreEdit doesn't inherit from MidiEditor any more, which solves
all that partlist-stuff
merged with trunk
Diffstat (limited to 'muse2/muse/midiedit')
-rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 26 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.h | 11 |
2 files changed, 26 insertions, 11 deletions
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index 47773687..ee3f658c 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -147,9 +147,24 @@ set<QString> ScoreEdit::names; // ScoreEdit //--------------------------------------------------------- -ScoreEdit::ScoreEdit(PartList* pl, QWidget* parent, const char* name, unsigned initPos) - : MidiEditor(0, 0, pl, parent, name) +ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) + : TopWin(parent, name) { + setAttribute(Qt::WA_DeleteOnClose); + + mainw = new QWidget(this); + + mainGrid = new QGridLayout(); + mainw->setLayout(mainGrid); + + mainGrid->setContentsMargins(0, 0, 0, 0); + mainGrid->setSpacing(0); + setCentralWidget(mainw); + + + + + score_canvas=new ScoreCanvas(this, mainw, 1, 1); xscroll = new QScrollBar(Qt::Horizontal, mainw); yscroll = new QScrollBar(Qt::Vertical, mainw); @@ -237,6 +252,7 @@ ScoreEdit::ScoreEdit(PartList* pl, QWidget* parent, const char* name, unsigned i QToolBar* quant_toolbar = addToolBar(tr("Quantisation settings")); + newnote_toolbar->setObjectName("Quantisation settings"); quant_toolbar->addWidget(new QLabel(tr("Quantisation:"), quant_toolbar)); QComboBox* quant_combobox = new QComboBox(this); quant_combobox->addItem("2"); // if you add or remove items from @@ -479,7 +495,7 @@ void ScoreCanvas::add_staves(PartList* pl, bool all_in_one) } -ScoreCanvas::ScoreCanvas(MidiEditor* pr, QWidget* parent_widget, +ScoreCanvas::ScoreCanvas(ScoreEdit* pr, QWidget* parent_widget, int sx, int sy) : View(parent_widget, sx, sy) { parent = pr; @@ -3382,16 +3398,12 @@ set<Part*> staff_t::parts_at_tick(unsigned tick) * o do all the song_changed(SC_EVENT_INSERTED) properly * o emit a "song-changed" signal instead of calling our * internal song_changed() function - * o must add_parts() update the part-list? * o support different keys in different tracks at the same time * calc_pos_add_list and calc_item_pos will be affected by this * calc_pos_add_list must be called before calc_item_pos then, * and calc_item_pos must respect the pos_add_list instead of * keeping its own pos_add variable (which is only an optimisation) - * o use nearest part instead of curr_part, maybe expand * o draw measure numbers - * o when moving or resizing a note, so that its end is out-of-part, - * there's strange behaviour * o tied notes don't work properly when there's a key-change in * between, for example, when a cis is tied to a des * o use timesig_t in all timesig-stuff diff --git a/muse2/muse/midiedit/scoreedit.h b/muse2/muse/midiedit/scoreedit.h index 339bf1d8..367aac5e 100644 --- a/muse2/muse/midiedit/scoreedit.h +++ b/muse2/muse/midiedit/scoreedit.h @@ -60,12 +60,15 @@ class ScoreCanvas; // ScoreEdit //--------------------------------------------------------- -class ScoreEdit : public MidiEditor +class ScoreEdit : public TopWin { Q_OBJECT private: virtual void closeEvent(QCloseEvent*); + + QGridLayout* mainGrid; + QWidget* mainw; QScrollBar* xscroll; QScrollBar* yscroll; @@ -94,7 +97,7 @@ class ScoreEdit : public MidiEditor void viewport_height_changed(int); public: - ScoreEdit(PartList*, QWidget* parent = 0, const char* name = 0, unsigned initPos = MAXINT); + ScoreEdit(QWidget* parent = 0, const char* name = 0, unsigned initPos = MAXINT); ~ScoreEdit(); static void readConfiguration(Xml&){}; //TODO does nothing static void writeConfiguration(int, Xml&){}; //TODO does nothing @@ -649,7 +652,7 @@ class ScoreCanvas : public View protected: virtual void draw(QPainter& p, const QRect& rect); - MidiEditor* parent; + ScoreEdit* parent; virtual void mousePressEvent (QMouseEvent* event); virtual void mouseMoveEvent (QMouseEvent* event); @@ -657,7 +660,7 @@ class ScoreCanvas : public View virtual void resizeEvent(QResizeEvent*); public: - ScoreCanvas(MidiEditor*, QWidget*, int, int); + ScoreCanvas(ScoreEdit*, QWidget*, int, int); ~ScoreCanvas(){}; void add_staves(PartList* pl, bool all_in_one); |