summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog9
-rw-r--r--muse2/muse/app.cpp199
-rw-r--r--muse2/muse/app.h3
-rw-r--r--muse2/muse/liste/listedit.cpp8
-rw-r--r--muse2/muse/master/lmaster.cpp8
-rw-r--r--muse2/muse/midiedit/drumedit.cpp8
-rw-r--r--muse2/muse/midiedit/pianoroll.cpp10
-rw-r--r--muse2/muse/waveedit/waveedit.cpp153
-rw-r--r--muse2/muse/waveedit/waveedit.h13
-rw-r--r--muse2/muse/waveedit/waveview.cpp11
-rw-r--r--muse2/muse/waveedit/waveview.h3
11 files changed, 238 insertions, 187 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 8ac5aaea..8299cb50 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,12 @@
+24.11.2010
+ - Resinstated the Midi Transformer. Was left out when both TF and iTF were removed, and then I
+ asked for them to be put back. So yes, transformbase.ui is used now. (Tim)
+ - Completed conversion of waveedit(.cpp, h), including menus and shortcuts. Should be done. (Tim)
+ - Set undo/redo shortcuts on global undoAction/redoAction, instead of Q3Accel in each window. (Tim)
+ - Fixed some leftover setAccel()'s in app.cpp (Tim)
+ - Fixed delete shortcut key. Set in MusE constructor. (Tim)
+ - Reinstated special Toplevel::CLIPLIST case in MusE::toplevelDeleted(). Caused problems. (Tim)
+ TODO: Still not right with the menu checkmark...
23.11.2010
- Added Track::cname(), applied to strip labels' object names, so they may be used in style sheets. (Tim)
- Added struct SysEx and some friends, to minstrument.h, prep. for the instrument editor. (Tim)
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index ede1cf50..93e1055e 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -23,7 +23,6 @@
#include <stdarg.h>
#include <QButtonGroup>
-//#include <q3popupmenu.h>
#include <QMenu>
#include <QMessageBox>
#include <QClipboard>
@@ -40,9 +39,7 @@
#include <QFile>
#include <QByteArray>
#include <QtGlobal>
-//Added by qt3to4:
#include <QTimerEvent>
-#include <Q3CString>
#include <QFocusEvent>
#include <QTranslator>
#include <QKeyEvent>
@@ -110,7 +107,6 @@
#include <alsa/asoundlib.h>
#include "songinfo.h"
#include "didyouknow.h"
-#include <q3textedit.h>
//extern void cacheJackRouteNames();
@@ -1067,6 +1063,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
midiEdit->setIcon(QIcon(*edit_midiIcon));
midiTransposeAction = new QAction(QIcon(*midi_transposeIcon), tr("Transpose"), this);
+ midiTransformerAction = new QAction(QIcon(*midi_transformIcon), tr("Midi &Transform"), this);
editSongInfoAction = new QAction(QIcon(*edit_listIcon), tr("Song info"), this);
@@ -1204,6 +1201,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
connect(masterListAction, SIGNAL(activated()), SLOT(startLMasterEditor()));
connect(midiTransposeAction, SIGNAL(activated()), SLOT(transpose()));
+ connect(midiTransformerAction, SIGNAL(activated()), SLOT(startMidiTransformer()));
connect(editSongInfoAction, SIGNAL(activated()), SLOT(startSongInfo()));
@@ -1269,6 +1267,15 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
connect(helpAboutAction, SIGNAL(activated()), SLOT(about()));
//--------------------------------------------------
+ // Miscellaneous shortcuts
+ //--------------------------------------------------
+
+ QShortcut* sc = new QShortcut(Qt::Key_Delete, this);
+ sc->setContext(Qt::WindowShortcut);
+ connect(sc, SIGNAL(activated()), editSignalMapper, SLOT(map()));
+ editSignalMapper->setMapping(sc, CMD_DELETE);
+
+ //--------------------------------------------------
// Toolbar
//--------------------------------------------------
@@ -1392,8 +1399,6 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
menuEdit->addMenu(midiEdit);
#if 0 // TODO
- menu_ids[CMD_OPEN_MIDI_TRANSFORM] = midiEdit->insertItem(
- QIcon(*midi_transformIcon), tr("Midi &Transform"), this, SLOT(startMidiTransformer()), 0);
midiEdit->insertItem(tr("Modify Gate Time"), this, SLOT(modifyGateTime()));
midiEdit->insertItem(tr("Modify Velocity"), this, SLOT(modifyVelocity()));
midiEdit->insertItem(tr("Crescendo"), this, SLOT(crescendo()));
@@ -1409,6 +1414,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
midiEdit->insertItem(tr("Mix Track"), this, SLOT(mixTrack()));
#endif
midiEdit->addAction(midiTransposeAction);
+ midiEdit->addAction(midiTransformerAction);
menuEdit->addAction(editSongInfoAction);
@@ -3386,9 +3392,9 @@ void MusE::toplevelDeleted(unsigned long tl)
case Toplevel::CLIPLIST:
// ORCAN: This needs to be verified. aid2 used to correspond to Cliplist:
//menu_audio->setItemChecked(aid2, false);
- ///viewCliplistAction->setChecked(false); // Don't think we require this any more. Tim.
- ///return;
- break;
+ viewCliplistAction->setChecked(false);
+ return;
+ //break;
// the followin editors can exist in more than
// one instantiation:
case Toplevel::PIANO_ROLL:
@@ -4084,7 +4090,8 @@ void MusE::cmd(int cmd)
void MusE::clipboardChanged()
{
- Q3CString subtype("partlist");
+ //Q3CString subtype("partlist");
+ //QString subtype("partlist");
QMimeSource* ms = QApplication::clipboard()->data(QClipboard::Clipboard);
if (ms == 0)
return;
@@ -4963,111 +4970,111 @@ void MusE::takeAutomationSnapshot()
void MusE::updateConfiguration()
{
- fileOpenAction->setAccel(shortcuts[SHRT_OPEN].key);
- fileNewAction->setAccel(shortcuts[SHRT_NEW].key);
- fileSaveAction->setAccel(shortcuts[SHRT_SAVE].key);
- fileSaveAsAction->setAccel(shortcuts[SHRT_SAVE_AS].key);
-
- // ORCAN: Can submenus have acceleration? Doesn't seem to work even on Muse1
- //menu_file->setAccel(shortcuts[SHRT_OPEN_RECENT].key, menu_ids[CMD_OPEN_RECENT]);
- fileImportMidiAction->setAccel(shortcuts[SHRT_IMPORT_MIDI].key);
- fileExportMidiAction->setAccel(shortcuts[SHRT_EXPORT_MIDI].key);
- fileImportPartAction->setAccel(shortcuts[SHRT_IMPORT_PART].key);
- fileImportWaveAction->setAccel(shortcuts[SHRT_IMPORT_AUDIO].key);
- quitAction->setAccel(shortcuts[SHRT_QUIT].key);
+ fileOpenAction->setShortcut(shortcuts[SHRT_OPEN].key);
+ fileNewAction->setShortcut(shortcuts[SHRT_NEW].key);
+ fileSaveAction->setShortcut(shortcuts[SHRT_SAVE].key);
+ fileSaveAsAction->setShortcut(shortcuts[SHRT_SAVE_AS].key);
+
+ //menu_file->setShortcut(shortcuts[SHRT_OPEN_RECENT].key, menu_ids[CMD_OPEN_RECENT]); // Not used.
+ fileImportMidiAction->setShortcut(shortcuts[SHRT_IMPORT_MIDI].key);
+ fileExportMidiAction->setShortcut(shortcuts[SHRT_EXPORT_MIDI].key);
+ fileImportPartAction->setShortcut(shortcuts[SHRT_IMPORT_PART].key);
+ fileImportWaveAction->setShortcut(shortcuts[SHRT_IMPORT_AUDIO].key);
+ quitAction->setShortcut(shortcuts[SHRT_QUIT].key);
- menu_file->setAccel(shortcuts[SHRT_LOAD_TEMPLATE].key, menu_ids[CMD_LOAD_TEMPLATE]);
+ //menu_file->setShortcut(shortcuts[SHRT_LOAD_TEMPLATE].key, menu_ids[CMD_LOAD_TEMPLATE]); // Not used.
- editCutAction->setAccel(Qt::CTRL+Qt::Key_X);
- editCopyAction->setAccel(Qt::CTRL+Qt::Key_C);
- editPasteAction->setAccel(Qt::CTRL+Qt::Key_V);
- editInsertAction->setAccel(Qt::CTRL+Qt::SHIFT+Qt::Key_I);
- editPasteCloneAction->setAccel(Qt::CTRL+Qt::SHIFT+Qt::Key_V);
- editPaste2TrackAction->setAccel(Qt::CTRL+Qt::Key_B);
- editPasteC2TAction->setAccel(Qt::CTRL+Qt::SHIFT+Qt::Key_B);
- editInsertEMAction->setAccel(Qt::CTRL+Qt::SHIFT+Qt::Key_X);
+ undoAction->setShortcut(Qt::CTRL+Qt::Key_Z);
+ redoAction->setShortcut(Qt::CTRL+Qt::Key_Y);
+
+ editCutAction->setShortcut(Qt::CTRL+Qt::Key_X);
+ editCopyAction->setShortcut(Qt::CTRL+Qt::Key_C);
+ editPasteAction->setShortcut(Qt::CTRL+Qt::Key_V);
+ editInsertAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_I);
+ editPasteCloneAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_V);
+ editPaste2TrackAction->setShortcut(Qt::CTRL+Qt::Key_B);
+ editPasteC2TAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_B);
+ editInsertEMAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_X);
//editDeleteSelectedAction has no acceleration
- menuEdit->setAccel(Qt::Key_Delete, CMD_DELETE);
-
- trackMidiAction->setAccel(shortcuts[SHRT_ADD_MIDI_TRACK].key);
- trackDrumAction->setAccel(shortcuts[SHRT_ADD_DRUM_TRACK].key);
- trackWaveAction->setAccel(shortcuts[SHRT_ADD_WAVE_TRACK].key);
- trackAOutputAction->setAccel(shortcuts[SHRT_ADD_AUDIO_OUTPUT].key);
- trackAGroupAction->setAccel(shortcuts[SHRT_ADD_AUDIO_GROUP].key);
- trackAInputAction->setAccel(shortcuts[SHRT_ADD_AUDIO_INPUT].key);
- trackAAuxAction->setAccel(shortcuts[SHRT_ADD_AUDIO_AUX].key);
-
- editSelectAllAction->setAccel(shortcuts[SHRT_SELECT_NONE].key);
- editDeselectAllAction->setAccel(shortcuts[SHRT_SELECT_NONE].key);
- editInvertSelectionAction->setAccel(shortcuts[SHRT_SELECT_INVERT].key);
- editInsideLoopAction->setAccel(shortcuts[SHRT_SELECT_OLOOP].key);
- editOutsideLoopAction->setAccel(shortcuts[SHRT_SELECT_OLOOP].key);
- editAllPartsAction->setAccel(shortcuts[SHRT_SELECT_PRTSTRACK].key);
-
- startPianoEditAction->setAccel(shortcuts[SHRT_OPEN_PIANO].key);
- startDrumEditAction->setAccel(shortcuts[SHRT_OPEN_DRUMS].key);
- startListEditAction->setAccel(shortcuts[SHRT_OPEN_LIST].key);
- startWaveEditAction->setAccel(shortcuts[SHRT_OPEN_WAVE].key);
-
- masterGraphicAction->setAccel(shortcuts[SHRT_OPEN_GRAPHIC_MASTER].key);
- masterListAction->setAccel(shortcuts[SHRT_OPEN_LIST_MASTER].key);
-
- midiTransposeAction->setAccel(shortcuts[SHRT_TRANSPOSE].key);
+
+ trackMidiAction->setShortcut(shortcuts[SHRT_ADD_MIDI_TRACK].key);
+ trackDrumAction->setShortcut(shortcuts[SHRT_ADD_DRUM_TRACK].key);
+ trackWaveAction->setShortcut(shortcuts[SHRT_ADD_WAVE_TRACK].key);
+ trackAOutputAction->setShortcut(shortcuts[SHRT_ADD_AUDIO_OUTPUT].key);
+ trackAGroupAction->setShortcut(shortcuts[SHRT_ADD_AUDIO_GROUP].key);
+ trackAInputAction->setShortcut(shortcuts[SHRT_ADD_AUDIO_INPUT].key);
+ trackAAuxAction->setShortcut(shortcuts[SHRT_ADD_AUDIO_AUX].key);
+
+ editSelectAllAction->setShortcut(shortcuts[SHRT_SELECT_NONE].key);
+ editDeselectAllAction->setShortcut(shortcuts[SHRT_SELECT_NONE].key);
+ editInvertSelectionAction->setShortcut(shortcuts[SHRT_SELECT_INVERT].key);
+ editInsideLoopAction->setShortcut(shortcuts[SHRT_SELECT_OLOOP].key);
+ editOutsideLoopAction->setShortcut(shortcuts[SHRT_SELECT_OLOOP].key);
+ editAllPartsAction->setShortcut(shortcuts[SHRT_SELECT_PRTSTRACK].key);
+
+ startPianoEditAction->setShortcut(shortcuts[SHRT_OPEN_PIANO].key);
+ startDrumEditAction->setShortcut(shortcuts[SHRT_OPEN_DRUMS].key);
+ startListEditAction->setShortcut(shortcuts[SHRT_OPEN_LIST].key);
+ startWaveEditAction->setShortcut(shortcuts[SHRT_OPEN_WAVE].key);
+
+ masterGraphicAction->setShortcut(shortcuts[SHRT_OPEN_GRAPHIC_MASTER].key);
+ masterListAction->setShortcut(shortcuts[SHRT_OPEN_LIST_MASTER].key);
+
+ midiTransposeAction->setShortcut(shortcuts[SHRT_TRANSPOSE].key);
+ midiTransformerAction->setShortcut(shortcuts[SHRT_OPEN_MIDI_TRANSFORM].key);
//editSongInfoAction has no acceleration
- viewTransportAction->setAccel(shortcuts[SHRT_OPEN_TRANSPORT].key);
- viewBigtimeAction->setAccel(shortcuts[SHRT_OPEN_BIGTIME].key);
- viewMixerAAction->setAccel(shortcuts[SHRT_OPEN_MIXER].key);
- viewMixerBAction->setAccel(shortcuts[SHRT_OPEN_MIXER2].key);
+ viewTransportAction->setShortcut(shortcuts[SHRT_OPEN_TRANSPORT].key);
+ viewBigtimeAction->setShortcut(shortcuts[SHRT_OPEN_BIGTIME].key);
+ viewMixerAAction->setShortcut(shortcuts[SHRT_OPEN_MIXER].key);
+ viewMixerBAction->setShortcut(shortcuts[SHRT_OPEN_MIXER2].key);
//viewCliplistAction has no acceleration
- viewMarkerAction->setAccel(shortcuts[SHRT_OPEN_MARKER].key);
+ viewMarkerAction->setShortcut(shortcuts[SHRT_OPEN_MARKER].key);
- strGlobalCutAction->setAccel(shortcuts[SHRT_GLOBAL_CUT].key);
- strGlobalInsertAction->setAccel(shortcuts[SHRT_GLOBAL_INSERT].key);
- strGlobalSplitAction->setAccel(shortcuts[SHRT_GLOBAL_SPLIT].key);
- strCopyRangeAction->setAccel(shortcuts[SHRT_COPY_RANGE].key);
- strCutEventsAction->setAccel(shortcuts[SHRT_CUT_EVENTS].key);
+ strGlobalCutAction->setShortcut(shortcuts[SHRT_GLOBAL_CUT].key);
+ strGlobalInsertAction->setShortcut(shortcuts[SHRT_GLOBAL_INSERT].key);
+ strGlobalSplitAction->setShortcut(shortcuts[SHRT_GLOBAL_SPLIT].key);
+ strCopyRangeAction->setShortcut(shortcuts[SHRT_COPY_RANGE].key);
+ strCutEventsAction->setShortcut(shortcuts[SHRT_CUT_EVENTS].key);
// midiEditInstAction does not have acceleration
- midiResetInstAction->setAccel(shortcuts[SHRT_MIDI_RESET].key);
- midiInitInstActions->setAccel(shortcuts[SHRT_MIDI_INIT].key);
- midiLocalOffAction->setAccel(shortcuts[SHRT_MIDI_LOCAL_OFF].key);
- midiTrpAction->setAccel(shortcuts[SHRT_MIDI_INPUT_TRANSPOSE].key);
- midiInputTrfAction->setAccel(shortcuts[SHRT_MIDI_INPUT_TRANSFORM].key);
- midiInputFilterAction->setAccel(shortcuts[SHRT_MIDI_INPUT_FILTER].key);
- midiRemoteAction->setAccel(shortcuts[SHRT_MIDI_REMOTE_CONTROL].key);
-
- audioBounce2TrackAction->setAccel(shortcuts[SHRT_AUDIO_BOUNCE_TO_TRACK].key);
- audioBounce2FileAction->setAccel(shortcuts[SHRT_AUDIO_BOUNCE_TO_FILE].key);
- audioRestartAction->setAccel(shortcuts[SHRT_AUDIO_RESTART].key);
-
- autoMixerAction->setAccel(shortcuts[SHRT_MIXER_AUTOMATION].key);
- autoSnapshotAction->setAccel(shortcuts[SHRT_MIXER_SNAPSHOT].key);
- autoClearAction->setAccel(shortcuts[SHRT_MIXER_AUTOMATION_CLEAR].key);
-
- settingsGlobalAction->setAccel(shortcuts[SHRT_GLOBAL_CONFIG].key);
- settingsShortcutsAction->setAccel(shortcuts[SHRT_CONFIG_SHORTCUTS].key);
- settingsMetronomeAction->setAccel(shortcuts[SHRT_CONFIG_METRONOME].key);
- settingsMidiSyncAction->setAccel(shortcuts[SHRT_CONFIG_MIDISYNC].key);
+ midiResetInstAction->setShortcut(shortcuts[SHRT_MIDI_RESET].key);
+ midiInitInstActions->setShortcut(shortcuts[SHRT_MIDI_INIT].key);
+ midiLocalOffAction->setShortcut(shortcuts[SHRT_MIDI_LOCAL_OFF].key);
+ midiTrpAction->setShortcut(shortcuts[SHRT_MIDI_INPUT_TRANSPOSE].key);
+ midiInputTrfAction->setShortcut(shortcuts[SHRT_MIDI_INPUT_TRANSFORM].key);
+ midiInputFilterAction->setShortcut(shortcuts[SHRT_MIDI_INPUT_FILTER].key);
+ midiRemoteAction->setShortcut(shortcuts[SHRT_MIDI_REMOTE_CONTROL].key);
+
+ audioBounce2TrackAction->setShortcut(shortcuts[SHRT_AUDIO_BOUNCE_TO_TRACK].key);
+ audioBounce2FileAction->setShortcut(shortcuts[SHRT_AUDIO_BOUNCE_TO_FILE].key);
+ audioRestartAction->setShortcut(shortcuts[SHRT_AUDIO_RESTART].key);
+
+ autoMixerAction->setShortcut(shortcuts[SHRT_MIXER_AUTOMATION].key);
+ autoSnapshotAction->setShortcut(shortcuts[SHRT_MIXER_SNAPSHOT].key);
+ autoClearAction->setShortcut(shortcuts[SHRT_MIXER_AUTOMATION_CLEAR].key);
+
+ settingsGlobalAction->setShortcut(shortcuts[SHRT_GLOBAL_CONFIG].key);
+ settingsShortcutsAction->setShortcut(shortcuts[SHRT_CONFIG_SHORTCUTS].key);
+ settingsMetronomeAction->setShortcut(shortcuts[SHRT_CONFIG_METRONOME].key);
+ settingsMidiSyncAction->setShortcut(shortcuts[SHRT_CONFIG_MIDISYNC].key);
// settingsMidiIOAction does not have acceleration
- settingsAppearanceAction->setAccel(shortcuts[SHRT_APPEARANCE_SETTINGS].key);
- settingsMidiPortAction->setAccel(shortcuts[SHRT_CONFIG_MIDI_PORTS].key);
+ settingsAppearanceAction->setShortcut(shortcuts[SHRT_APPEARANCE_SETTINGS].key);
+ settingsMidiPortAction->setShortcut(shortcuts[SHRT_CONFIG_MIDI_PORTS].key);
- dontFollowAction->setAccel(shortcuts[SHRT_FOLLOW_NO].key);
- followPageAction->setAccel(shortcuts[SHRT_FOLLOW_JUMP].key);
- followCtsAction->setAccel(shortcuts[SHRT_FOLLOW_CONTINUOUS].key);
+ dontFollowAction->setShortcut(shortcuts[SHRT_FOLLOW_NO].key);
+ followPageAction->setShortcut(shortcuts[SHRT_FOLLOW_JUMP].key);
+ followCtsAction->setShortcut(shortcuts[SHRT_FOLLOW_CONTINUOUS].key);
- helpManualAction->setAccel(shortcuts[SHRT_OPEN_HELP].key);
+ helpManualAction->setShortcut(shortcuts[SHRT_OPEN_HELP].key);
-
// Orcan: Old stuff, needs to be converted. These aren't used anywhere so I commented them out
- //menuEdit->setAccel(shortcuts[SHRT_OPEN_MIDI_TRANSFORM].key, menu_ids[CMD_OPEN_MIDI_TRANSFORM]);
//menuSettings->setAccel(shortcuts[SHRT_CONFIG_AUDIO_PORTS].key, menu_ids[CMD_CONFIG_AUDIO_PORTS]);
//menu_help->setAccel(menu_ids[CMD_START_WHATSTHIS], shortcuts[SHRT_START_WHATSTHIS].key);
//midiInputPlugins->setAccel(shortcuts[SHRT_RANDOM_RHYTHM_GENERATOR].key, 4);
-
+
}
//---------------------------------------------------------
diff --git a/muse2/muse/app.h b/muse2/muse/app.h
index 67a4bc69..34ade79d 100644
--- a/muse2/muse/app.h
+++ b/muse2/muse/app.h
@@ -97,7 +97,7 @@ class MusE : public QMainWindow
CMD_AUDIO_BOUNCE_TO_FILE, CMD_AUDIO_BOUNCE_TO_TRACK, CMD_AUDIO_RESTART,
CMD_LAST };
- int menu_ids[CMD_LAST];
+ //int menu_ids[CMD_LAST];
// File menu actions
QAction *fileSaveAction, *fileOpenAction, *fileNewAction, *testAction;
@@ -112,6 +112,7 @@ class MusE : public QMainWindow
QAction *startPianoEditAction, *startDrumEditAction, *startListEditAction, *startWaveEditAction;
QAction *masterGraphicAction, *masterListAction;
QAction *midiTransposeAction;
+ QAction *midiTransformerAction;
QAction *editSongInfoAction;
// View Menu actions
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index b90fcb4f..6c646430 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -22,7 +22,7 @@
#include <q3popupmenu.h>
#include <QMenuBar>
//#include <qaction.h>
-#include <q3accel.h>
+//#include <q3accel.h>
#include <Qt3Support>
#include <QAction>
//Added by qt3to4:
@@ -443,9 +443,9 @@ ListEdit::ListEdit(PartList* pl)
menuBar()->insertItem(tr("&Edit"), menuEdit);
undoRedo->addTo(menuEdit);
- Q3Accel* qa = new Q3Accel(this);
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
+ ///Q3Accel* qa = new Q3Accel(this);
+ ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
+ ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
menuEdit->insertSeparator();
#if 0
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index 02b4810c..3193bbb3 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -26,7 +26,7 @@
#include <Q3ListView>
#include <QMessageBox>
#include <QStyle>
-#include <Q3Accel>
+//#include <Q3Accel>
#include <QAction>
//Added by qt3to4:
#include <QCloseEvent>
@@ -105,9 +105,9 @@ LMaster::LMaster()
edit->addWidget(tempoButton);
edit->addWidget(timeSigButton);
- Q3Accel* qa = new Q3Accel(this);
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
+ ///Q3Accel* qa = new Q3Accel(this);
+ ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
+ ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
//---------------------------------------------------
// master
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index 8344635c..06205e14 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -6,7 +6,7 @@
//=========================================================
#include <QToolButton>
-#include <q3accel.h>
+//#include <q3accel.h>
#include <QLayout>
#include <q3hbox.h>
#include <QSizeGrip>
@@ -181,8 +181,10 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini
menuEdit = new Q3PopupMenu(this);
menuBar()->insertItem(tr("&Edit"), menuEdit);
undoRedo->addTo(menuEdit);
- Q3Accel* qa = new Q3Accel(this);
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
+
+ ///Q3Accel* qa = new Q3Accel(this);
+ ///qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
+
menuEdit->insertSeparator();
menuEdit->insertItem(tr("Cut"), DrumCanvas::CMD_CUT);
menuEdit->insertItem(tr("Copy"), DrumCanvas::CMD_COPY);
diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp
index 54416b8f..52ecaba1 100644
--- a/muse2/muse/midiedit/pianoroll.cpp
+++ b/muse2/muse/midiedit/pianoroll.cpp
@@ -5,7 +5,7 @@
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
//=========================================================
-#include <q3accel.h>
+//#include <q3accel.h>
#include <QLayout>
#include <q3hbox.h>
#include <QSizeGrip>
@@ -93,10 +93,10 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i
undoRedo->addTo(menuEdit);
//menuEdit->addActions(undoRedo->actions());
- Q3Accel* ud = new Q3Accel(this);
- ud->connectItem(ud->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
- Q3Accel* rd = new Q3Accel(this);
- rd->connectItem(rd->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
+ ///Q3Accel* ud = new Q3Accel(this);
+ ///ud->connectItem(ud->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
+ ///Q3Accel* rd = new Q3Accel(this);
+ ///rd->connectItem(rd->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
menuEdit->insertSeparator();
//menuEdit->addSeparator();
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp
index 2ab7188c..49d57672 100644
--- a/muse2/muse/waveedit/waveedit.cpp
+++ b/muse2/muse/waveedit/waveedit.cpp
@@ -21,25 +21,18 @@
#include "icons.h"
#include "shortcuts.h"
-//#include <q3toolbar.h>
+//#include <q3accel.h>
+#include <QMenu>
+#include <QSignalMapper>
#include <QToolBar>
-#include <qtoolbutton.h>
-#include <q3accel.h>
-#include <qlayout.h>
-#include <q3hbox.h>
-#include <qsizegrip.h>
-#include <qscrollbar.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <q3buttongroup.h>
-#include <q3listbox.h>
-#include <qcombobox.h>
-#include <q3header.h>
-#include <q3popupmenu.h>
-#include <qmenubar.h>
-#include <qaction.h>
-//Added by qt3to4:
+#include <QToolButton>
+#include <QLayout>
+#include <QSizeGrip>
+#include <QScrollBar>
+#include <QLabel>
+#include <QSlider>
+#include <QMenuBar>
+#include <QAction>
#include <QCloseEvent>
#include <QResizeEvent>
#include <QKeyEvent>
@@ -68,50 +61,83 @@ WaveEdit::WaveEdit(PartList* pl)
{
resize(_widthInit, _heightInit);
+ QSignalMapper* mapper = new QSignalMapper(this);
+ QAction* act;
+
//---------Pulldown Menu----------------------------
- Q3PopupMenu* menuFile = new Q3PopupMenu(this);
- Q3PopupMenu* menuEdit = new Q3PopupMenu(this);
- menuBar()->insertItem(tr("&File"), menuFile);
- menuBar()->insertItem(tr("&Edit"), menuEdit);
- menuFunctions = new Q3PopupMenu(this);
- menuBar()->insertItem(tr("Func&tions"), menuFunctions);
-
- menuGain = new Q3PopupMenu(this);
- menuGain->insertItem(tr("200%"), CMD_GAIN_200);
- menuGain->insertItem(tr("150%"), CMD_GAIN_150);
- menuGain->insertItem(tr("75%"), CMD_GAIN_75);
- menuGain->insertItem(tr("50%"), CMD_GAIN_50);
- menuGain->insertItem(tr("25%"), CMD_GAIN_25);
- menuGain->insertItem(tr("Other"), CMD_GAIN_FREE);
- menuFunctions->insertItem(tr("&Gain"), menuGain);
- menuFunctions->insertSeparator();
-
- menuEdit->insertItem(tr("Edit in E&xternal Editor"), CMD_EDIT_EXTERNAL);
- menuFunctions->insertItem(tr("Mute Selection"), CMD_MUTE);
- menuFunctions->insertItem(tr("Normalize Selection"), CMD_NORMALIZE);
- menuFunctions->insertItem(tr("Fade In Selection"), CMD_FADE_IN);
- menuFunctions->insertItem(tr("Fade Out Selection"), CMD_FADE_OUT);
- menuFunctions->insertItem(tr("Reverse Selection"), CMD_REVERSE);
-
- select = new Q3PopupMenu(this);
- select->insertItem(QIcon(*select_allIcon), tr("Select &All"), CMD_SELECT_ALL);
- select->insertItem(QIcon(*select_deselect_allIcon), tr("&Deselect All"), CMD_SELECT_NONE);
-
- menuEdit->insertItem(QIcon(*selectIcon), tr("Select"), select);
-
- connect(menuFunctions, SIGNAL(activated(int)), SLOT(cmd(int)));
- connect(menuFile, SIGNAL(activated(int)), SLOT(cmd(int)));
- connect(select, SIGNAL(activated(int)), SLOT(cmd(int)));
- connect(menuGain, SIGNAL(activated(int)), SLOT(cmd(int)));
- connect(menuEdit, SIGNAL(activated(int)), SLOT(cmd(int)));
+ QMenu* menuFile = menuBar()->addMenu(tr("&File"));
+ QMenu* menuEdit = menuBar()->addMenu(tr("&Edit"));
+
+ menuFunctions = menuBar()->addMenu(tr("Func&tions"));
+
+ menuGain = menuFunctions->addMenu(tr("&Gain"));
+
+ act = menuGain->addAction(tr("200%"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_GAIN_200);
+
+ act = menuGain->addAction(tr("150%"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_GAIN_150);
+
+ act = menuGain->addAction(tr("75%"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_GAIN_75);
+
+ act = menuGain->addAction(tr("50%"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_GAIN_50);
+
+ act = menuGain->addAction(tr("25%"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_GAIN_25);
+
+ act = menuGain->addAction(tr("Other"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_GAIN_FREE);
+
+ connect(mapper, SIGNAL(mapped(int)), this, SLOT(cmd(int)));
+
+ menuFunctions->addSeparator();
+ act = menuEdit->addAction(tr("Edit in E&xternal Editor"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_EDIT_EXTERNAL);
+
+ act = menuFunctions->addAction(tr("Mute Selection"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_MUTE);
+
+ act = menuFunctions->addAction(tr("Normalize Selection"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_NORMALIZE);
+
+ act = menuFunctions->addAction(tr("Fade In Selection"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_FADE_IN);
+
+ act = menuFunctions->addAction(tr("Fade Out Selection"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_FADE_OUT);
+
+ act = menuFunctions->addAction(tr("Reverse Selection"));
+ connect(act, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(act, CMD_REVERSE);
+
+ select = menuEdit->addMenu(QIcon(*selectIcon), tr("Select"));
+
+ selectAllAction = select->addAction(QIcon(*select_allIcon), tr("Select &All"));
+ connect(selectAllAction, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(selectAllAction, CMD_SELECT_ALL);
+
+ selectNoneAction = select->addAction(QIcon(*select_allIcon), tr("&Deselect All"));
+ connect(selectNoneAction, SIGNAL(triggered()), mapper, SLOT(map()));
+ mapper->setMapping(selectNoneAction, CMD_SELECT_NONE);
+
//---------ToolBar----------------------------------
tools = addToolBar(tr("Wave edit tools"));
tools->addActions(undoRedo->actions());
- Q3Accel* qa = new Q3Accel(this);
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Z), song, SLOT(undo()));
- qa->connectItem(qa->insertItem(Qt::CTRL+Qt::Key_Y), song, SLOT(redo()));
connect(muse, SIGNAL(configChanged()), SLOT(configChanged()));
//--------------------------------------------------
@@ -164,7 +190,12 @@ WaveEdit::WaveEdit(PartList* pl)
wview = view; // HACK!
QSizeGrip* corner = new QSizeGrip(mainw);
- ymag = new QSlider(1, 256, 256, yscale, Qt::Vertical, mainw);
+ ymag = new QSlider(Qt::Vertical, mainw);
+ ymag->setMinimum(1);
+ ymag->setMaximum(256);
+ ymag->setPageStep(256);
+ ymag->setValue(yscale);
+
time = new MTScale(&_raster, mainw, xscale, true);
ymag->setFixedWidth(16);
connect(ymag, SIGNAL(valueChanged(int)), view, SLOT(setYScale(int)));
@@ -199,7 +230,7 @@ WaveEdit::WaveEdit(PartList* pl)
if(!parts()->empty())
{
WavePart* part = (WavePart*)(parts()->begin()->second);
- solo->setOn(part->track()->solo());
+ solo->setChecked(part->track()->solo());
}
}
@@ -210,8 +241,8 @@ WaveEdit::WaveEdit(PartList* pl)
void WaveEdit::configChanged()
{
view->setBg(config.waveEditBackgroundColor);
- select->setAccel(shortcuts[SHRT_SELECT_ALL].key, CMD_SELECT_ALL);
- select->setAccel(shortcuts[SHRT_SELECT_NONE].key, CMD_SELECT_NONE);
+ selectAllAction->setShortcut(shortcuts[SHRT_SELECT_ALL].key);
+ selectNoneAction->setShortcut(shortcuts[SHRT_SELECT_NONE].key);
}
//---------------------------------------------------------
@@ -381,7 +412,7 @@ void WaveEdit::songChanged1(int bits)
{
WavePart* part = (WavePart*)(parts()->begin()->second);
solo->blockSignals(true);
- solo->setOn(part->track()->solo());
+ solo->setChecked(part->track()->solo());
solo->blockSignals(false);
}
diff --git a/muse2/muse/waveedit/waveedit.h b/muse2/muse/waveedit/waveedit.h
index 454fa1a1..83943944 100644
--- a/muse2/muse/waveedit/waveedit.h
+++ b/muse2/muse/waveedit/waveedit.h
@@ -8,11 +8,11 @@
#ifndef __WAVE_EDIT_H__
#define __WAVE_EDIT_H__
-#include <qwidget.h>
-//Added by qt3to4:
+#include <QMenu>
+
+#include <QWidget>
#include <QResizeEvent>
#include <QKeyEvent>
-#include <Q3PopupMenu>
#include <QCloseEvent>
#include "midieditor.h"
@@ -24,6 +24,7 @@ class QSlider;
class PosLabel;
class QResizeEvent;
class SNode;
+class QAction;
//---------------------------------------------------------
// WaveEdit
@@ -37,7 +38,9 @@ class WaveEdit : public MidiEditor {
QToolButton* solo;
PosLabel* pos1;
PosLabel* pos2;
-
+ QAction* selectAllAction;
+ QAction* selectNoneAction;
+
static int _widthInit, _heightInit;
Q_OBJECT
@@ -45,7 +48,7 @@ class WaveEdit : public MidiEditor {
virtual void resizeEvent(QResizeEvent* ev);
virtual void keyPressEvent(QKeyEvent*);
- Q3PopupMenu* menuFunctions, *select, *menuGain;
+ QMenu* menuFunctions, *select, *menuGain;
private slots:
void cmd(int);
diff --git a/muse2/muse/waveedit/waveview.cpp b/muse2/muse/waveedit/waveview.cpp
index f0ece122..d70beefe 100644
--- a/muse2/muse/waveedit/waveview.cpp
+++ b/muse2/muse/waveedit/waveview.cpp
@@ -9,11 +9,10 @@
#include <values.h>
#include <sys/wait.h>
-#include <qpainter.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qmessagebox.h>
-//Added by qt3to4:
+#include <QPainter>
+#include <QDir>
+#include <QFileInfo>
+#include <QMessageBox>
#include <QMouseEvent>
#include "editgain.h"
@@ -553,7 +552,7 @@ void WaveView::cmd(int n)
if (modifyoperation != -1) {
if (selectionStart == selectionStop) {
printf("No selection. Ignoring\n"); //@!TODO: Disable menu options when no selection
- QMessageBox::information(this,
+ QMessageBox::information(this,
QString("MusE"),
QWidget::tr("No selection. Ignoring"));
diff --git a/muse2/muse/waveedit/waveview.h b/muse2/muse/waveedit/waveview.h
index 1e2c7469..49ac251f 100644
--- a/muse2/muse/waveedit/waveview.h
+++ b/muse2/muse/waveedit/waveview.h
@@ -9,8 +9,7 @@
#define WAVE_VIEW_H
#include "view.h"
-#include <qwidget.h>
-//Added by qt3to4:
+#include <QWidget>
#include <QMouseEvent>
#include "wave.h"