From 03b22522651de83a45494a2745f05b7a19ecb3d7 Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Sat, 5 Mar 2011 20:32:44 +0000 Subject: tweaks here and tweaks there --- muse2/ChangeLog | 8 + muse2/muse/app.cpp | 12 +- muse2/muse/arranger/arranger.cpp | 37 + muse2/muse/arranger/arranger.h | 1 + muse2/muse/arranger/pcanvas.cpp | 5 +- muse2/muse/conf.cpp | 23 + muse2/muse/midiedit/dcanvas.cpp | 11 - muse2/muse/midiedit/drumedit.cpp | 14 +- muse2/muse/midiedit/pianoroll.cpp | 21 +- muse2/muse/shortcuts.cpp | 6 +- muse2/muse/songfile.cpp | 7 + muse2/muse/synth.h | 2 + muse2/muse/track.cpp | 2 +- muse2/muse/track.h | 7 +- muse2/muse/widgets/mtrackinfobase.ui | 1628 +++++++++++++++--------------- muse2/muse/widgets/shortcutconfig.cpp | 7 + muse2/muse/widgets/shortcutconfig.h | 4 +- muse2/muse/widgets/shortcutconfigbase.ui | 22 +- muse2/muse/widgets/visibletracks.cpp | 14 + muse2/muse/widgets/visibletracks.h | 1 + 20 files changed, 971 insertions(+), 861 deletions(-) diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 7cdc9fe1..54435102 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,11 @@ +05.03.2011: + - Store toolbuttons in song file (rj) + - Fixed issue with opening editors (rj) + - Zoom shortcuts in arranger (rj) + - detect samplerate and warn if samplerate isn't same in song and system (rj) + - adjust columns and store size of shortcut dialog (rj) + - Fixed up some missing keyboard accelerators for menus (rj) + 01.03.2011: - Added feature to show/hide track-types from arranger, this far only with toolbuttons and no persistent storage (rj) diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 0a8bb658..0b4a91bd 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1378,8 +1378,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() // popup View //------------------------------------------------------------- - menuView = menuBar()->addMenu(tr("View")); - //menuView->setCheckable(true);// not necessary with Qt4 + menuView = menuBar()->addMenu(tr("&View")); menuView->addAction(viewTransportAction); menuView->addAction(viewBigtimeAction); @@ -1442,7 +1441,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() // popup Automation //------------------------------------------------------------- - menuAutomation = menuBar()->addMenu(tr("Automation")); + menuAutomation = menuBar()->addMenu(tr("A&utomation")); menuAutomation->addAction(autoMixerAction); menuAutomation->addSeparator(); menuAutomation->addAction(autoSnapshotAction); @@ -1452,7 +1451,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow() // popup Settings //------------------------------------------------------------- - menuSettings = menuBar()->addMenu(tr("Settings")); + menuSettings = menuBar()->addMenu(tr("S&ettings")); menuSettings->addAction(settingsGlobalAction); menuSettings->addAction(settingsShortcutsAction); menuSettings->addMenu(follow); @@ -1705,6 +1704,8 @@ void MusE::loadProjectFile(const QString& name, bool songTemplate, bool loadAll) if (song->getSongInfo().length()>0) startSongInfo(false); + + visTracks->updateVisibleTracksButtons(); progress->setValue(100); delete progress; progress=0; @@ -3323,7 +3324,6 @@ bool MusE::saveAs() { QString name; if (museProject == museProjectInitPath ) { - printf("config.useProjectSaveDialog=%d\n", config.useProjectSaveDialog); if (config.useProjectSaveDialog) { ProjectCreateImpl pci(muse); if (pci.exec() == QDialog::Rejected) { @@ -3531,7 +3531,6 @@ void MusE::startWaveEditor(PartList* pl) //--------------------------------------------------------- void MusE::startSongInfo(bool editable) { - printf("startSongInfo!!!!\n"); SongInfoWidget info; info.songInfoText->setPlainText(song->getSongInfo()); info.songInfoText->setReadOnly(!editable); @@ -3549,7 +3548,6 @@ void MusE::startSongInfo(bool editable) void MusE::showDidYouKnowDialog() { if ((bool)config.showDidYouKnow == true) { - printf("show did you know dialog!!!!\n"); DidYouKnowWidget dyk; dyk.tipText->setText("To get started with MusE why don't you try some demo songs available at http://demos.muse-sequencer.org/"); dyk.show(); diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 06f8b472..495c4cb8 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -52,6 +52,7 @@ #include "gconfig.h" #include "mixer/astrip.h" #include "spinbox.h" +#include "shortcuts.h" //--------------------------------------------------------- // Arranger::setHeaderToolTips @@ -1065,3 +1066,39 @@ int WidgetStack::minimumHeight() const return minimumSizeHint().height(); } */ + +void Arranger::keyPressEvent(QKeyEvent* event) +{ + int key = event->key(); + if (((QInputEvent*)event)->modifiers() & Qt::ShiftModifier) + key += Qt::SHIFT; + if (((QInputEvent*)event)->modifiers() & Qt::AltModifier) + key += Qt::ALT; + if (((QInputEvent*)event)->modifiers() & Qt::ControlModifier) + key+= Qt::CTRL; + + if (key == shortcuts[SHRT_ZOOM_IN].key) { + int mag = hscroll->mag(); + int zoomlvl = ScrollScale::getQuickZoomLevel(mag); + if (zoomlvl < 23) + zoomlvl++; + + int newmag = ScrollScale::convertQuickZoomLevelToMag(zoomlvl); + + hscroll->setMag(newmag); + return; + } + else if (key == shortcuts[SHRT_ZOOM_OUT].key) { + int mag = hscroll->mag(); + int zoomlvl = ScrollScale::getQuickZoomLevel(mag); + if (zoomlvl > 1) + zoomlvl--; + + int newmag = ScrollScale::convertQuickZoomLevelToMag(zoomlvl); + + hscroll->setMag(newmag); + return; + } + + QWidget::keyPressEvent(event); +} diff --git a/muse2/muse/arranger/arranger.h b/muse2/muse/arranger/arranger.h index 7ef79463..0143afd5 100644 --- a/muse2/muse/arranger/arranger.h +++ b/muse2/muse/arranger/arranger.h @@ -137,6 +137,7 @@ class Arranger : public QWidget { protected: virtual void wheelEvent(QWheelEvent* e); + virtual void keyPressEvent(QKeyEvent* event); public slots: void dclickPart(Track*); diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 43045987..0317d99e 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -1203,7 +1203,6 @@ void PartCanvas::keyPress(QKeyEvent* event) emit selectTrackBelow(); return; } - // // Shortcuts that require selected parts from here // @@ -2880,6 +2879,8 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect) break; Track* track = *it; th = track->height(); + if (!th) + continue; ///if (/*config.canvasShowGrid ||*/ !track->isMidiTrack()) { if (config.canvasShowGrid && (track->isMidiTrack() || track->type() == Track::WAVE)) // Tim. { @@ -2925,6 +2926,8 @@ void PartCanvas::drawTopItem(QPainter& p, const QRect& rect) break; Track* track = *it; th = track->height(); + if (!th) + continue; if (!track->isMidiTrack()) { // draw automation QRect r = rect & QRect(x, yy, w, track->height()); drawAutomation(p, r, (AudioTrack*)track); diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp index e4d57a3a..514afaa4 100644 --- a/muse2/muse/conf.cpp +++ b/muse2/muse/conf.cpp @@ -42,6 +42,7 @@ #include "wave.h" #include "midiseq.h" #include "amixer.h" +#include "track.h" extern void writeMidiTransforms(int level, Xml& xml); extern void readMidiTransform(Xml&); @@ -734,6 +735,20 @@ void readConfiguration(Xml& xml, bool readOnlySequencer) midiFilterCtrl3 = xml.parseInt(); else if (tag == "midiFilterCtrl4") midiFilterCtrl4 = xml.parseInt(); + else if (tag == "waveTracksVisible") + WaveTrack::setVisible((bool)xml.parseInt()); + else if (tag == "auxTracksVisible") + AudioAux::setVisible((bool)xml.parseInt()); + else if (tag == "groupTracksVisible") + AudioGroup::setVisible((bool)xml.parseInt()); + else if (tag == "midiTracksVisible") + MidiTrack::setVisible((bool)xml.parseInt()); + else if (tag == "inputTracksVisible") + AudioInput::setVisible((bool)xml.parseInt()); + else if (tag == "outputTracksVisible") + AudioOutput::setVisible((bool)xml.parseInt()); + else if (tag == "synthTracksVisible") + SynthI::setVisible((bool)xml.parseInt()); else if (tag == "bigtimeVisible") config.bigTimeVisible = xml.parseInt(); else if (tag == "transportVisible") @@ -1360,6 +1375,14 @@ void MusE::writeConfiguration(int level, Xml& xml) const xml.intTag(level, "midiFilterCtrl2", midiFilterCtrl2); xml.intTag(level, "midiFilterCtrl3", midiFilterCtrl3); xml.intTag(level, "midiFilterCtrl4", midiFilterCtrl4); + + xml.intTag(level, "waveTracksVisible", WaveTrack::visible()); + xml.intTag(level, "auxTracksVisible", AudioAux::visible()); + xml.intTag(level, "groupTracksVisible", AudioGroup::visible()); + xml.intTag(level, "midiTracksVisible", MidiTrack::visible()); + xml.intTag(level, "inputTracksVisible", AudioInput::visible()); + xml.intTag(level, "outputTracksVisible", AudioOutput::visible()); + xml.intTag(level, "synthTracksVisible", SynthI::visible()); // Removed by Tim. p3.3.6 //xml.intTag(level, "txDeviceId", txDeviceId); diff --git a/muse2/muse/midiedit/dcanvas.cpp b/muse2/muse/midiedit/dcanvas.cpp index 623a2734..713ac6cd 100644 --- a/muse2/muse/midiedit/dcanvas.cpp +++ b/muse2/muse/midiedit/dcanvas.cpp @@ -988,17 +988,6 @@ int DrumCanvas::pasteAt(const QString& pt, int pos) void DrumCanvas::paste() { -/* -// Q3CString subtype("eventlist"); // ddskrjo - QString subtype("eventlist"); - QMimeSource* ms = QApplication::clipboard()->data(); - QString pt; - if (!Q3TextDrag::decode(ms, pt, subtype)) { - printf("cannot paste: bad data type\n"); - return; - } - pasteAt(pt, song->cpos()); -*/ QString stype("x-muse-eventlist"); //QString s = QApplication::clipboard()->text(stype, QClipboard::Selection); diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp index 563f7eda..ae13734a 100644 --- a/muse2/muse/midiedit/drumedit.cpp +++ b/muse2/muse/midiedit/drumedit.cpp @@ -447,18 +447,17 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini canvas->setPos(0, cpos.tick(), true); canvas->selectAtTick(cpos.tick()); //canvas->selectFirst(); - - if(canvas->track()) - toolbar->setSolo(canvas->track()->solo()); - unsigned pos; + unsigned pos=0; if(initPos >= MAXINT) pos = song->cpos(); - else - pos = initPos; if(pos > MAXINT) pos = MAXINT; - hscroll->setOffset((int)pos); + if (pos) + hscroll->setOffset((int)pos); + + if(canvas->track()) + toolbar->setSolo(canvas->track()->solo()); QSettings settings("MusE", "MusE-qt"); //restoreGeometry(settings.value("Drumedit/geometry").toByteArray()); @@ -1103,6 +1102,7 @@ void DrumEdit::keyPressEvent(QKeyEvent* event) zoomlvl++; int newmag = ScrollScale::convertQuickZoomLevelToMag(zoomlvl); + hscroll->setMag(newmag); //printf("mag = %d zoomlvl = %d newmag = %d\n", mag, zoomlvl, newmag); return; diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp index 981770fd..313a6d14 100644 --- a/muse2/muse/midiedit/pianoroll.cpp +++ b/muse2/muse/midiedit/pianoroll.cpp @@ -532,22 +532,21 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i const Pos cpos=song->cPos(); canvas->setPos(0, cpos.tick(), true); canvas->selectAtTick(cpos.tick()); - //canvas->selectFirst(); -// - if(canvas->track()) - { - updateTrackInfo(); - toolbar->setSolo(canvas->track()->solo()); - } + //canvas->selectFirst();// - unsigned pos; + unsigned pos=0; if(initPos >= MAXINT) pos = song->cpos(); - else - pos = initPos; if(pos > MAXINT) pos = MAXINT; - hscroll->setOffset((int)pos); + if (pos) + hscroll->setOffset((int)pos); + + if(canvas->track()) + { + updateTrackInfo(); + toolbar->setSolo(canvas->track()->solo()); + } QSettings settings("MusE", "MusE-qt"); //restoreGeometry(settings.value("Pianoroll/geometry").toByteArray()); diff --git a/muse2/muse/shortcuts.cpp b/muse2/muse/shortcuts.cpp index c0edc0ac..5aacf085 100644 --- a/muse2/muse/shortcuts.cpp +++ b/muse2/muse/shortcuts.cpp @@ -158,15 +158,15 @@ void initShortCuts() defShrt(SHRT_SELECT_NEXT_PART, Qt::ALT + Qt::Key_Right, "Edit: Select next part", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_nxt_prt"); defShrt(SHRT_SEL_LEFT, Qt::Key_Left, "Edit: Select nearest part/event to the left", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "sel_left"); defShrt(SHRT_SEL_LEFT_ADD, Qt::Key_Left + Qt::SHIFT, "Edit: Add nearest part/event to the left to selection", PROLL_SHRT + DEDIT_SHRT, "sel_left_add"); - defShrt(SHRT_SEL_RIGHT, Qt::Key_Right, "Edit: Select nearest part/event to the left", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,"sel_right"); + defShrt(SHRT_SEL_RIGHT, Qt::Key_Right, "Edit: Select nearest part/event to the right", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT,"sel_right"); defShrt(SHRT_SEL_RIGHT_ADD, Qt::Key_Right + Qt::SHIFT, "Edit: Add nearest part/event to the right to selection", PROLL_SHRT + DEDIT_SHRT,"sel_right_add"); defShrt(SHRT_LOCATORS_TO_SELECTION, Qt::ALT + Qt::Key_P, "Edit: Set locators to selection", ARRANG_SHRT + PROLL_SHRT + DEDIT_SHRT, "loc_to_sel"); defShrt(SHRT_INC_PITCH, Qt::CTRL + Qt::Key_Up, "Edit: Increase pitch", PROLL_SHRT + DEDIT_SHRT, "sel_inc_pitch"); defShrt(SHRT_DEC_PITCH, Qt::CTRL + Qt::Key_Down, "Edit: Decrease pitch", PROLL_SHRT + DEDIT_SHRT, "sel_dec_pitch"); defShrt(SHRT_INC_POS, Qt::CTRL + Qt::Key_Right, "Edit: Increase event position", PROLL_SHRT + DEDIT_SHRT, "sel_inc_pos"); defShrt(SHRT_DEC_POS, Qt::CTRL + Qt::Key_Left, "Edit: Decrease event position", PROLL_SHRT + DEDIT_SHRT, "sel_dec_pos"); - defShrt(SHRT_ZOOM_IN, Qt::CTRL + Qt::Key_PageUp, "View: Zoom in", PROLL_SHRT + DEDIT_SHRT, "zoom_in"); - defShrt(SHRT_ZOOM_OUT, Qt::CTRL + Qt::Key_PageDown, "View: Zoom out", PROLL_SHRT + DEDIT_SHRT, "zoom_out"); + defShrt(SHRT_ZOOM_IN, Qt::CTRL + Qt::Key_PageUp, "View: Zoom in", PROLL_SHRT + DEDIT_SHRT + ARRANG_SHRT, "zoom_in"); + defShrt(SHRT_ZOOM_OUT, Qt::CTRL + Qt::Key_PageDown, "View: Zoom out", PROLL_SHRT + DEDIT_SHRT + ARRANG_SHRT, "zoom_out"); defShrt(SHRT_GOTO_CPOS, Qt::Key_C, "View: Goto Current Position", PROLL_SHRT + DEDIT_SHRT, "goto_cpos"); defShrt(SHRT_SCROLL_LEFT, Qt::Key_H, "View: Scroll left", PROLL_SHRT + DEDIT_SHRT, "scroll_left"); defShrt(SHRT_SCROLL_RIGHT, Qt::Key_L, "View: Scroll left", PROLL_SHRT + DEDIT_SHRT, "scroll_right"); diff --git a/muse2/muse/songfile.cpp b/muse2/muse/songfile.cpp index 973bcc57..1e8a849b 100644 --- a/muse2/muse/songfile.cpp +++ b/muse2/muse/songfile.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "app.h" #include "song.h" @@ -1246,6 +1247,11 @@ void Song::read(Xml& xml) _len = xml.parseInt(); else if (tag == "follow") _follow = FollowMode(xml.parseInt()); + else if (tag == "sampleRate") { + int sRate = xml.parseInt(); + if (sRate != sampleRate) + QMessageBox::warning(muse,"Wrong sample rate", "The sample rate in this project and the current system setting differs, the project may not work as intended!"); + } else if (tag == "tempolist") { tempomap.read(xml); } @@ -1436,6 +1442,7 @@ void Song::write(int level, Xml& xml) const xml.intTag(level, "quantize", _quantize); xml.intTag(level, "len", _len); xml.intTag(level, "follow", _follow); + xml.intTag(level, "sampleRate", sampleRate); if (_globalPitchShift) xml.intTag(level, "globalPitchShift", _globalPitchShift); diff --git a/muse2/muse/synth.h b/muse2/muse/synth.h index 9053f7af..648a42f8 100644 --- a/muse2/muse/synth.h +++ b/muse2/muse/synth.h @@ -249,6 +249,8 @@ class SynthI : public AudioTrack, public MidiDevice, virtual bool hasAuxSend() const { return true; } static void setVisible(bool t) { _isVisible = t; } virtual int height() const; + static bool visible() { return _isVisible; } + }; //--------------------------------------------------------- diff --git a/muse2/muse/track.cpp b/muse2/muse/track.cpp index 6f83357a..2a93968d 100644 --- a/muse2/muse/track.cpp +++ b/muse2/muse/track.cpp @@ -19,7 +19,7 @@ #include "route.h" bool MidiTrack::_isVisible=true; -bool Track::_isVisible=true; +//bool Track::_isVisible=true; unsigned int Track::_soloRefCnt = 0; Track* Track::_tmpSoloChainTrack = 0; diff --git a/muse2/muse/track.h b/muse2/muse/track.h index dbd6bbcf..ba42bd36 100644 --- a/muse2/muse/track.h +++ b/muse2/muse/track.h @@ -45,7 +45,6 @@ class Track { PartList _parts; void init(); - static bool _isVisible; protected: static unsigned int _soloRefCnt; @@ -273,6 +272,7 @@ class MidiTrack : public Track { virtual bool canRecord() const { return true; } static void setVisible(bool t) { _isVisible = t; } + static bool visible() { return _isVisible; } }; //--------------------------------------------------------- @@ -451,6 +451,7 @@ class AudioInput : public AudioTrack { virtual bool hasAuxSend() const { return true; } static void setVisible(bool t) { _isVisible = t; } virtual int height() const; + static bool visible() { return _isVisible; } }; //--------------------------------------------------------- @@ -489,6 +490,7 @@ class AudioOutput : public AudioTrack { float** monitorBuffer() { return _monitorBuffer; } static void setVisible(bool t) { _isVisible = t; } + static bool visible() { return _isVisible; } virtual int height() const; }; @@ -508,6 +510,7 @@ class AudioGroup : public AudioTrack { virtual bool hasAuxSend() const { return true; } static void setVisible(bool t) { _isVisible = t; } virtual int height() const; + static bool visible() { return _isVisible; } }; //--------------------------------------------------------- @@ -530,6 +533,7 @@ class AudioAux : public AudioTrack { float** sendBuffer() { return buffer; } static void setVisible(bool t) { _isVisible = t; } virtual int height() const; + static bool visible() { return _isVisible; } }; //--------------------------------------------------------- @@ -567,6 +571,7 @@ class WaveTrack : public AudioTrack { virtual bool canRecord() const { return true; } static void setVisible(bool t) { _isVisible = t; } virtual int height() const; + static bool visible() { return _isVisible; } }; //--------------------------------------------------------- diff --git a/muse2/muse/widgets/mtrackinfobase.ui b/muse2/muse/widgets/mtrackinfobase.ui index ca431c8b..0ecf7c10 100644 --- a/muse2/muse/widgets/mtrackinfobase.ui +++ b/muse2/muse/widgets/mtrackinfobase.ui @@ -6,8 +6,8 @@ 0 0 - 114 - 361 + 96 + 588 @@ -28,6 +28,12 @@ 32767 + + + Arial + 7 + + MusE: TrackInfo @@ -37,898 +43,926 @@ - - - QLayout::SetDefaultConstraint - - + + 0 - + 0 - - - - - 0 - 0 - - - - true - - - - - - - - 0 - 0 - - - - output port - - - - - - - - 0 - 0 - - - - output channel - - - all midi events are sent to this output channel - - - 16 - - - 1 - - - - - - - - 0 - 0 - - - - Out ch - - - false - - - 0 - - - 1 - - - - - + + 0 - + - + 0 0 - - input routing - - - iR + + true - + - + 0 0 - output routing - - - oR + output port - - - - - - 0 - - - - - 0 - 0 - - - - input detect - - - Input detect indicator. Detects all note on-off, controller, aftertouch, + + + 0 + + + + + + 0 + 0 + + + + output channel + + + all midi events are sent to this output channel + + + false + + + 1 + + + 16 + + + + + + + + 0 + 0 + + + + Out ch + + + false + + + 0 + + + 1 + + + + + + + + + 0 + + + + + + 0 + 0 + + + + input routing + + + iR + + + + + + + + 0 + 0 + + + + output routing + + + oR + + + + + + + + 0 + 0 + + + + input detect + + + Input detect indicator. Detects all note on-off, controller, aftertouch, program change, and pitchbend (but not sysex or realtime) events on the selected channels, on the selected midi ports. - - - W - - - Qt::AlignCenter - - - false - - - 2 - - - -1 - - + + + W + + + Qt::AlignCenter + + + false + + + 2 + + + -1 + + + + + + + + 0 + 0 + + + + Midi thru + + + Pass input events through ('thru') to output. + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 13 + 13 + + + + + - - - - 0 - 0 - - - - Midi thru - - - Pass input events through ('thru') to output. - - - true - - + + + 0 + + + + + + 0 + 0 + + + + false + + + off + + + -127 + + + 127 + + + 1 + + + + + + + + 0 + 0 + + + + Transp. + + + false + + + 2 + + + + - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 2 - 2 - - - + + + 0 + + + + + + 0 + 0 + + + + false + + + off + + + -1000 + + + 1000 + + + + + + + + 0 + 0 + + + + Delay + + + false + + + 2 + + + + - - - - - - - 0 - 0 - - - - off - - - 127 - - - -127 - - - 1 - - - - - - - - 0 - 0 - - - - Transp. - - - false - - - 2 - - - - - - - - 0 - 0 - - - - off - - - 1000 - - - -1000 - - - - - - - - 0 - 0 - - - - Delay - - - false - - - 2 - - - - - - - - 0 - 0 - - - - % - - - 200 - - - 25 - - - 100 - - - - - - - - 0 - 0 - - - - Length - - - false - - - 2 - - - - - - - - 0 - 0 - - - - 127 - - - -127 - - - 0 - - - - - - - - 0 - 0 - - - - Velocity - - - false - - - 0 - - - - - - - - 0 - 0 - - - - - - - % - - - 200 - - - 25 - - - 100 - - - - - - - - 0 - 0 - - - - Compr. - - - false - - - 2 - - - - - - - - 0 - 0 - - - - QFrame::WinPanel - - - QFrame::Raised - - - 1 - - - 1 - - - Channel Info - - - Qt::AlignCenter - - - false - - - - - - - - 0 - 0 - - - - Select instrument patch - - - <unknown> - - - - - - - - 0 - 0 - - - - Rec: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - - - - - 0 - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 2 - 2 - - - + + + 0 + + + + + + 0 + 0 + + + + false + + + % + + + 25 + + + 200 + + + 100 + + + + + + + + 0 + 0 + + + + Length + + + false + + + 2 + + + + + + + + + 0 + + + + + + 0 + 0 + + + + + 8 + 5 + + + + false + + + -127 + + + 127 + + + 0 + + + + + + + + 0 + 0 + + + + Velocity + + + false + + + 0 + + + + - + + + 0 + + + + + + 0 + 0 + + + + false + + + % + + + + + + 25 + + + 200 + + + 100 + + + + + + + + 0 + 0 + + + + Compr. + + + false + + + 2 + + + + + + + - + 0 0 - - Add all settings to song + + QFrame::WinPanel - - All + + QFrame::Raised - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding + + 1 - - - 2 - 2 - + + 1 - - - - - - - - - 0 - 0 - - - - Bank Select MSB. Double-click on/off. - - - off - - - 128 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - 1 - - - H-Bank - - - false - - - 0 - - - 2 - - - - - - - - 0 - 0 - - - - Bank Select LSB. Double-click on/off. - - - off - - - 128 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - 1 - - - L-Bank - - - false - - - 0 - - - 2 - - - - - - - - 0 - 0 - - - - Program. Double-click on/off. - - - off - - - 128 - - - 0 - - - 0 - - - - - - - 0 - - - 0 - - - - - Qt::Horizontal + + Channel Info - - QSizePolicy::Minimum + + Qt::AlignCenter - - - 2 - 2 - + + false - + - + - + 0 0 - Add bank + prog settings to song + Select instrument patch - Prog + <unknown> - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 2 - 2 - - - + + + 0 + + + + + + 0 + 0 + + + + Rec: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + Add all settings to song + + + All + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 2 + 2 + + + + + - - - - - - - 0 - 0 - - - - Volume. Double-click on/off. - - - off - - - 127 - - - -1 - - - -1 - - - - - - - 0 - - - 0 - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 2 - 2 - - - + + + 0 + + + + + + 0 + 0 + + + + Bank Select MSB. Double-click on/off. + + + false + + + off + + + 0 + + + 128 + + + 0 + + + + + + + + 0 + 0 + + + + 1 + + + H-Bank + + + false + + + 0 + + + 2 + + + + - - - - 0 - 0 - - - - Add vol setting to song - - - Vol - - + + + 0 + + + + + + 0 + 0 + + + + Bank Select LSB. Double-click on/off. + + + false + + + off + + + 0 + + + 128 + + + 0 + + + + + + + + 0 + 0 + + + + 1 + + + L-Bank + + + false + + + 0 + + + 2 + + + + - - - Qt::Horizontal + + + 0 - - QSizePolicy::Expanding - - - - 2 - 2 - - - + + 0 + + + + + + 0 + 0 + + + + Program. Double-click on/off. + + + false + + + off + + + 0 + + + 128 + + + 0 + + + + + + + + 0 + 0 + + + + Add bank + prog settings to song + + + Prog + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 2 + 2 + + + + + - - - - - - - 0 - 0 - - - - Change stereo position. Double-click on/off. - - - Change stereo position. Double-click on/off. - - - off - - - 63 - - - -65 - - - -65 - - - - - - - 0 - - - 0 - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 2 - 2 - + + + 0 - + + 0 + + + + + + 0 + 0 + + + + Volume. Double-click on/off. + + + false + + + off + + + -1 + + + 127 + + + -1 + + + + + + + + 0 + 0 + + + + Add vol setting to song + + + Vol + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 2 + 2 + + + + + - - - - 0 - 0 - + + + 0 - - Add pan setting to song - - - Pan - - + + 0 + + + + + + 0 + 0 + + + + Change stereo position. Double-click on/off. + + + Change stereo position. Double-click on/off. + + + false + + + off + + + -65 + + + 63 + + + -65 + + + + + + + + 0 + 0 + + + + Add pan setting to song + + + Pan + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 2 + 2 + + + + + - + - Qt::Horizontal + Qt::Vertical QSizePolicy::Expanding - 2 - 2 + 18 + 13 - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - SpinBox - QWidget + QSpinBox
spinbox.h
diff --git a/muse2/muse/widgets/shortcutconfig.cpp b/muse2/muse/widgets/shortcutconfig.cpp index 78162f50..80d0290f 100644 --- a/muse2/muse/widgets/shortcutconfig.cpp +++ b/muse2/muse/widgets/shortcutconfig.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include "shortcutconfig.h" #include "shortcutcapturedialog.h" @@ -21,6 +22,9 @@ ShortcutConfig::ShortcutConfig(QWidget* parent) : QDialog(parent) { setupUi(this); + QSettings settings("MusE", "MusE-qt"); + restoreGeometry(settings.value("ShortcutConfig/geometry").toByteArray()); + connect(cgListView, SIGNAL(itemActivated(QTreeWidgetItem*, int )), this, SLOT(categorySelChanged(QTreeWidgetItem*, int))); connect(scListView, SIGNAL(itemActivated(QTreeWidgetItem*, int )), @@ -46,6 +50,7 @@ ShortcutConfig::ShortcutConfig(QWidget* parent) if(selItem) cgListView->setCurrentItem(selItem); // Tim updateSCListView(); + } void ShortcutConfig::updateSCListView(int category) @@ -116,6 +121,8 @@ void ShortcutConfig::shortcutSelChanged(QTreeWidgetItem* in_item, int /*column*/ void ShortcutConfig::closeEvent(QCloseEvent* /*e*/) // prevent compiler warning : unused variable { + QSettings settings("MusE", "MusE-qt"); + settings.setValue("ShortcutConfig/geometry", saveGeometry()); done(_config_changed); } diff --git a/muse2/muse/widgets/shortcutconfig.h b/muse2/muse/widgets/shortcutconfig.h index 0cc11dd7..f68bfd5a 100644 --- a/muse2/muse/widgets/shortcutconfig.h +++ b/muse2/muse/widgets/shortcutconfig.h @@ -19,8 +19,8 @@ class QCloseEvent; #define SHRT_CATEGORY_COL 0 enum { - SHRT_DESCR_COL = 0, - SHRT_SHRTCUT_COL + SHRT_SHRTCUT_COL = 0, + SHRT_DESCR_COL, }; class SCListViewItem : public QTreeWidgetItem { diff --git a/muse2/muse/widgets/shortcutconfigbase.ui b/muse2/muse/widgets/shortcutconfigbase.ui index 892cc7c3..119a7007 100644 --- a/muse2/muse/widgets/shortcutconfigbase.ui +++ b/muse2/muse/widgets/shortcutconfigbase.ui @@ -47,12 +47,6 @@ Shortcut Category - - true - - - false - @@ -72,24 +66,12 @@ - Description - - - true - - - true + Shortcut - Shortcut - - - true - - - true + Description diff --git a/muse2/muse/widgets/visibletracks.cpp b/muse2/muse/widgets/visibletracks.cpp index b2a88d1c..e261c274 100644 --- a/muse2/muse/widgets/visibletracks.cpp +++ b/muse2/muse/widgets/visibletracks.cpp @@ -67,6 +67,20 @@ VisibleTracks::VisibleTracks(QWidget* parent, const char*) connect(action, SIGNAL(selected(QAction*)), SLOT(visibilityChanged(QAction*))); } + +//--------------------------------------------------------- +// updateVisibleTracksButtons +//--------------------------------------------------------- +void VisibleTracks::updateVisibleTracksButtons() +{ + actions[0]->setChecked(WaveTrack::visible()); + actions[1]->setChecked(AudioGroup::visible()); + actions[2]->setChecked(AudioAux::visible()); + actions[3]->setChecked(AudioInput::visible()); + actions[4]->setChecked(AudioOutput::visible()); + actions[5]->setChecked(MidiTrack::visible()); + actions[6]->setChecked(SynthI::visible()); +} //--------------------------------------------------------- // toolChanged //--------------------------------------------------------- diff --git a/muse2/muse/widgets/visibletracks.h b/muse2/muse/widgets/visibletracks.h index 75ec06ae..2f17e323 100644 --- a/muse2/muse/widgets/visibletracks.h +++ b/muse2/muse/widgets/visibletracks.h @@ -41,6 +41,7 @@ class VisibleTracks : public QToolBar { public: VisibleTracks(QWidget* /*parent*/, const char* name = 0); // Needs a parent ! + void updateVisibleTracksButtons(); ~VisibleTracks(); }; -- cgit v1.2.3