diff options
Diffstat (limited to 'yakuake/src/main_window.cpp')
-rw-r--r-- | yakuake/src/main_window.cpp | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/yakuake/src/main_window.cpp b/yakuake/src/main_window.cpp index d56df46..0592307 100644 --- a/yakuake/src/main_window.cpp +++ b/yakuake/src/main_window.cpp @@ -69,7 +69,7 @@ MainWindow::MainWindow(TQWidget * parent, const char * name) : global_key = new TDEGlobalAccel(this); global_key->insert("AccessKey", i18n("Open/Retract Yakuake"), i18n("Slides the Yakuake window in and out"), - Key_F12, 0, this, TQT_SLOT(slotToggleState())); + Key_F12, 0, this, TQ_SLOT(slotToggleState())); global_key->readSettings(&config); global_key->updateConnections(); @@ -82,70 +82,70 @@ MainWindow::MainWindow(TQWidget * parent, const char * name) : TDEShortcut shortcut(TQt::CTRL+TQt::ALT+TQt::Key_N); shortcut.append(TDEShortcut(TQt::CTRL+TQt::SHIFT+TQt::Key_N)); action = new TDEAction(i18n("New Session"), SmallIcon("tab_new"), shortcut, - this, TQT_SLOT(slotAddSession()), + this, TQ_SLOT(slotAddSession()), actionCollection(), "add_tab"); action = new TDEAction(i18n("Two Terminals, Horizontal"), SmallIcon("tab_new"), - 0, this, TQT_SLOT(slotAddSessionTwoVertical()), + 0, this, TQ_SLOT(slotAddSessionTwoVertical()), actionCollection(), "add_tab_twohorizontal"); action = new TDEAction(i18n("Two Terminals, Vertical"), SmallIcon("tab_new"), - 0, this, TQT_SLOT(slotAddSessionTwoHorizontal()), + 0, this, TQ_SLOT(slotAddSessionTwoHorizontal()), actionCollection(), "add_tab_twovertical"); action = new TDEAction(i18n("Four Terminals, Quad"), SmallIcon("tab_new"), - 0, this, TQT_SLOT(slotAddSessionQuad()), + 0, this, TQ_SLOT(slotAddSessionQuad()), actionCollection(), "add_tab_quad"); action = new TDEAction(i18n("Go to Next Terminal"), SmallIcon("go-next"), - "Ctrl+Shift+Up", this, TQT_SLOT(slotFocusNextSplit()), + "Ctrl+Shift+Up", this, TQ_SLOT(slotFocusNextSplit()), actionCollection(), "focus_next_terminal"); action = new TDEAction(i18n("Go to Previous Terminal"), SmallIcon("go-previous"), - "Ctrl+Shift+Down", this, TQT_SLOT(slotFocusPreviousSplit()), + "Ctrl+Shift+Down", this, TQ_SLOT(slotFocusPreviousSplit()), actionCollection(), "focus_previous_terminal"); action = new TDEAction(i18n("Paste"), SmallIcon("edit-paste"), SHIFT+Key_Insert, - this, TQT_SLOT(slotPasteClipboard()), + this, TQ_SLOT(slotPasteClipboard()), actionCollection(), "paste_clipboard"); action = new TDEAction(i18n("Paste Selection"), SmallIcon("edit-paste"), - CTRL+SHIFT+Key_Insert, this, TQT_SLOT(slotPasteSelection()), + CTRL+SHIFT+Key_Insert, this, TQ_SLOT(slotPasteSelection()), actionCollection(), "paste_selection"); action = new TDEAction(i18n("Rename Session..."), SmallIcon("edit"), - "Alt+Ctrl+S", this, TQT_SLOT(slotInteractiveRename()), + "Alt+Ctrl+S", this, TQ_SLOT(slotInteractiveRename()), actionCollection(), "edit_name"); action = new TDEAction(i18n("Increase Width"), SmallIcon("zoom-in"), - "Alt+Shift+Right", this, TQT_SLOT(slotIncreaseSizeW()), + "Alt+Shift+Right", this, TQ_SLOT(slotIncreaseSizeW()), actionCollection(), "increasew"); action = new TDEAction(i18n("Decrease Width"), SmallIcon("zoom-out"), - "Alt+Shift+Left", this, TQT_SLOT(slotDecreaseSizeW()), + "Alt+Shift+Left", this, TQ_SLOT(slotDecreaseSizeW()), actionCollection(), "decreasew"); action = new TDEAction(i18n("Increase Height"), SmallIcon("zoom-in"), - "Alt+Shift+Down", this, TQT_SLOT(slotIncreaseSizeH()), + "Alt+Shift+Down", this, TQ_SLOT(slotIncreaseSizeH()), actionCollection(), "increaseh"); action = new TDEAction(i18n("Decrease Height"), SmallIcon("zoom-out"), - "Alt+Shift+Up", this, TQT_SLOT(slotDecreaseSizeH()), + "Alt+Shift+Up", this, TQ_SLOT(slotDecreaseSizeH()), actionCollection(), "decreaseh"); action = new TDEAction(i18n("Configure Global Shortcuts..."), SmallIcon("configure_shortcuts"), 0, - this, TQT_SLOT(slotSetAccessKey()), + this, TQ_SLOT(slotSetAccessKey()), actionCollection(), "global_shortcuts"); action = new TDEAction(i18n("Quit"), SmallIcon("system-log-out"), 0, this, - TQT_SLOT(close()), actionCollection(), "quit"); + TQ_SLOT(close()), actionCollection(), "quit"); - KStdAction::keyBindings(this, TQT_SLOT(slotSetControlKeys()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(slotOpenSettingsDialog()), actionCollection()); - KStdAction::aboutApp(this, TQT_SLOT(slotOpenAboutApp()), actionCollection()); - KStdAction::aboutKDE(this, TQT_SLOT(slotOpenAboutKDE()), actionCollection()); - KStdAction::whatsThis(this, TQT_SLOT(whatsThis()), actionCollection()); + KStdAction::keyBindings(this, TQ_SLOT(slotSetControlKeys()), actionCollection()); + KStdAction::preferences(this, TQ_SLOT(slotOpenSettingsDialog()), actionCollection()); + KStdAction::aboutApp(this, TQ_SLOT(slotOpenAboutApp()), actionCollection()); + KStdAction::aboutKDE(this, TQ_SLOT(slotOpenAboutKDE()), actionCollection()); + KStdAction::whatsThis(this, TQ_SLOT(whatsThis()), actionCollection()); - full_screen_action = KStdAction::fullScreen(this, TQT_SLOT(slotUpdateFullScreen()), actionCollection(), this); - connect(full_screen_action, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFullScreen(bool))); + full_screen_action = KStdAction::fullScreen(this, TQ_SLOT(slotUpdateFullScreen()), actionCollection(), this); + connect(full_screen_action, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotSetFullScreen(bool))); createMenu(); createSessionMenu(); @@ -153,47 +153,47 @@ MainWindow::MainWindow(TQWidget * parent, const char * name) : createTabsBar(); action = new TDEAction(i18n("Go to Next Session"), SmallIcon("go-next"), - "Shift+Right", tab_bar, TQT_SLOT(slotSelectNextItem()), + "Shift+Right", tab_bar, TQ_SLOT(slotSelectNextItem()), actionCollection(), "next_tab"); action = new TDEAction(i18n("Go to Previous Session"), SmallIcon("go-previous"), - "Shift+Left", tab_bar, TQT_SLOT(slotSelectPreviousItem()), + "Shift+Left", tab_bar, TQ_SLOT(slotSelectPreviousItem()), actionCollection(), "previous_tab"); action = new TDEAction(i18n("Move Session Left"), SmallIcon("back"), - "Ctrl+Shift+Left", tab_bar, TQT_SLOT(slotMoveItemLeft()), + "Ctrl+Shift+Left", tab_bar, TQ_SLOT(slotMoveItemLeft()), actionCollection(), "move_tab_left"); action = new TDEAction(i18n("Move Session Right"), SmallIcon("forward"), - "Ctrl+Shift+Right", tab_bar, TQT_SLOT(slotMoveItemRight()), + "Ctrl+Shift+Right", tab_bar, TQ_SLOT(slotMoveItemRight()), actionCollection(), "move_tab_right"); remove_tab_action = new TDEAction(i18n("Close Session"), SmallIcon("window-close"), 0, this, 0, actionCollection(), "remove_tab"); - connect(remove_tab_action, TQT_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), - this, TQT_SLOT(slotHandleRemoveSession(TDEAction::ActivationReason, TQt::ButtonState))); + connect(remove_tab_action, TQ_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), + this, TQ_SLOT(slotHandleRemoveSession(TDEAction::ActivationReason, TQt::ButtonState))); split_horiz_action = new TDEAction(i18n("Split Terminal Horizontally"), SmallIcon("view_top_bottom"), CTRL+SHIFT+Key_T, this, 0, actionCollection(), "split_horizontally"); - connect(split_horiz_action, TQT_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), - this, TQT_SLOT(slotHandleVerticalSplit(TDEAction::ActivationReason, TQt::ButtonState))); + connect(split_horiz_action, TQ_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), + this, TQ_SLOT(slotHandleVerticalSplit(TDEAction::ActivationReason, TQt::ButtonState))); split_vert_action = new TDEAction(i18n("Split Terminal Vertically"), SmallIcon("view_left_right"), CTRL+SHIFT+Key_L, this, 0, actionCollection(), "split_vertically"); - connect(split_vert_action, TQT_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), - this, TQT_SLOT(slotHandleHorizontalSplit(TDEAction::ActivationReason, TQt::ButtonState))); + connect(split_vert_action, TQ_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), + this, TQ_SLOT(slotHandleHorizontalSplit(TDEAction::ActivationReason, TQt::ButtonState))); remove_term_action = new TDEAction(i18n("Close Terminal"), SmallIcon("view_remove"), CTRL+SHIFT+Key_R, this, 0, actionCollection(), "remove_terminal"); - connect(remove_term_action, TQT_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), - this, TQT_SLOT(slotHandleRemoveTerminal(TDEAction::ActivationReason, TQt::ButtonState))); + connect(remove_term_action, TQ_SIGNAL(activated(TDEAction::ActivationReason, TQt::ButtonState)), + this, TQ_SLOT(slotHandleRemoveTerminal(TDEAction::ActivationReason, TQt::ButtonState))); TQSignalMapper* tab_selection_mapper = new TQSignalMapper(this); - connect(tab_selection_mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotSelectTabPosition(int))); + connect(tab_selection_mapper, TQ_SIGNAL(mapped(int)), this, TQ_SLOT(slotSelectTabPosition(int))); for (uint i = 1; i <= 12; ++i) { TDEAction* tab_selection_action = new TDEAction(i18n("Switch to Session %1").arg(i), 0, 0, - tab_selection_mapper, TQT_SLOT(map()), actionCollection(), TQString("go_to_tab_%1").arg(i).local8Bit()); + tab_selection_mapper, TQ_SLOT(map()), actionCollection(), TQString("go_to_tab_%1").arg(i).local8Bit()); tab_selection_mapper->setMapping(tab_selection_action, i-1); } @@ -205,18 +205,18 @@ MainWindow::MainWindow(TQWidget * parent, const char * name) : // Add first session. slotAddSession(); - connect(kapp, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(slotAboutToQuit())); + connect(kapp, TQ_SIGNAL(aboutToQuit()), this, TQ_SLOT(slotAboutToQuit())); // No need for this if we're not going to use pseudo-translucency. if (use_translucency) - connect(kapp, TQT_SIGNAL(backgroundChanged(int)), this, TQT_SLOT(slotUpdateBackgroundState())); + connect(kapp, TQ_SIGNAL(backgroundChanged(int)), this, TQ_SLOT(slotUpdateBackgroundState())); - connect(tab_bar, TQT_SIGNAL(addItem()), this, TQT_SLOT(slotAddSession())); - connect(tab_bar, TQT_SIGNAL(removeItem()), this, TQT_SLOT(slotRemoveSession())); - connect(tab_bar, TQT_SIGNAL(itemSelected(int)), this, TQT_SLOT(slotSelectSession(int))); - connect(&desk_info, TQT_SIGNAL(workAreaChanged()), this, TQT_SLOT(slotUpdateSize())); + connect(tab_bar, TQ_SIGNAL(addItem()), this, TQ_SLOT(slotAddSession())); + connect(tab_bar, TQ_SIGNAL(removeItem()), this, TQ_SLOT(slotRemoveSession())); + connect(tab_bar, TQ_SIGNAL(itemSelected(int)), this, TQ_SLOT(slotSelectSession(int))); + connect(&desk_info, TQ_SIGNAL(workAreaChanged()), this, TQ_SLOT(slotUpdateSize())); - connect(&poller, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPollMouse())); + connect(&poller, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotPollMouse())); // Startup notification popup. if (Settings::popup() && !Settings::firstrun()) @@ -225,8 +225,8 @@ MainWindow::MainWindow(TQWidget * parent, const char * name) : // First run dialog. if (Settings::firstrun()) { - TQTimer::singleShot(0, this, TQT_SLOT(slotToggleState())); - TQTimer::singleShot(0, this, TQT_SLOT(slotOpenFirstRunDialog())); + TQTimer::singleShot(0, this, TQ_SLOT(slotToggleState())); + TQTimer::singleShot(0, this, TQ_SLOT(slotOpenFirstRunDialog())); } else if (Settings::poll()) toggleMousePoll(true); @@ -352,8 +352,8 @@ void MainWindow::slotAddSessionQuad() void MainWindow::slotAddSession(Session::SessionType type) { Session* session = new Session(widgets_stack, type); - connect(session, TQT_SIGNAL(destroyed(int)), this, TQT_SLOT(slotSessionDestroyed(int))); - connect(session, TQT_SIGNAL(titleChanged(const TQString&)), this, TQT_SLOT(slotUpdateTitle(const TQString&))); + connect(session, TQ_SIGNAL(destroyed(int)), this, TQ_SLOT(slotSessionDestroyed(int))); + connect(session, TQ_SIGNAL(titleChanged(const TQString&)), this, TQ_SLOT(slotUpdateTitle(const TQString&))); widgets_stack->addWidget(session->widget()); sessions_stack.insert(session->id(), session); @@ -744,7 +744,7 @@ void MainWindow::createTabsBar() /* Creates the tabs frame. */ tab_bar = new TabBar(this, "Session tab bar", use_translucency, Settings::skin()); - connect(this, TQT_SIGNAL(updateBackground()), tab_bar, TQT_SIGNAL(updateBackground())); + connect(this, TQ_SIGNAL(updateBackground()), tab_bar, TQ_SIGNAL(updateBackground())); tab_bar->setSessionMenu(session_menu); @@ -782,18 +782,18 @@ void MainWindow::createMenu() if (TQApplication::desktop()->numScreens() > 1) { menu->insertItem(i18n("Open on screen"), screen_menu); - connect(screen_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetScreen(int))); + connect(screen_menu, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotSetScreen(int))); } width_menu = new TDEPopupMenu(menu); menu->insertItem(i18n("Width"), width_menu); - connect(width_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetWidth(int))); + connect(width_menu, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotSetWidth(int))); height_menu = new TDEPopupMenu(menu); menu->insertItem(i18n("Height"), height_menu); - connect(height_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetHeight(int))); + connect(height_menu, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotSetHeight(int))); - menu->insertItem(i18n("Keep open on focus change"), this, TQT_SLOT(slotSetFocusPolicy()), 0, Focus); + menu->insertItem(i18n("Keep open on focus change"), this, TQ_SLOT(slotSetFocusPolicy()), 0, Focus); menu->insertTitle(i18n("Settings")); @@ -922,7 +922,7 @@ void MainWindow::slotToggleState() show(); KWin::forceActiveWindow(winId()); - connect(&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotIncreaseHeight())); + connect(&timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotIncreaseHeight())); initWindowProps(); timer.start(10, false); state = !state; @@ -939,7 +939,7 @@ void MainWindow::slotToggleState() else if (full_screen) this->setWindowState( this->windowState() & ~TQt::WindowFullScreen); - connect(&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDecreaseHeight())); + connect(&timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotDecreaseHeight())); timer.start(10, false); state = !state; } @@ -957,7 +957,7 @@ void MainWindow::slotIncreaseHeight() { step = steps; timer.stop(); - disconnect(&timer, TQT_SIGNAL(timeout()), 0, 0); + disconnect(&timer, TQ_SIGNAL(timeout()), 0, 0); mask_height = max_height; @@ -986,7 +986,7 @@ void MainWindow::slotDecreaseHeight() { step = 0; timer.stop(); - disconnect(&timer, TQT_SIGNAL(timeout()), 0, 0); + disconnect(&timer, TQ_SIGNAL(timeout()), 0, 0); hide(); @@ -1205,16 +1205,16 @@ void MainWindow::slotOpenSettingsDialog() GeneralSettings* general_settings = new GeneralSettings(settings_dialog, "General"); settings_dialog->addPage(general_settings, i18n("General"), "package_settings"); - connect(general_settings, TQT_SIGNAL(updateSize(int, int, int)), this, TQT_SLOT(slotUpdateSize(int, int, int))); + connect(general_settings, TQ_SIGNAL(updateSize(int, int, int)), this, TQ_SLOT(slotUpdateSize(int, int, int))); SkinSettings* skin_settings = new SkinSettings(settings_dialog, "Skins", use_translucency); settings_dialog->addPage(skin_settings, i18n("Skins"), "style"); - connect(skin_settings, TQT_SIGNAL(settingsChanged()), settings_dialog, TQT_SIGNAL(settingsChanged())); - connect(settings_dialog, TQT_SIGNAL(closeClicked()), skin_settings, TQT_SLOT(slotResetSelection())); - connect(settings_dialog, TQT_SIGNAL(cancelClicked()), skin_settings, TQT_SLOT(slotResetSelection())); + connect(skin_settings, TQ_SIGNAL(settingsChanged()), settings_dialog, TQ_SIGNAL(settingsChanged())); + connect(settings_dialog, TQ_SIGNAL(closeClicked()), skin_settings, TQ_SLOT(slotResetSelection())); + connect(settings_dialog, TQ_SIGNAL(cancelClicked()), skin_settings, TQ_SLOT(slotResetSelection())); - connect(settings_dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotUpdateSettings())); - connect(settings_dialog, TQT_SIGNAL(hidden()), this, TQT_SLOT(slotDialogFinished())); + connect(settings_dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(slotUpdateSettings())); + connect(settings_dialog, TQ_SIGNAL(hidden()), this, TQ_SLOT(slotDialogFinished())); settings_dialog->show(); } @@ -1226,10 +1226,10 @@ void MainWindow::slotOpenFirstRunDialog() first_run_dialog = new KDialogBase(this, "First Run Dialog", true, i18n("First Run"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true); - connect(first_run_dialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotFirstRunDialogOK())); - connect(first_run_dialog, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotFirstRunDialogCancel())); - connect(first_run_dialog, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(slotFirstRunDialogCancel())); - connect(first_run_dialog, TQT_SIGNAL(hidden()), this, TQT_SLOT(slotDialogFinished())); + connect(first_run_dialog, TQ_SIGNAL(okClicked()), this, TQ_SLOT(slotFirstRunDialogOK())); + connect(first_run_dialog, TQ_SIGNAL(cancelClicked()), this, TQ_SLOT(slotFirstRunDialogCancel())); + connect(first_run_dialog, TQ_SIGNAL(closeClicked()), this, TQ_SLOT(slotFirstRunDialogCancel())); + connect(first_run_dialog, TQ_SIGNAL(hidden()), this, TQ_SLOT(slotDialogFinished())); FirstRunDialog* first_run_dialog_page = new FirstRunDialog(first_run_dialog); first_run_dialog_page->setMinimumSize(first_run_dialog_page->sizeHint()); @@ -1281,7 +1281,7 @@ void MainWindow::slotOpenAboutApp() if (!about_app) { about_app = new TDEAboutApplication(this, "About Yakuake"); - connect(about_app, TQT_SIGNAL(hidden()), this, TQT_SLOT(slotDialogFinished())); + connect(about_app, TQ_SIGNAL(hidden()), this, TQ_SLOT(slotDialogFinished())); } if (full_screen) full_screen_action->activate(); @@ -1297,7 +1297,7 @@ void MainWindow::slotOpenAboutKDE() if (!about_kde) { about_kde = new TDEAboutKDE(this, "About KDE"); - connect(about_kde, TQT_SIGNAL(hidden()), this, TQT_SLOT(slotDialogFinished())); + connect(about_kde, TQ_SIGNAL(hidden()), this, TQ_SLOT(slotDialogFinished())); } if (full_screen) full_screen_action->activate(); |