diff options
Diffstat (limited to 'src/app/mainwindow.cpp')
-rw-r--r-- | src/app/mainwindow.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index c159dd2..0ce4417 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -163,7 +163,7 @@ static bool urlIsDirectory(TQWidget* parent, const KURL& url) { MainWindow::MainWindow() -: KMainWindow() +: TDEMainWindow() #ifdef GV_HAVE_KIPI , mPluginLoader(0) #endif @@ -183,7 +183,7 @@ MainWindow::MainWindow() createConnections(); mWindowListActions.setAutoDelete(true); updateWindowActions(); - KMainWindow::applyMainWindowSettings(TDEGlobal::config(), "MainWindow"); + TDEMainWindow::applyMainWindowSettings(TDEGlobal::config(), "MainWindow"); } @@ -312,7 +312,7 @@ void MainWindow::updateFullScreenLabel() { } void MainWindow::goUpTo(int id) { - KPopupMenu* menu=mGoUp->popupMenu(); + TDEPopupMenu* menu=mGoUp->popupMenu(); KURL url(menu->text(id)); KURL childURL; int index=menu->indexOf(id); @@ -538,8 +538,8 @@ void MainWindow::slotImageLoaded() { void MainWindow::hideToolBars() { - TQPtrListIterator<KToolBar> it=toolBarIterator(); - KToolBar* bar; + TQPtrListIterator<TDEToolBar> it=toolBarIterator(); + TDEToolBar* bar; for(;it.current()!=0L; ++it) { bar=it.current(); @@ -553,9 +553,9 @@ void MainWindow::hideToolBars() { void MainWindow::showToolBars() { - TQPtrListIterator<KToolBar> it=toolBarIterator(); + TQPtrListIterator<TDEToolBar> it=toolBarIterator(); - KToolBar* bar; + TDEToolBar* bar; for(;it.current()!=0L; ++it) { bar=it.current(); @@ -698,7 +698,7 @@ void MainWindow::showToolBarDialog() { void MainWindow::applyMainWindowSettings() { createGUI(); - KMainWindow::applyMainWindowSettings(TDEGlobal::config(), "MainWindow"); + TDEMainWindow::applyMainWindowSettings(TDEGlobal::config(), "MainWindow"); } @@ -757,7 +757,7 @@ void MainWindow::slotToggleCentralStack() { // Make sure the window list actions are disabled if we are in view mode, // otherwise weird things happens when we go back to browse mode - TQPtrListIterator<KAction> it(mWindowListActions); + TQPtrListIterator<TDEAction> it(mWindowListActions); for (;it.current(); ++it) { it.current()->setEnabled(mSwitchToBrowseMode->isChecked()); } @@ -964,10 +964,10 @@ void MainWindow::createWidgets() { */ void MainWindow::createActions() { // Stack - mSwitchToBrowseMode=new KRadioAction(i18n("Browse"), "folder_image", CTRL + Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_browse_mode"); + mSwitchToBrowseMode=new TDERadioAction(i18n("Browse"), "folder_image", CTRL + Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_browse_mode"); mSwitchToBrowseMode->setExclusiveGroup("centralStackMode"); mSwitchToBrowseMode->setChecked(true); - mSwitchToViewMode=new KRadioAction(i18n("View Image"), "image", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_view_mode"); + mSwitchToViewMode=new TDERadioAction(i18n("View Image"), "image", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_view_mode"); mSwitchToViewMode->setExclusiveGroup("centralStackMode"); // File @@ -975,41 +975,41 @@ void MainWindow::createActions() { mSaveFile=KStdAction::save(mDocument,TQT_SLOT(save()),actionCollection() ); mSaveFileAs=KStdAction::saveAs(mDocument,TQT_SLOT(saveAs()),actionCollection() ); mFilePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(printFile()), actionCollection()); - mRenameFile=new KAction(i18n("&Rename..."),Key_F2,TQT_TQOBJECT(this),TQT_SLOT(renameFile()),actionCollection(),"file_rename"); - mCopyFiles=new KAction(i18n("&Copy To..."),Key_F7,TQT_TQOBJECT(this),TQT_SLOT(copyFiles()),actionCollection(),"file_copy"); - mMoveFiles=new KAction(i18n("&Move To..."),Key_F8,TQT_TQOBJECT(this),TQT_SLOT(moveFiles()),actionCollection(),"file_move"); - mLinkFiles=new KAction(i18n("&Link To..."),Key_F9,TQT_TQOBJECT(this),TQT_SLOT(linkFiles()),actionCollection(),"file_link"); - mDeleteFiles=new KAction(i18n("&Delete"),"editdelete",Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(deleteFiles()),actionCollection(),"file_delete"); - mShowFileProperties=new KAction(i18n("Properties"),0,TQT_TQOBJECT(this),TQT_SLOT(showFileProperties()),actionCollection(),"file_properties"); + mRenameFile=new TDEAction(i18n("&Rename..."),Key_F2,TQT_TQOBJECT(this),TQT_SLOT(renameFile()),actionCollection(),"file_rename"); + mCopyFiles=new TDEAction(i18n("&Copy To..."),Key_F7,TQT_TQOBJECT(this),TQT_SLOT(copyFiles()),actionCollection(),"file_copy"); + mMoveFiles=new TDEAction(i18n("&Move To..."),Key_F8,TQT_TQOBJECT(this),TQT_SLOT(moveFiles()),actionCollection(),"file_move"); + mLinkFiles=new TDEAction(i18n("&Link To..."),Key_F9,TQT_TQOBJECT(this),TQT_SLOT(linkFiles()),actionCollection(),"file_link"); + mDeleteFiles=new TDEAction(i18n("&Delete"),"editdelete",Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(deleteFiles()),actionCollection(),"file_delete"); + mShowFileProperties=new TDEAction(i18n("Properties"),0,TQT_TQOBJECT(this),TQT_SLOT(showFileProperties()),actionCollection(),"file_properties"); KStdAction::quit( TQT_TQOBJECT(kapp), TQT_SLOT (closeAllWindows()), actionCollection() ); // Edit - mRotateLeft=new KAction(i18n("Rotate &Left"),"rotate_left",CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(rotateLeft()),actionCollection(),"rotate_left"); - mRotateRight=new KAction(i18n("Rotate &Right"),"rotate_right",CTRL + Key_R, TQT_TQOBJECT(this), TQT_SLOT(rotateRight()),actionCollection(),"rotate_right"); - mMirror=new KAction(i18n("&Mirror"),"mirror",0, TQT_TQOBJECT(this), TQT_SLOT(mirror()),actionCollection(),"mirror"); - mFlip=new KAction(i18n("&Flip"),"flip",0, TQT_TQOBJECT(this), TQT_SLOT(flip()),actionCollection(),"flip"); + mRotateLeft=new TDEAction(i18n("Rotate &Left"),"rotate_left",CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(rotateLeft()),actionCollection(),"rotate_left"); + mRotateRight=new TDEAction(i18n("Rotate &Right"),"rotate_right",CTRL + Key_R, TQT_TQOBJECT(this), TQT_SLOT(rotateRight()),actionCollection(),"rotate_right"); + mMirror=new TDEAction(i18n("&Mirror"),"mirror",0, TQT_TQOBJECT(this), TQT_SLOT(mirror()),actionCollection(),"mirror"); + mFlip=new TDEAction(i18n("&Flip"),"flip",0, TQT_TQOBJECT(this), TQT_SLOT(flip()),actionCollection(),"flip"); // View - mReload=new KAction(i18n("Reload"), "reload", Key_F5, mDocument, TQT_SLOT(reload()), actionCollection(), "reload"); + mReload=new TDEAction(i18n("Reload"), "reload", Key_F5, mDocument, TQT_SLOT(reload()), actionCollection(), "reload"); mReload->setEnabled(false); mToggleFullScreen= KStdAction::fullScreen(TQT_TQOBJECT(this),TQT_SLOT(toggleFullScreen()),actionCollection(),0); - mToggleSlideShow=new KAction(i18n("Slide Show"),"slideshow_play",0,TQT_TQOBJECT(this),TQT_SLOT(toggleSlideShow()),actionCollection(),"slideshow"); - mFullScreenLabelAction=new KToolBarLabelAction("", 0, 0, 0, actionCollection(), "fullscreen_label"); + mToggleSlideShow=new TDEAction(i18n("Slide Show"),"slideshow_play",0,TQT_TQOBJECT(this),TQT_SLOT(toggleSlideShow()),actionCollection(),"slideshow"); + mFullScreenLabelAction=new TDEToolBarLabelAction("", 0, 0, 0, actionCollection(), "fullscreen_label"); // Go - mGoUp=new KToolBarPopupAction(i18n("Up"), "up", ALT + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "go_up"); - new KAction( i18n( "Home" ), "gohome", KStdAccel::shortcut(KStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection(), "go_home"); + mGoUp=new TDEToolBarPopupAction(i18n("Up"), "up", ALT + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "go_up"); + new TDEAction( i18n( "Home" ), "gohome", TDEStdAccel::shortcut(TDEStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection(), "go_home"); // Window - mResetDockWidgets = new KAction(i18n("Reset"), 0, TQT_TQOBJECT(this), TQT_SLOT(resetDockWidgets()), actionCollection(), "reset_dock_widgets"); + mResetDockWidgets = new TDEAction(i18n("Reset"), 0, TQT_TQOBJECT(this), TQT_SLOT(resetDockWidgets()), actionCollection(), "reset_dock_widgets"); // Settings mShowConfigDialog= KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showConfigDialog()), actionCollection() ); mShowKeyDialog= KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(showKeyDialog()), actionCollection() ); - (void)new KAction(i18n("Configure External Tools..."), "configure", 0, + (void)new TDEAction(i18n("Configure External Tools..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(showExternalToolDialog()), actionCollection(), "configure_tools"); (void)KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT(showToolBarDialog()), actionCollection() ); @@ -1025,7 +1025,7 @@ void MainWindow::createActions() { void MainWindow::createObjectInteractions() { // Actions in image view { - KActionPtrList actions; + TDEActionPtrList actions; actions << mToggleFullScreen << mToggleSlideShow @@ -1039,7 +1039,7 @@ void MainWindow::createObjectInteractions() { } { - KActionPtrList actions; + TDEActionPtrList actions; actions << mFileViewController->selectPrevious() << mFileViewController->selectNext() @@ -1049,7 +1049,7 @@ void MainWindow::createObjectInteractions() { } { - KActionPtrList actions; + TDEActionPtrList actions; actions << actionCollection()->action("view_zoom_in") << actionCollection()->action("view_zoom_to") @@ -1080,7 +1080,7 @@ void MainWindow::createObjectInteractions() { BookmarkOwner* bookmarkOwner=new BookmarkOwner(this); - KActionMenu* bookmark=new KActionMenu(i18n( "&Bookmarks" ), "bookmark", actionCollection(), "bookmarks" ); + TDEActionMenu* bookmark=new TDEActionMenu(i18n( "&Bookmarks" ), "bookmark", actionCollection(), "bookmarks" ); new KBookmarkMenu(manager, bookmarkOwner, bookmark->popupMenu(), 0, true); connect(bookmarkOwner,TQT_SIGNAL(openURL(const KURL&)), @@ -1099,7 +1099,7 @@ void MainWindow::createHideShowAction(KDockWidget* dock) { caption=i18n("Show %1").arg(dock->caption()); } - KAction* action=new KAction(caption, 0, TQT_TQOBJECT(dock), TQT_SLOT(changeHideShowState()), (TQObject*)0 ); + TDEAction* action=new TDEAction(caption, 0, TQT_TQOBJECT(dock), TQT_SLOT(changeHideShowState()), (TQObject*)0 ); if (dock->icon()) { action->setIconSet( TQIconSet(*dock->icon()) ); } @@ -1232,17 +1232,17 @@ void MainWindow::createLocationToolBar() { comboAction->setAutoSized(true); // Clear button - (void)new KAction( i18n("Clear Location Bar"), + (void)new TDEAction( i18n("Clear Location Bar"), TQApplication::reverseLayout()?"clear_left" : "locationbar_erase", 0, TQT_TQOBJECT(this), TQT_SLOT(clearLocationLabel()), actionCollection(), "clear_location"); // URL Label - KToolBarLabelAction* locationAction = new KToolBarLabelAction(i18n("L&ocation:"), + TDEToolBarLabelAction* locationAction = new TDEToolBarLabelAction(i18n("L&ocation:"), Key_F6, TQT_TQOBJECT(this), TQT_SLOT( activateLocationLabel()), actionCollection(), "location_label"); locationAction->setBuddy(mURLEdit); // Go button - (void)new KAction(i18n("Go"), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGo()), actionCollection(), "location_go"); + (void)new TDEAction(i18n("Go"), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGo()), actionCollection(), "location_go"); } @@ -1277,7 +1277,7 @@ void MainWindow::loadPlugins() { // with local classes, so this is declared outside of slotReplug() struct MenuInfo { TQString mName; - TQPtrList<KAction> mActions; + TQPtrList<TDEAction> mActions; MenuInfo() {} MenuInfo(const TQString& name) : mName(name) {} }; @@ -1304,8 +1304,8 @@ void MainWindow::slotReplug() { if (!plugin) continue; plugin->setup(this); - KActionPtrList actions = plugin->actions(); - KActionPtrList::ConstIterator actionIt=actions.begin(), end=actions.end(); + TDEActionPtrList actions = plugin->actions(); + TDEActionPtrList::ConstIterator actionIt=actions.begin(), end=actions.end(); for (; actionIt!=end; ++actionIt) { KIPI::Category category = plugin->category(*actionIt); @@ -1320,10 +1320,10 @@ void MainWindow::slotReplug() { } // Create a dummy "no plugin" action list - KAction* noPlugin=new KAction(i18n("No Plugin"), 0, 0, 0, actionCollection(), "no_plugin"); + TDEAction* noPlugin=new TDEAction(i18n("No Plugin"), 0, 0, 0, actionCollection(), "no_plugin"); noPlugin->setShortcutConfigurable(false); noPlugin->setEnabled(false); - TQPtrList<KAction> noPluginList; + TQPtrList<TDEAction> noPluginList; noPluginList.append(noPlugin); // Fill the menu @@ -1341,10 +1341,10 @@ void MainWindow::slotReplug() { #else void MainWindow::loadPlugins() { // Create a dummy "no KIPI" action list - KAction* noPlugin=new KAction(i18n("No KIPI support"), 0, 0, 0, actionCollection(), "no_plugin"); + TDEAction* noPlugin=new TDEAction(i18n("No KIPI support"), 0, 0, 0, actionCollection(), "no_plugin"); noPlugin->setShortcutConfigurable(false); noPlugin->setEnabled(false); - TQPtrList<KAction> noPluginList; + TQPtrList<TDEAction> noPluginList; noPluginList.append(noPlugin); TQStringList lst; |