diff options
Diffstat (limited to 'kturtle/src')
-rw-r--r-- | kturtle/src/kturtle.cpp | 60 | ||||
-rw-r--r-- | kturtle/src/kturtle.h | 24 |
2 files changed, 42 insertions, 42 deletions
diff --git a/kturtle/src/kturtle.cpp b/kturtle/src/kturtle.cpp index ce30ce34..436d0084 100644 --- a/kturtle/src/kturtle.cpp +++ b/kturtle/src/kturtle.cpp @@ -120,25 +120,25 @@ MainWindow::~MainWindow() void MainWindow::setupActions() { - KActionCollection *ac = actionCollection(); // abbreviation + TDEActionCollection *ac = actionCollection(); // abbreviation // File actions KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotNewFile()), ac); - openExAction = new KAction(i18n("Open Exa&mples..."), "bookmark_folder", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotOpenExample()), ac, "open_examples"); + openExAction = new TDEAction(i18n("Open Exa&mples..."), "bookmark_folder", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotOpenExample()), ac, "open_examples"); KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpenFile()), ac); m_recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotOpenFile(const KURL&)), ac); KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSaveFile()), ac); KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), ac); - new KAction(i18n("Save &Canvas..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanvas()), ac, "save_canvas"); - speed = new KSelectAction(i18n("Execution Speed"), 0, ALT+Key_S, TQT_TQOBJECT(this), TQT_SLOT( slotChangeSpeed() ), ac, "speed"); + new TDEAction(i18n("Save &Canvas..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveCanvas()), ac, "save_canvas"); + speed = new TDESelectAction(i18n("Execution Speed"), 0, ALT+Key_S, TQT_TQOBJECT(this), TQT_SLOT( slotChangeSpeed() ), ac, "speed"); TQStringList speeds; speeds << i18n("Full Speed") << i18n("Slow") << i18n("Slower") << i18n("Slowest"); speed->setItems(speeds); speed->setCurrentItem(0); - run = new KAction(i18n("&Execute Commands"), "gear", ALT+Key_Return, TQT_TQOBJECT(this), TQT_SLOT( slotExecute() ), ac, "run"); - pause = new KToggleAction(i18n("Pause E&xecution"), "player_pause", Key_Pause, TQT_TQOBJECT(this), TQT_SLOT( slotPauseExecution() ), ac, "pause"); + run = new TDEAction(i18n("&Execute Commands"), "gear", ALT+Key_Return, TQT_TQOBJECT(this), TQT_SLOT( slotExecute() ), ac, "run"); + pause = new TDEToggleAction(i18n("Pause E&xecution"), "player_pause", Key_Pause, TQT_TQOBJECT(this), TQT_SLOT( slotPauseExecution() ), ac, "pause"); pause->setChecked(false); pause->setEnabled(false); - stop = new KAction(i18n("Stop E&xecution"), "stop", Key_Escape, TQT_TQOBJECT(this), TQT_SLOT( slotAbortExecution() ), ac, "stop"); + stop = new TDEAction(i18n("Stop E&xecution"), "stop", Key_Escape, TQT_TQOBJECT(this), TQT_SLOT( slotAbortExecution() ), ac, "stop"); stop->setEnabled(false); KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), ac); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), ac); @@ -151,31 +151,31 @@ void MainWindow::setupActions() KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), ac); KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), ac); KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), ac); - new KToggleAction(i18n("Toggle Insert"), Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotToggleInsert()), ac, "set_insert"); + new TDEToggleAction(i18n("Toggle Insert"), Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotToggleInsert()), ac, "set_insert"); KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(slotFind()), ac); KStdAction::findNext(TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()), ac); KStdAction::findPrev(TQT_TQOBJECT(this), TQT_SLOT(slotFindPrevious()), ac); KStdAction::replace(TQT_TQOBJECT(this), TQT_SLOT(slotReplace()), ac); // View actions - new KToggleAction(i18n("Show &Line Numbers"), 0, Key_F11, TQT_TQOBJECT(this), TQT_SLOT(slotToggleLineNumbers()), ac, "line_numbers"); + new TDEToggleAction(i18n("Show &Line Numbers"), 0, Key_F11, TQT_TQOBJECT(this), TQT_SLOT(slotToggleLineNumbers()), ac, "line_numbers"); m_fullscreen = KStdAction::fullScreen(TQT_TQOBJECT(this), TQT_SLOT(slotToggleFullscreen()), ac, this, "full_screen"); m_fullscreen->setChecked(b_fullscreen); // Tools actions - colorpicker = new KToggleAction(i18n("&Color Picker"), "colorize", ALT+Key_C, TQT_TQOBJECT(this), TQT_SLOT(slotColorPicker()), ac, "color_picker"); - new KAction(i18n("&Indent"), "indent", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotIndent()), ac, "edit_indent"); - new KAction(i18n("&Unindent"), "unindent", CTRL+SHIFT+Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotUnIndent()), ac, "edit_unindent"); - new KAction(i18n("Cl&ean Indentation"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotCleanIndent()), ac, "edit_cleanIndent"); - new KAction(i18n("Co&mment"), 0, CTRL+Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotComment()), ac, "edit_comment"); - new KAction(i18n("Unc&omment"), 0, CTRL+SHIFT+Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotUnComment()), ac, "edit_uncomment"); + colorpicker = new TDEToggleAction(i18n("&Color Picker"), "colorize", ALT+Key_C, TQT_TQOBJECT(this), TQT_SLOT(slotColorPicker()), ac, "color_picker"); + new TDEAction(i18n("&Indent"), "indent", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotIndent()), ac, "edit_indent"); + new TDEAction(i18n("&Unindent"), "unindent", CTRL+SHIFT+Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotUnIndent()), ac, "edit_unindent"); + new TDEAction(i18n("Cl&ean Indentation"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotCleanIndent()), ac, "edit_cleanIndent"); + new TDEAction(i18n("Co&mment"), 0, CTRL+Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotComment()), ac, "edit_comment"); + new TDEAction(i18n("Unc&omment"), 0, CTRL+SHIFT+Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotUnComment()), ac, "edit_uncomment"); // Settings actions KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotSettings()), ac ); - new KAction(i18n("&Configure Editor..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditor()), ac, "set_confdlg"); + new TDEAction(i18n("&Configure Editor..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditor()), ac, "set_confdlg"); // Help actions - ContextHelp = new KAction(0, 0, Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotContextHelp()), ac, "context_help"); + ContextHelp = new TDEAction(0, 0, Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotContextHelp()), ac, "context_help"); slotContextHelpUpdate(); // this sets the label of this action // other @@ -654,7 +654,7 @@ void MainWindow::slotMessageDialog(TQString text) void MainWindow::slotEditor() { - KAction *a = editor->actionCollection()->action("set_confdlg"); + TDEAction *a = editor->actionCollection()->action("set_confdlg"); a->activate(); } @@ -716,68 +716,68 @@ void MainWindow::slotClearSelection() void MainWindow::slotFind() { - KAction *a = editor->actionCollection()->action("edit_find"); + TDEAction *a = editor->actionCollection()->action("edit_find"); a->activate(); } void MainWindow::slotFindNext() { - KAction *a = editor->actionCollection()->action("edit_find_next"); + TDEAction *a = editor->actionCollection()->action("edit_find_next"); a->activate(); } void MainWindow::slotFindPrevious() { - KAction *a = editor->actionCollection()->action("edit_find_prev"); + TDEAction *a = editor->actionCollection()->action("edit_find_prev"); a->activate(); } void MainWindow::slotReplace() { - KAction* a = editor->actionCollection()->action("edit_replace"); + TDEAction* a = editor->actionCollection()->action("edit_replace"); a->activate(); } void MainWindow::slotToggleInsert() { - KToggleAction *a = dynamic_cast<KToggleAction*>(editor->actionCollection()->action("set_insert")); + TDEToggleAction *a = dynamic_cast<TDEToggleAction*>(editor->actionCollection()->action("set_insert")); a->activate(); if (a) statusBar()->changeItem(a->isChecked() ? i18n(" OVR ") : i18n(" INS "), IDS_INS); } void MainWindow::slotIndent() { - KAction *a = editor->actionCollection()->action("tools_indent"); + TDEAction *a = editor->actionCollection()->action("tools_indent"); a->activate(); } void MainWindow::slotUnIndent() { - KAction *a = editor->actionCollection()->action("tools_unindent"); + TDEAction *a = editor->actionCollection()->action("tools_unindent"); a->activate(); } void MainWindow::slotCleanIndent() { - KAction *a = editor->actionCollection()->action("tools_cleanIndent"); + TDEAction *a = editor->actionCollection()->action("tools_cleanIndent"); a->activate(); } void MainWindow::slotComment() { - KAction *a = editor->actionCollection()->action("tools_comment"); + TDEAction *a = editor->actionCollection()->action("tools_comment"); a->activate(); } void MainWindow::slotUnComment() { - KAction *a = editor->actionCollection()->action("tools_uncomment"); + TDEAction *a = editor->actionCollection()->action("tools_uncomment"); a->activate(); } void MainWindow::slotToggleLineNumbers() { - KToggleAction *a = dynamic_cast<KToggleAction*>( editor->actionCollection()->action("view_line_numbers") ); + TDEToggleAction *a = dynamic_cast<TDEToggleAction*>( editor->actionCollection()->action("view_line_numbers") ); a->activate(); } @@ -817,7 +817,7 @@ bool MainWindow::event(TQEvent* e) { // executes updateFullScreen() after a ShowFullScreen or ShowNormal event got triggered if (e->type() == TQEvent::ShowFullScreen || e->type() == TQEvent::ShowNormal) updateFullScreen(); - return KMainWindow::event(e); + return TDEMainWindow::event(e); } void MainWindow::updateFullScreen() diff --git a/kturtle/src/kturtle.h b/kturtle/src/kturtle.h index 6961fcc1..b9dfd00c 100644 --- a/kturtle/src/kturtle.h +++ b/kturtle/src/kturtle.h @@ -40,7 +40,7 @@ #include "parser.h" -class KRecentFilesAction; +class TDERecentFilesAction; class MainWindow : public KParts::MainWindow @@ -142,17 +142,17 @@ class MainWindow : public KParts::MainWindow ColorPicker *picker; RestartOrBack *restartOrBackDialog; - KAction *run; - KAction *stop; - KAction *openExAction; - KAction *openFileAction; - KAction *newAction; - KAction *ContextHelp; - KToggleAction *pause; - KToggleAction *m_fullscreen; - KToggleAction *colorpicker; - KSelectAction *speed; - KRecentFilesAction *m_recentFiles; + TDEAction *run; + TDEAction *stop; + TDEAction *openExAction; + TDEAction *openFileAction; + TDEAction *newAction; + TDEAction *ContextHelp; + TDEToggleAction *pause; + TDEToggleAction *m_fullscreen; + TDEToggleAction *colorpicker; + TDESelectAction *speed; + TDERecentFilesAction *m_recentFiles; KTextEditor::View *view() const { return editor; } KTextEditor::EditInterface *editorInterface; |