diff options
Diffstat (limited to 'kexi/main/keximainwindowimpl.cpp')
-rw-r--r-- | kexi/main/keximainwindowimpl.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index ce29b32e..4bfaef61 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -316,13 +316,13 @@ KexiMainWindowImpl::KexiMainWindowImpl() //disabled (possible crash) d->hideMenuItem("file", i18n("&Import"), true); //disabled (possible crash) d->hideMenuItem("help", i18n( "&Report Bug..." ), true); #endif - KAction *tdemdi_tooldock_menu_action = childClients()->getFirst() ? childClients()->getFirst()->actionCollection()->action("tdemdi_tooldock_menu") : 0; + TDEAction *tdemdi_tooldock_menu_action = childClients()->getFirst() ? childClients()->getFirst()->actionCollection()->action("tdemdi_tooldock_menu") : 0; if (tdemdi_tooldock_menu_action) { tdemdi_tooldock_menu_action->setEnabled(false); } if (!isFakingSDIApplication()/* && !userMode()*/) { -// TQPopupMenu *menu = (TQPopupMenu*) child( "window", "KPopupMenu" ); +// TQPopupMenu *menu = (TQPopupMenu*) child( "window", "TDEPopupMenu" ); TQPopupMenu *menu = d->popups["window"]; unsigned int count = menuBar()->count(); if (menu) @@ -506,7 +506,7 @@ TQPopupMenu* KexiMainWindowImpl::findPopupMenu(const char *popupName) return d->popups[popupName]; } -KActionPtrList KexiMainWindowImpl::allActions() const +TDEActionPtrList KexiMainWindowImpl::allActions() const { return actionCollection()->actions(); } @@ -518,13 +518,13 @@ KexiDialogBase* KexiMainWindowImpl::currentDialog() const void KexiMainWindowImpl::initActions() { -// setupGUI(KMainWindow::Keys|KMainWindow::StatusBar|KMainWindow::Save|KMainWindow::Create); +// setupGUI(TDEMainWindow::Keys|TDEMainWindow::StatusBar|TDEMainWindow::Save|TDEMainWindow::Create); // d->actionMapper = new TQSignalMapper(this, "act_map"); // connect(d->actionMapper, TQT_SIGNAL(mapped(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotAction(const TQString &))); // PROJECT MENU - KAction *action = new KAction(i18n("&New..."), "filenew", KStdAccel::shortcut(KStdAccel::New), + TDEAction *action = new TDEAction(i18n("&New..."), "filenew", TDEStdAccel::shortcut(TDEStdAccel::New), TQT_TQOBJECT(this), TQT_SLOT(slotProjectNew()), actionCollection(), "project_new"); action->setToolTip(i18n("Create a new project")); action->setWhatsThis(i18n("Creates a new project. Currently opened project is not affected.")); @@ -534,7 +534,7 @@ void KexiMainWindowImpl::initActions() action->setWhatsThis(i18n("Opens an existing project. Currently opened project is not affected.")); #ifdef HAVE_KNEWSTUFF - action = new KAction(i18n("&Download Example Databases..."), "kget", KShortcut(0), + action = new TDEAction(i18n("&Download Example Databases..."), "kget", TDEShortcut(0), TQT_TQOBJECT(this), TQT_SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples"); action->setToolTip(i18n("Download example databases from the Internet")); action->setWhatsThis(i18n("Downloads example databases from the Internet.")); @@ -544,7 +544,7 @@ void KexiMainWindowImpl::initActions() //#ifdef KEXI_SHOW_UNIMPLEMENTED #ifndef KEXI_NO_UNFINISHED - d->action_open_recent = new KActionMenu(i18n("Open Recent"), + d->action_open_recent = new TDEActionMenu(i18n("Open Recent"), actionCollection(), "project_open_recent"); connect(d->action_open_recent->popupMenu(),TQT_SIGNAL(activated(int)), this,TQT_SLOT(slotProjectOpenRecent(int))); @@ -563,26 +563,26 @@ void KexiMainWindowImpl::initActions() d->action_save = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( slotProjectSave() ), actionCollection(), "project_save" ); -// d->action_save = new KAction(i18n("&Save"), "filesave", KStdAccel::shortcut(KStdAccel::Save), +// d->action_save = new TDEAction(i18n("&Save"), "filesave", TDEStdAccel::shortcut(TDEStdAccel::Save), // TQT_TQOBJECT(this), TQT_SLOT(slotProjectSave()), actionCollection(), "project_save"); d->action_save->setToolTip(i18n("Save object changes")); d->action_save->setWhatsThis(i18n("Saves object changes from currently selected window.")); #ifdef KEXI_SHOW_UNIMPLEMENTED - d->action_save_as = new KAction(i18n("Save &As..."), "filesaveas", 0, + d->action_save_as = new TDEAction(i18n("Save &As..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas"); d->action_save_as->setToolTip(i18n("Save object as")); d->action_save_as->setWhatsThis( i18n("Saves object changes from currently selected window under a new name (within the same project).")); - d->action_project_properties = new KAction(i18n("Project Properties"), "info", 0, + d->action_project_properties = new TDEAction(i18n("Project Properties"), "info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectProperties()), actionCollection(), "project_properties"); #else d->action_save_as = d->dummy_action; d->action_project_properties = d->dummy_action; #endif - d->action_close = new KAction(i18n("&Close Project"), "fileclose", 0, + d->action_close = new TDEAction(i18n("&Close Project"), "fileclose", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectClose()), actionCollection(), "project_close" ); d->action_close->setToolTip(i18n("Close the current project")); d->action_close->setWhatsThis(i18n("Closes the current project.")); @@ -590,7 +590,7 @@ void KexiMainWindowImpl::initActions() KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotProjectQuit()), actionCollection(), "quit"); #ifdef KEXI_SHOW_UNIMPLEMENTED - d->action_project_relations = new KAction(i18n("&Relationships..."), "relation", TQt::CTRL + TQt::Key_R, + d->action_project_relations = new TDEAction(i18n("&Relationships..."), "relation", TQt::CTRL + TQt::Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotProjectRelations()), actionCollection(), "project_relations"); d->action_project_relations->setToolTip(i18n("Project relationships")); d->action_project_relations->setWhatsThis(i18n("Shows project relationships.")); @@ -598,13 +598,13 @@ void KexiMainWindowImpl::initActions() #else d->action_project_relations = d->dummy_action; #endif - d->action_tools_data_migration = new KAction( + d->action_tools_data_migration = new TDEAction( i18n("&Import Database..."), "database_import", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project"); d->action_tools_data_migration->setToolTip(i18n("Import entire database as a Kexi project")); d->action_tools_data_migration->setWhatsThis(i18n("Imports entire database as a Kexi project.")); - d->action_tools_compact_database = new KAction( + d->action_tools_compact_database = new TDEAction( i18n("&Compact Database..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database"); d->action_tools_compact_database->setToolTip(i18n("Compact the current database project")); @@ -614,7 +614,7 @@ void KexiMainWindowImpl::initActions() if (userMode()) d->action_project_import_data_table = 0; else { - d->action_project_import_data_table = new KAction( + d->action_project_import_data_table = new TDEAction( i18n("Import->Table Data From File...", "Table Data From &File..."), "table"/*! @todo: change to "file_import" or so*/, 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectImportDataTable()), actionCollection(), @@ -623,7 +623,7 @@ void KexiMainWindowImpl::initActions() d->action_project_import_data_table->setWhatsThis(i18n("Imports table data from a file.")); } - d->action_project_export_data_table = new KAction(i18n("Export->Table or Query Data to File...", + d->action_project_export_data_table = new TDEAction(i18n("Export->Table or Query Data to File...", "Table or Query Data to &File..."), "table"/*! @todo: change to "file_export" or so*/, 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectExportDataTable()), actionCollection(), @@ -633,9 +633,9 @@ void KexiMainWindowImpl::initActions() d->action_project_export_data_table->setWhatsThis( i18n("Exports data from the active table or query data to a file.")); -//TODO new KAction(i18n("From File..."), "fileopen", 0, +//TODO new TDEAction(i18n("From File..."), "fileopen", 0, //TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportFile()), actionCollection(), "project_import_file"); -//TODO new KAction(i18n("From Server..."), "server", 0, +//TODO new TDEAction(i18n("From Server..."), "server", 0, //TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportServer()), actionCollection(), "project_import_server"); d->action_project_print = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrint()), @@ -651,7 +651,7 @@ void KexiMainWindowImpl::initActions() d->action_project_print_preview->setWhatsThis( i18n("Shows print preview for the active table or query.")); - d->action_project_print_setup = new KAction(i18n("Page Set&up..."), + d->action_project_print_setup = new TDEAction(i18n("Page Set&up..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectPageSetup()), actionCollection(), "project_print_setup"); d->action_project_print_setup->setToolTip( @@ -668,7 +668,7 @@ void KexiMainWindowImpl::initActions() d->action_edit_paste_special_data_table = 0; else { d->action_edit_paste_special_data_table = - new KAction(i18n("Paste Special->As Data &Table...", "As Data &Table..."), + new TDEAction(i18n("Paste Special->As Data &Table...", "As Data &Table..."), "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPasteSpecialDataTable()), actionCollection(), "edit_paste_special_data_table"); d->action_edit_paste_special_data_table->setToolTip( @@ -678,7 +678,7 @@ void KexiMainWindowImpl::initActions() } d->action_edit_copy_special_data_table = - new KAction(i18n("Copy Special->Table or Query Data...", + new TDEAction(i18n("Copy Special->Table or Query Data...", "Table or Query as Data Table..."), "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditCopySpecialDataTable()), actionCollection(), "edit_copy_special_data_table"); @@ -710,7 +710,7 @@ void KexiMainWindowImpl::initActions() //! @todo d->action_edit_replace = KStdAction::replace( //! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplace()), actionCollection(), "project_print_preview" ); d->action_edit_replace_all = 0; -//! @todo d->action_edit_replace_all = new KAction( i18n("Replace All"), "", 0, +//! @todo d->action_edit_replace_all = new TDEAction( i18n("Replace All"), "", 0, //! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall"); d->action_edit_select_all = createSharedAction( KStdAction::SelectAll, "edit_select_all"); @@ -744,7 +744,7 @@ void KexiMainWindowImpl::initActions() //VIEW MENU if (!userMode()) { - d->action_view_data_mode = new KRadioAction(i18n("&Data View"), "state_data", TQt::Key_F6, + d->action_view_data_mode = new TDERadioAction(i18n("&Data View"), "state_data", TQt::Key_F6, TQT_TQOBJECT(this), TQT_SLOT(slotViewDataMode()), actionCollection(), "view_data_mode"); d->actions_for_view_modes.insert( Kexi::DataViewMode, d->action_view_data_mode ); d->action_view_data_mode->setExclusiveGroup("view_mode"); @@ -755,7 +755,7 @@ void KexiMainWindowImpl::initActions() d->action_view_data_mode = 0; if (!userMode()) { - d->action_view_design_mode = new KRadioAction(i18n("D&esign View"), "state_edit", TQt::Key_F7, + d->action_view_design_mode = new TDERadioAction(i18n("D&esign View"), "state_edit", TQt::Key_F7, TQT_TQOBJECT(this), TQT_SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode"); d->actions_for_view_modes.insert( Kexi::DesignViewMode, d->action_view_design_mode ); d->action_view_design_mode->setExclusiveGroup("view_mode"); @@ -766,7 +766,7 @@ void KexiMainWindowImpl::initActions() d->action_view_design_mode = 0; if (!userMode()) { - d->action_view_text_mode = new KRadioAction(i18n("&Text View"), "state_sql", TQt::Key_F8, + d->action_view_text_mode = new TDERadioAction(i18n("&Text View"), "state_sql", TQt::Key_F8, TQT_TQOBJECT(this), TQT_SLOT(slotViewTextMode()), actionCollection(), "view_text_mode"); d->actions_for_view_modes.insert( Kexi::TextViewMode, d->action_view_text_mode ); d->action_view_text_mode->setExclusiveGroup("view_mode"); @@ -777,7 +777,7 @@ void KexiMainWindowImpl::initActions() d->action_view_text_mode = 0; if (d->isProjectNavigatorVisible) { - d->action_view_nav = new KAction(i18n("Project Navigator"), "", TQt::ALT + TQt::Key_1, + d->action_view_nav = new TDEAction(i18n("Project Navigator"), "", TQt::ALT + TQt::Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotViewNavigator()), actionCollection(), "view_navigator"); d->action_view_nav->setToolTip(i18n("Go to project navigator panel")); d->action_view_nav->setWhatsThis(i18n("Goes to project navigator panel.")); @@ -785,13 +785,13 @@ void KexiMainWindowImpl::initActions() else d->action_view_nav = 0; - d->action_view_mainarea = new KAction(i18n("Main Area"), "", TQt::ALT + TQt::Key_2, + d->action_view_mainarea = new TDEAction(i18n("Main Area"), "", TQt::ALT + TQt::Key_2, TQT_TQOBJECT(this), TQT_SLOT(slotViewMainArea()), actionCollection(), "view_mainarea"); d->action_view_mainarea->setToolTip(i18n("Go to main area")); d->action_view_mainarea->setWhatsThis(i18n("Goes to main area.")); if (!userMode()) { - d->action_view_propeditor = new KAction(i18n("Property Editor"), "", TQt::ALT + TQt::Key_3, + d->action_view_propeditor = new TDEAction(i18n("Property Editor"), "", TQt::ALT + TQt::Key_3, TQT_TQOBJECT(this), TQT_SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor"); d->action_view_propeditor->setToolTip(i18n("Go to property editor panel")); d->action_view_propeditor->setWhatsThis(i18n("Goes to property editor panel.")); @@ -851,13 +851,13 @@ void KexiMainWindowImpl::initActions() //WINDOW MENU #ifndef TQ_WS_WIN //KMDI <= 3.5.1 has no shortcut here: - KAction *closeWindowAction = actionCollection()->action("window_close"); + TDEAction *closeWindowAction = actionCollection()->action("window_close"); if (closeWindowAction) - closeWindowAction->setShortcut(KStdAccel::close()); + closeWindowAction->setShortcut(TDEStdAccel::close()); #endif //additional 'Window' menu items - d->action_window_next = new KAction( i18n("&Next Window"), "", + d->action_window_next = new TDEAction( i18n("&Next Window"), "", #ifdef TQ_WS_WIN TQt::CTRL+TQt::Key_Tab, #else @@ -867,7 +867,7 @@ void KexiMainWindowImpl::initActions() d->action_window_next->setToolTip( i18n("Next window") ); d->action_window_next->setWhatsThis(i18n("Switches to the next window.")); - d->action_window_previous = new KAction( i18n("&Previous Window"), "", + d->action_window_previous = new TDEAction( i18n("&Previous Window"), "", #ifdef TQ_WS_WIN TQt::CTRL+TQt::SHIFT+TQt::Key_Tab, #else @@ -886,12 +886,12 @@ void KexiMainWindowImpl::initActions() action = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); action->setWhatsThis(i18n("Lets you configure toolbars.")); - d->action_show_other = new KActionMenu(i18n("Other"), + d->action_show_other = new TDEActionMenu(i18n("Other"), actionCollection(), "options_show_other"); #endif #ifndef KEXI_NO_CTXT_HELP - d->action_show_helper = new KToggleAction(i18n("Show Context Help"), "", TQt::CTRL + TQt::Key_H, + d->action_show_helper = new TDEToggleAction(i18n("Show Context Help"), "", TQt::CTRL + TQt::Key_H, actionCollection(), "options_show_contexthelp"); #if KDE_IS_VERSION(3,2,90) d->action_show_helper->setCheckedState(i18n("Hide Context Help")); @@ -933,18 +933,18 @@ void KexiMainWindowImpl::initActions() ->setWhatsThis(i18n("This shows useful tips on the use of this application.")); #endif #if 0 //we don't have a time for updating info text for each new version - new KAction(i18n("Important Information"), "messagebox_info", 0, + new TDEAction(i18n("Important Information"), "messagebox_info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info"); #endif //TODO: UNCOMMENT TO REMOVE MDI MODES SETTING m_pMdiModeMenu->hide(); #ifndef KEXI_NO_FEEDBACK_AGENT #ifdef FEEDBACK_CLASS - new KAction(i18n("Give Feedback..."), "messagebox_info", 0, + new TDEAction(i18n("Give Feedback..."), "messagebox_info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent"); #endif #endif -// KAction *actionSettings = new KAction(i18n("Configure Kexi..."), "configure", 0, +// TDEAction *actionSettings = new TDEAction(i18n("Configure Kexi..."), "configure", 0, // actionCollection(), "kexi_settings"); // actionSettings->setWhatsThis(i18n("Lets you configure Kexi.")); // connect(actionSettings, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings())); @@ -1373,7 +1373,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr KURL url; url.setPath( fname ); if (url.isLocalFile()) - KRecentDirs::add(startDir, url.directory()); + TDERecentDirs::add(startDir, url.directory()); } #else Q_UNUSED(projectData); @@ -1394,7 +1394,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr dlg.exec(); fname = dlg.selectedFile(); if (!fname.isEmpty()) - KRecentDocument::add(fname); + TDERecentDocument::add(fname); // fname = KFileDialog::getSaveFileName(fname.isEmpty() ? startDir : fname, // mimetypes.join(" "), this, caption); #endif @@ -1420,9 +1420,9 @@ void KexiMainWindowImpl::updateReadOnlyState() if (d->nav) d->nav->setReadOnly(readOnly); // update "insert ....." actions for every part - KActionCollection *ac = actionCollection(); + TDEActionCollection *ac = actionCollection(); for (KexiPart::PartInfoListIterator it(*Kexi::partManager().partInfoList()); it.current(); ++it) { - KAction *a = ac->action( TQString(KexiPart::nameForCreateAction( *it.current() )).ascii() ); + TDEAction *a = ac->action( TQString(KexiPart::nameForCreateAction( *it.current() )).ascii() ); if (a) a->setEnabled(!readOnly); } @@ -2797,7 +2797,7 @@ KexiMainWindowImpl::slotProjectOpenRecentAboutToShow() { /* //setup - KPopupMenu *popup = d->action_open_recent->popupMenu(); + TDEPopupMenu *popup = d->action_open_recent->popupMenu(); const int cnt = popup->count(); //remove older for (int i = 0; i<cnt; i++) { @@ -2817,7 +2817,7 @@ KexiMainWindowImpl::slotProjectOpenRecentAboutToShow() */ //show recent databases - KPopupMenu *popup = d->action_open_recent->popupMenu(); + TDEPopupMenu *popup = d->action_open_recent->popupMenu(); popup->clear(); #if 0 d->action_open_recent_projects_title_id = popup->insertTitle(i18n("Recently Opened Databases")); |