diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:05:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:05:43 -0600 |
commit | fb3718a55f355cd22f9eb9fa4e89cd3b84b8c9ca (patch) | |
tree | 5785d2ccbdfbe2f44d02fec75b4a51f5079a4b62 /src/gui/editors/matrix/MatrixView.cpp | |
parent | acf699af8244896500e654cccdc8aae7e5b545db (diff) | |
download | rosegarden-fb3718a55f355cd22f9eb9fa4e89cd3b84b8c9ca.tar.gz rosegarden-fb3718a55f355cd22f9eb9fa4e89cd3b84b8c9ca.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src/gui/editors/matrix/MatrixView.cpp')
-rw-r--r-- | src/gui/editors/matrix/MatrixView.cpp | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp index f7665c9..099ef06 100644 --- a/src/gui/editors/matrix/MatrixView.cpp +++ b/src/gui/editors/matrix/MatrixView.cpp @@ -633,225 +633,225 @@ void MatrixView::setupActions() // // Edition tools (eraser, selector...) // - KRadioAction* toolAction = 0; + TDERadioAction* toolAction = 0; TQString pixmapDir = TDEGlobal::dirs()->findResource("appdata", "pixmaps/"); TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/select.xpm")); - toolAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, + toolAction = new TDERadioAction(i18n("&Select and Edit"), icon, Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); toolAction->setExclusiveGroup("tools"); - toolAction = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, + toolAction = new TDERadioAction(i18n("&Draw"), "pencil", Key_F3, TQT_TQOBJECT(this), TQT_SLOT(slotPaintSelected()), actionCollection(), "draw"); toolAction->setExclusiveGroup("tools"); - toolAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, + toolAction = new TDERadioAction(i18n("&Erase"), "eraser", Key_F4, TQT_TQOBJECT(this), TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); toolAction->setExclusiveGroup("tools"); - toolAction = new KRadioAction(i18n("&Move"), "move", Key_F5, + toolAction = new TDERadioAction(i18n("&Move"), "move", Key_F5, TQT_TQOBJECT(this), TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); toolAction->setExclusiveGroup("tools"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); icon = TQIconSet(pixmap); - toolAction = new KRadioAction(i18n("Resi&ze"), icon, Key_F6, + toolAction = new TDERadioAction(i18n("Resi&ze"), icon, Key_F6, TQT_TQOBJECT(this), TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); toolAction->setExclusiveGroup("tools"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); - (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, + (new TDEToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); pixmap.load(pixmapDir + "/toolbar/step_by_step.xpm"); icon = TQIconSet(pixmap); - new KToggleAction(i18n("Ste&p Recording"), icon, 0, TQT_TQOBJECT(this), + new TDEToggleAction(i18n("Ste&p Recording"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); icon = TQIconSet(pixmap); - new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, TQT_TQOBJECT(this), + new TDEAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); - new KAction(i18n("Repeat Last Quantize"), Key_Plus, TQT_TQOBJECT(this), + new TDEAction(i18n("Repeat Last Quantize"), Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRepeatQuantize()), actionCollection(), "repeat_quantize"); - new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, TQT_TQOBJECT(this), + new TDEAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); - new KAction(i18n("&Legato"), Key_Minus, TQT_TQOBJECT(this), + new TDEAction(i18n("&Legato"), Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsLegato()), actionCollection(), "legatoize"); - new KAction(ChangeVelocityCommand::getGlobalName(10), 0, + new TDEAction(ChangeVelocityCommand::getGlobalName(10), 0, Key_Up + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotVelocityUp()), actionCollection(), "velocity_up"); - new KAction(ChangeVelocityCommand::getGlobalName( -10), 0, + new TDEAction(ChangeVelocityCommand::getGlobalName( -10), 0, Key_Down + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotVelocityDown()), actionCollection(), "velocity_down"); - new KAction(i18n("Set to Current Velocity"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Set to Current Velocity"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetVelocitiesToCurrent()), actionCollection(), "set_to_current_velocity"); - new KAction(i18n("Set Event &Velocities..."), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Set Event &Velocities..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetVelocities()), actionCollection(), "set_velocities"); - new KAction(i18n("Trigger Se&gment..."), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Trigger Se&gment..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTriggerSegment()), actionCollection(), "trigger_segment"); - new KAction(i18n("Remove Triggers..."), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Remove Triggers..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveTriggers()), actionCollection(), "remove_trigger"); - new KAction(i18n("Select &All"), Key_A + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("Select &All"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("&Delete"), Key_Delete, TQT_TQOBJECT(this), + new TDEAction(i18n("&Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); - new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); - new KAction(i18n("Cursor &Forward"), 0, Key_Right, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor &Forward"), 0, Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); - new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); - new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); - new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); - new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); - new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); - new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); - new KAction(i18n("Cursor to St&art"), 0, + new TDEAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ TQT_TQOBJECT(this), TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); - new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor to &End"), 0, Key_E + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); - new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Cursor to &Playback Pointer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), + TDEAction *play = new TDEAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play - KShortcut playShortcut = play->shortcut(); + TDEShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), + new TDEAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), + new TDEAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), + new TDEAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); - new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Playback Pointer to &Cursor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); - new KToggleAction(i18n("&Solo"), icon, 0, TQT_TQOBJECT(this), + new TDEToggleAction(i18n("&Solo"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); - (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), + (new TDEToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), + new TDEAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); - new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); - new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("Clear L&oop"), Key_Colon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); - new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), + new TDEAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); @@ -876,16 +876,16 @@ void MatrixView::setupActions() timeT d = m_snapValues[i]; if (d == SnapGrid::NoSnap) { - new KAction(i18n("&No Snap"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("&No Snap"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_none"); } else if (d == SnapGrid::SnapToUnit) { } else if (d == SnapGrid::SnapToBeat) { - new KAction(i18n("Snap to Bea&t"), Key_1, TQT_TQOBJECT(this), + new TDEAction(i18n("Snap to Bea&t"), Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_beat"); } else if (d == SnapGrid::SnapToBar) { - new KAction(i18n("Snap to &Bar"), Key_5, TQT_TQOBJECT(this), + new TDEAction(i18n("Snap to &Bar"), Key_5, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_bar"); } else { @@ -895,7 +895,7 @@ void MatrixView::setupActions() TQPixmap pixmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); - KShortcut cut = 0; + TDEShortcut cut = 0; if (d == crotchetDuration / 16) cut = Key_0; else if (d == crotchetDuration / 8) cut = Key_3; else if (d == crotchetDuration / 4) cut = Key_6; @@ -905,7 +905,7 @@ void MatrixView::setupActions() TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d)); if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; - new KAction(i18n("Snap to %1").arg(label), pixmap, cut, TQT_TQOBJECT(this), + new TDEAction(i18n("Snap to %1").arg(label), pixmap, cut, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), actionName.ascii()); } @@ -914,16 +914,16 @@ void MatrixView::setupActions() // // Settings menu // - new KAction(i18n("Show Instrument Parameters"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Show Instrument Parameters"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_parameters"); - new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, TQT_TQOBJECT(this), + new TDEToggleAction(i18n("Show Ch&ord Name Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); - new KToggleAction(i18n("Show &Tempo Ruler"), 0, TQT_TQOBJECT(this), + new TDEToggleAction(i18n("Show &Tempo Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); @@ -938,7 +938,7 @@ void MatrixView::setupActions() bool MatrixView::isInChordMode() { - return ((KToggleAction *)actionCollection()->action("chord_mode"))-> + return ((TDEToggleAction *)actionCollection()->action("chord_mode"))-> isChecked(); } @@ -2107,7 +2107,7 @@ MatrixView::initActionsToolbar() { MATRIX_DEBUG << "MatrixView::initActionsToolbar" << endl; - KToolBar *actionsToolbar = toolBar("Actions Toolbar"); + TDEToolBar *actionsToolbar = toolBar("Actions Toolbar"); if (!actionsToolbar) { MATRIX_DEBUG << "MatrixView::initActionsToolbar - " @@ -2192,7 +2192,7 @@ MatrixView::initZoomToolbar() { MATRIX_DEBUG << "MatrixView::initZoomToolbar" << endl; - KToolBar *zoomToolbar = toolBar("Zoom Toolbar"); + TDEToolBar *zoomToolbar = toolBar("Zoom Toolbar"); if (!zoomToolbar) { MATRIX_DEBUG << "MatrixView::initZoomToolbar - " @@ -2828,7 +2828,7 @@ MatrixView::slotInsertableNoteEventReceived(int pitch, int velocity, bool noteOn return ; } - KToggleAction *action = dynamic_cast<KToggleAction *> + TDEToggleAction *action = dynamic_cast<TDEToggleAction *> (actionCollection()->action("toggle_step_by_step")); if (!action) { MATRIX_DEBUG << "WARNING: No toggle_step_by_step action" << endl; @@ -2914,7 +2914,7 @@ MatrixView::slotInsertableNoteOffReceived(int pitch, int velocity) void MatrixView::slotToggleStepByStep() { - KToggleAction *action = dynamic_cast<KToggleAction *> + TDEToggleAction *action = dynamic_cast<TDEToggleAction *> (actionCollection()->action("toggle_step_by_step")); if (!action) { MATRIX_DEBUG << "WARNING: No toggle_step_by_step action" << endl; @@ -2942,7 +2942,7 @@ MatrixView::slotUpdateInsertModeStatus() void MatrixView::slotStepByStepTargetRequested(TQObject *obj) { - KToggleAction *action = dynamic_cast<KToggleAction *> + TDEToggleAction *action = dynamic_cast<TDEToggleAction *> (actionCollection()->action("toggle_step_by_step")); if (!action) { MATRIX_DEBUG << "WARNING: No toggle_step_by_step action" << endl; |