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/general | |
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/general')
-rw-r--r-- | src/gui/general/EditView.cpp | 78 | ||||
-rw-r--r-- | src/gui/general/EditViewBase.cpp | 34 | ||||
-rw-r--r-- | src/gui/general/EditViewBase.h | 6 |
3 files changed, 59 insertions, 59 deletions
diff --git a/src/gui/general/EditView.cpp b/src/gui/general/EditView.cpp index 661236c..06b365a 100644 --- a/src/gui/general/EditView.cpp +++ b/src/gui/general/EditView.cpp @@ -726,14 +726,14 @@ EditView::setupActions() TQString pixmapDir = TDEGlobal::dirs()->findResource("appdata", "pixmaps/"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-tempo.png"); TQIconSet icon = TQIconSet(pixmap); - new KAction(AddTempoChangeCommand::getGlobalName(), + new TDEAction(AddTempoChangeCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddTempo()), actionCollection(), "add_tempo"); pixmap.load(pixmapDir + "/toolbar/event-insert-timesig.png"); icon = TQIconSet(pixmap); - new KAction(AddTimeSignatureCommand::getGlobalName(), + new TDEAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddTimeSignature()), actionCollection(), "add_time_signature"); @@ -741,118 +741,118 @@ EditView::setupActions() // // Transforms // - new KAction(i18n("&Halve Durations"), Key_H + CTRL, TQT_TQOBJECT(this), + new TDEAction(i18n("&Halve Durations"), Key_H + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotHalveDurations()), actionCollection(), "halve_durations"); - new KAction(i18n("&Double Durations"), Key_H + CTRL + SHIFT, TQT_TQOBJECT(this), + new TDEAction(i18n("&Double Durations"), Key_H + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotDoubleDurations()), actionCollection(), "double_durations"); - new KAction(RescaleCommand::getGlobalName(), 0, TQT_TQOBJECT(this), + new TDEAction(RescaleCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRescale()), actionCollection(), "rescale"); - new KAction(TransposeCommand::getGlobalName(1), 0, + new TDEAction(TransposeCommand::getGlobalName(1), 0, Key_Up, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeUp()), actionCollection(), "transpose_up"); - new KAction(TransposeCommand::getGlobalName(12), 0, + new TDEAction(TransposeCommand::getGlobalName(12), 0, Key_Up + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeUpOctave()), actionCollection(), "transpose_up_octave"); - new KAction(TransposeCommand::getGlobalName( -1), 0, + new TDEAction(TransposeCommand::getGlobalName( -1), 0, Key_Down, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeDown()), actionCollection(), "transpose_down"); - new KAction(TransposeCommand::getGlobalName( -12), 0, + new TDEAction(TransposeCommand::getGlobalName( -12), 0, Key_Down + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeDownOctave()), actionCollection(), "transpose_down_octave"); - new KAction(TransposeCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), + new TDEAction(TransposeCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTranspose()), actionCollection(), "general_transpose"); - new KAction(TransposeCommand::getDiatonicGlobalName(0,0), 0, TQT_TQOBJECT(this), + new TDEAction(TransposeCommand::getDiatonicGlobalName(0,0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDiatonicTranspose()), actionCollection(), "general_diatonic_transpose"); - new KAction(InvertCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), + new TDEAction(InvertCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvert()), actionCollection(), "invert"); - new KAction(RetrogradeCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), + new TDEAction(RetrogradeCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRetrograde()), actionCollection(), "retrograde"); - new KAction(RetrogradeInvertCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), + new TDEAction(RetrogradeInvertCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRetrogradeInvert()), actionCollection(), "retrograde_invert"); - new KAction(i18n("Jog &Left"), Key_Left + ALT, TQT_TQOBJECT(this), + new TDEAction(i18n("Jog &Left"), Key_Left + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotJogLeft()), actionCollection(), "jog_left"); - new KAction(i18n("Jog &Right"), Key_Right + ALT, TQT_TQOBJECT(this), + new TDEAction(i18n("Jog &Right"), Key_Right + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotJogRight()), actionCollection(), "jog_right"); // Control rulers // - new KAction(i18n("Show Velocity Property Ruler"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Show Velocity Property Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowVelocityControlRuler()), actionCollection(), "show_velocity_control_ruler"); /* - new KAction(i18n("Show Controllers Events Ruler"), 0, this, + new TDEAction(i18n("Show Controllers Events Ruler"), 0, this, TQT_SLOT(slotShowControllerEventsRuler()), actionCollection(), "show_controller_events_ruler"); */ // Disabled for now // - // new KAction(i18n("Add Control Ruler..."), 0, this, + // new TDEAction(i18n("Add Control Ruler..."), 0, this, // TQT_SLOT(slotShowPropertyControlRuler()), actionCollection(), // "add_control_ruler"); // // Control Ruler context menu // - new KAction(i18n("Insert item"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Insert item"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertControlRulerItem()), actionCollection(), "insert_control_ruler_item"); // This was on Key_Delete, but that conflicts with existing Delete commands // on individual edit views - new KAction(i18n("Erase selected items"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Erase selected items"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEraseControlRulerItem()), actionCollection(), "erase_control_ruler_item"); - new KAction(i18n("Clear ruler"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Clear ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotClearControlRulerItem()), actionCollection(), "clear_control_ruler_item"); - new KAction(i18n("Insert line of controllers"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Insert line of controllers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotStartControlLineItem()), actionCollection(), "start_control_line_item"); - new KAction(i18n("Flip forward"), Key_BracketRight, TQT_TQOBJECT(this), + new TDEAction(i18n("Flip forward"), Key_BracketRight, TQT_TQOBJECT(this), TQT_SLOT(slotFlipForwards()), actionCollection(), "flip_control_events_forward"); - new KAction(i18n("Flip backwards"), Key_BracketLeft, TQT_TQOBJECT(this), + new TDEAction(i18n("Flip backwards"), Key_BracketLeft, TQT_TQOBJECT(this), TQT_SLOT(slotFlipBackwards()), actionCollection(), "flip_control_events_back"); - new KAction(i18n("Draw property line"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Draw property line"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDrawPropertyLine()), actionCollection(), "draw_property_line"); - new KAction(i18n("Select all property values"), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Select all property values"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAllProperties()), actionCollection(), "select_all_properties"); } @@ -1081,26 +1081,26 @@ EditView::createInsertPitchActionMenu() }, }; - KActionMenu *insertPitchActionMenu = - new KActionMenu(i18n("&Insert Note"), TQT_TQOBJECT(this), "insert_note_actionmenu"); + TDEActionMenu *insertPitchActionMenu = + new TDEActionMenu(i18n("&Insert Note"), TQT_TQOBJECT(this), "insert_note_actionmenu"); for (int octave = 0; octave <= 2; ++octave) { - KActionMenu *menu = insertPitchActionMenu; + TDEActionMenu *menu = insertPitchActionMenu; if (octave == 1) { - menu = new KActionMenu(i18n("&Upper Octave"), TQT_TQOBJECT(this), + menu = new TDEActionMenu(i18n("&Upper Octave"), TQT_TQOBJECT(this), "insert_note_actionmenu_upper_octave"); - insertPitchActionMenu->insert(new KActionSeparator(TQT_TQOBJECT(this))); + insertPitchActionMenu->insert(new TDEActionSeparator(TQT_TQOBJECT(this))); insertPitchActionMenu->insert(menu); } else if (octave == 2) { - menu = new KActionMenu(i18n("&Lower Octave"), TQT_TQOBJECT(this), + menu = new TDEActionMenu(i18n("&Lower Octave"), TQT_TQOBJECT(this), "insert_note_actionmenu_lower_octave"); insertPitchActionMenu->insert(menu); } for (unsigned int i = 0; i < 7; ++i) { - KAction *insertPitchAction = 0; + TDEAction *insertPitchAction = 0; TQString octaveSuffix; if (octave == 1) @@ -1113,7 +1113,7 @@ EditView::createInsertPitchActionMenu() if (i != 0 && i != 3) { insertPitchAction = - new KAction + new TDEAction (flat.arg(notePitchNames[i]), CTRL + SHIFT + notePitchKeys[octave][i], TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), @@ -1123,7 +1123,7 @@ EditView::createInsertPitchActionMenu() } insertPitchAction = - new KAction + new TDEAction (notePitchNames[i], notePitchKeys[octave][i], TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), @@ -1136,7 +1136,7 @@ EditView::createInsertPitchActionMenu() if (i != 2 && i != 6) { insertPitchAction = - new KAction + new TDEAction (sharp.arg(notePitchNames[i]), SHIFT + notePitchKeys[octave][i], TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), @@ -1146,7 +1146,7 @@ EditView::createInsertPitchActionMenu() } if (i < 6) - menu->insert(new KActionSeparator(TQT_TQOBJECT(this))); + menu->insert(new TDEActionSeparator(TQT_TQOBJECT(this))); } } @@ -1350,7 +1350,7 @@ void EditView::slotShowPropertyControlRuler() KDialogBase propChooserDialog(this, "propertychooserdialog", true, i18n("Select event property"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok); - KListBox* propList = new KListBox(propChooserDialog.makeVBoxMainWidget()); + TDEListBox* propList = new TDEListBox(propChooserDialog.makeVBoxMainWidget()); new TQListBoxRGProperty(propList, BaseProperties::VELOCITY.c_str()); int rc = propChooserDialog.exec(); diff --git a/src/gui/general/EditViewBase.cpp b/src/gui/general/EditViewBase.cpp index ca8211a..7a26a67 100644 --- a/src/gui/general/EditViewBase.cpp +++ b/src/gui/general/EditViewBase.cpp @@ -187,15 +187,15 @@ void EditViewBase::setupActions(TQString rcFileName, bool haveClipboard) KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); } - new KToolBarPopupAction(i18n("Und&o"), + new TDEToolBarPopupAction(i18n("Und&o"), "undo", - KStdAccel::key(KStdAccel::Undo), + TDEStdAccel::key(TDEStdAccel::Undo), actionCollection(), KStdAction::stdName(KStdAction::Undo)); - new KToolBarPopupAction(i18n("Re&do"), + new TDEToolBarPopupAction(i18n("Re&do"), "redo", - KStdAccel::key(KStdAccel::Redo), + TDEStdAccel::key(TDEStdAccel::Redo), actionCollection(), KStdAction::stdName(KStdAction::Redo)); @@ -203,33 +203,33 @@ void EditViewBase::setupActions(TQString rcFileName, bool haveClipboard) TQCanvasPixmap pixmap(pixmapDir + "/toolbar/matrix.png"); TQIconSet icon = TQIconSet(pixmap); - new KAction(i18n("Open in Matri&x Editor"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Open in Matri&x Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInMatrix()), actionCollection(), "open_in_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Percussion Matrix Editor"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Open in &Percussion Matrix Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInPercussionMatrix()), actionCollection(), "open_in_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Notation Editor"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Open in &Notation Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInNotation()), actionCollection(), "open_in_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Event List Editor"), icon, 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Open in &Event List Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInEventList()), actionCollection(), "open_in_event_list"); - new KAction(i18n("Set Segment Start Time..."), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Set Segment Start Time..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSegmentStartTime()), actionCollection(), "set_segment_start"); - new KAction(i18n("Set Segment Duration..."), 0, TQT_TQOBJECT(this), + new TDEAction(i18n("Set Segment Duration..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSegmentDuration()), actionCollection(), "set_segment_duration"); @@ -418,7 +418,7 @@ void EditViewBase::paintEvent(TQPaintEvent* e) } if (e) - KMainWindow::paintEvent(e); + TDEMainWindow::paintEvent(e); // moved this to the end of the method so that things called // from this method can still test whether the composition had @@ -446,7 +446,7 @@ void EditViewBase::closeEvent(TQCloseEvent* e) RG_DEBUG << "EditViewBase::closeEvent() : is in ctor, ignoring close event\n"; e->ignore(); } else { - KMainWindow::closeEvent(e); + TDEMainWindow::closeEvent(e); } } @@ -553,7 +553,7 @@ bool EditViewBase::getSegmentsOnlyRestsAndClefs() void EditViewBase::toggleWidget(TQWidget* widget, const TQString& toggleActionName) { - KToggleAction* toggleAction = getToggleAction(toggleActionName); + TDEToggleAction* toggleAction = getToggleAction(toggleActionName); if (!toggleAction) { RG_DEBUG << "!!! Unknown toggle action : " << toggleActionName << endl; @@ -586,7 +586,7 @@ EditViewBase::slotTestClipboard() void EditViewBase::slotToggleSolo() { - KToggleAction* toggleSoloAction = getToggleAction("toggle_solo"); + TDEToggleAction* toggleSoloAction = getToggleAction("toggle_solo"); if (!toggleSoloAction) return ; @@ -664,7 +664,7 @@ void EditViewBase::slotCompositionStateUpdate() { // update state of 'solo' toggle // - KToggleAction* toggleSolo = getToggleAction("toggle_solo"); + TDEToggleAction* toggleSolo = getToggleAction("toggle_solo"); if (!toggleSolo) return ; @@ -702,9 +702,9 @@ MultiViewCommandHistory* EditViewBase::getCommandHistory() return getDocument()->getCommandHistory(); } -KToggleAction* EditViewBase::getToggleAction(const TQString& actionName) +TDEToggleAction* EditViewBase::getToggleAction(const TQString& actionName) { - return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName.ascii())); + return dynamic_cast<TDEToggleAction*>(actionCollection()->action(actionName.ascii())); } } diff --git a/src/gui/general/EditViewBase.h b/src/gui/general/EditViewBase.h index a5da4ad..75bd995 100644 --- a/src/gui/general/EditViewBase.h +++ b/src/gui/general/EditViewBase.h @@ -39,7 +39,7 @@ class TQGridLayout; class TQFrame; class TQCloseEvent; class TQAccel; -class KToggleAction; +class TDEToggleAction; class TDEConfig; class KCommand; namespace Rosegarden { class EditViewTimeSigNotifier; } @@ -335,11 +335,11 @@ protected: bool getSegmentsOnlyRestsAndClefs(); /// Convenience function around actionCollection()->action() - KToggleAction* getToggleAction(const TQString& actionName); + TDEToggleAction* getToggleAction(const TQString& actionName); /** * Make a widget visible depending on the state of a - * KToggleAction + * TDEToggleAction */ virtual void toggleWidget(TQWidget* widget, const TQString& toggleActionName); |