@ -163,7 +163,7 @@ static bool urlIsDirectory(TQWidget* parent, const KURL& url) {
MainWindow : : MainWindow ( )
: K MainWindow( )
: TDE MainWindow( )
# ifdef GV_HAVE_KIPI
, mPluginLoader ( 0 )
# endif
@ -183,7 +183,7 @@ MainWindow::MainWindow()
createConnections ( ) ;
mWindowListActions . setAutoDelete ( true ) ;
updateWindowActions ( ) ;
K MainWindow: : applyMainWindowSettings ( TDEGlobal : : config ( ) , " MainWindow " ) ;
TDE MainWindow: : applyMainWindowSettings ( TDEGlobal : : config ( ) , " MainWindow " ) ;
}
@ -312,7 +312,7 @@ void MainWindow::updateFullScreenLabel() {
}
void MainWindow : : goUpTo ( int id ) {
K PopupMenu* menu = mGoUp - > popupMenu ( ) ;
TDE PopupMenu* 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 < K ToolBar> it = toolBarIterator ( ) ;
K ToolBar* bar ;
TQPtrListIterator < TDE ToolBar> it = toolBarIterator ( ) ;
TDE ToolBar* bar ;
for ( ; it . current ( ) ! = 0L ; + + it ) {
bar = it . current ( ) ;
@ -553,9 +553,9 @@ void MainWindow::hideToolBars() {
void MainWindow : : showToolBars ( ) {
TQPtrListIterator < K ToolBar> it = toolBarIterator ( ) ;
TQPtrListIterator < TDE ToolBar> it = toolBarIterator ( ) ;
K ToolBar* bar ;
TDE ToolBar* bar ;
for ( ; it . current ( ) ! = 0L ; + + it ) {
bar = it . current ( ) ;
@ -698,7 +698,7 @@ void MainWindow::showToolBarDialog() {
void MainWindow : : applyMainWindowSettings ( ) {
createGUI ( ) ;
K MainWindow: : applyMainWindowSettings ( TDEGlobal : : config ( ) , " MainWindow " ) ;
TDE MainWindow: : 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 < K Action> it ( mWindowListActions ) ;
TQPtrListIterator < TDE Action> it ( mWindowListActions ) ;
for ( ; it . current ( ) ; + + it ) {
it . current ( ) - > setEnabled ( mSwitchToBrowseMode - > isChecked ( ) ) ;
}
@ -964,10 +964,10 @@ void MainWindow::createWidgets() {
*/
void MainWindow : : createActions ( ) {
// Stack
mSwitchToBrowseMode = new K RadioAction( i18n ( " Browse " ) , " folder_image " , CTRL + Key_Return , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotToggleCentralStack ( ) ) , actionCollection ( ) , " switch_to_browse_mode " ) ;
mSwitchToBrowseMode = new TDE RadioAction( 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 K RadioAction( i18n ( " View Image " ) , " image " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotToggleCentralStack ( ) ) , actionCollection ( ) , " switch_to_view_mode " ) ;
mSwitchToViewMode = new TDE RadioAction( 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 K Action( i18n ( " &Rename... " ) , Key_F2 , TQT_TQOBJECT ( this ) , TQT_SLOT ( renameFile ( ) ) , actionCollection ( ) , " file_rename " ) ;
mCopyFiles = new K Action( i18n ( " &Copy To... " ) , Key_F7 , TQT_TQOBJECT ( this ) , TQT_SLOT ( copyFiles ( ) ) , actionCollection ( ) , " file_copy " ) ;
mMoveFiles = new K Action( i18n ( " &Move To... " ) , Key_F8 , TQT_TQOBJECT ( this ) , TQT_SLOT ( moveFiles ( ) ) , actionCollection ( ) , " file_move " ) ;
mLinkFiles = new K Action( i18n ( " &Link To... " ) , Key_F9 , TQT_TQOBJECT ( this ) , TQT_SLOT ( linkFiles ( ) ) , actionCollection ( ) , " file_link " ) ;
mDeleteFiles = new K Action( i18n ( " &Delete " ) , " editdelete " , Key_Delete , TQT_TQOBJECT ( this ) , TQT_SLOT ( deleteFiles ( ) ) , actionCollection ( ) , " file_delete " ) ;
mShowFileProperties = new K Action( i18n ( " Properties " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( showFileProperties ( ) ) , actionCollection ( ) , " file_properties " ) ;
mRenameFile = new TDE Action( i18n ( " &Rename... " ) , Key_F2 , TQT_TQOBJECT ( this ) , TQT_SLOT ( renameFile ( ) ) , actionCollection ( ) , " file_rename " ) ;
mCopyFiles = new TDE Action( i18n ( " &Copy To... " ) , Key_F7 , TQT_TQOBJECT ( this ) , TQT_SLOT ( copyFiles ( ) ) , actionCollection ( ) , " file_copy " ) ;
mMoveFiles = new TDE Action( i18n ( " &Move To... " ) , Key_F8 , TQT_TQOBJECT ( this ) , TQT_SLOT ( moveFiles ( ) ) , actionCollection ( ) , " file_move " ) ;
mLinkFiles = new TDE Action( i18n ( " &Link To... " ) , Key_F9 , TQT_TQOBJECT ( this ) , TQT_SLOT ( linkFiles ( ) ) , actionCollection ( ) , " file_link " ) ;
mDeleteFiles = new TDE Action( i18n ( " &Delete " ) , " editdelete " , Key_Delete , TQT_TQOBJECT ( this ) , TQT_SLOT ( deleteFiles ( ) ) , actionCollection ( ) , " file_delete " ) ;
mShowFileProperties = new TDE Action( i18n ( " Properties " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( showFileProperties ( ) ) , actionCollection ( ) , " file_properties " ) ;
KStdAction : : quit ( TQT_TQOBJECT ( kapp ) , TQT_SLOT ( closeAllWindows ( ) ) , actionCollection ( ) ) ;
// Edit
mRotateLeft = new K Action( i18n ( " Rotate &Left " ) , " rotate_left " , CTRL + Key_L , TQT_TQOBJECT ( this ) , TQT_SLOT ( rotateLeft ( ) ) , actionCollection ( ) , " rotate_left " ) ;
mRotateRight = new K Action( i18n ( " Rotate &Right " ) , " rotate_right " , CTRL + Key_R , TQT_TQOBJECT ( this ) , TQT_SLOT ( rotateRight ( ) ) , actionCollection ( ) , " rotate_right " ) ;
mMirror = new K Action( i18n ( " &Mirror " ) , " mirror " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( mirror ( ) ) , actionCollection ( ) , " mirror " ) ;
mFlip = new K Action( i18n ( " &Flip " ) , " flip " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( flip ( ) ) , actionCollection ( ) , " flip " ) ;
mRotateLeft = new TDE Action( i18n ( " Rotate &Left " ) , " rotate_left " , CTRL + Key_L , TQT_TQOBJECT ( this ) , TQT_SLOT ( rotateLeft ( ) ) , actionCollection ( ) , " rotate_left " ) ;
mRotateRight = new TDE Action( i18n ( " Rotate &Right " ) , " rotate_right " , CTRL + Key_R , TQT_TQOBJECT ( this ) , TQT_SLOT ( rotateRight ( ) ) , actionCollection ( ) , " rotate_right " ) ;
mMirror = new TDE Action( i18n ( " &Mirror " ) , " mirror " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( mirror ( ) ) , actionCollection ( ) , " mirror " ) ;
mFlip = new TDE Action( i18n ( " &Flip " ) , " flip " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( flip ( ) ) , actionCollection ( ) , " flip " ) ;
// View
mReload = new K Action( i18n ( " Reload " ) , " reload " , Key_F5 , mDocument , TQT_SLOT ( reload ( ) ) , actionCollection ( ) , " reload " ) ;
mReload = new TDE Action( 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 K Action( i18n ( " Slide Show " ) , " slideshow_play " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( toggleSlideShow ( ) ) , actionCollection ( ) , " slideshow " ) ;
mFullScreenLabelAction = new K ToolBarLabelAction( " " , 0 , 0 , 0 , actionCollection ( ) , " fullscreen_label " ) ;
mToggleSlideShow = new TDE Action( i18n ( " Slide Show " ) , " slideshow_play " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( toggleSlideShow ( ) ) , actionCollection ( ) , " slideshow " ) ;
mFullScreenLabelAction = new TDE ToolBarLabelAction( " " , 0 , 0 , 0 , actionCollection ( ) , " fullscreen_label " ) ;
// Go
mGoUp = new K ToolBarPopupAction( i18n ( " Up " ) , " up " , ALT + Key_Up , TQT_TQOBJECT ( this ) , TQT_SLOT ( goUp ( ) ) , actionCollection ( ) , " go_up " ) ;
new K Action( i18n ( " Home " ) , " gohome " , KStdAccel: : shortcut ( K StdAccel: : Home ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( goHome ( ) ) , actionCollection ( ) , " go_home " ) ;
mGoUp = new TDE ToolBarPopupAction( i18n ( " Up " ) , " up " , ALT + Key_Up , TQT_TQOBJECT ( this ) , TQT_SLOT ( goUp ( ) ) , actionCollection ( ) , " go_up " ) ;
new TDE Action( i18n ( " Home " ) , " gohome " , TDEStdAccel: : shortcut ( TDE StdAccel: : Home ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( goHome ( ) ) , actionCollection ( ) , " go_home " ) ;
// Window
mResetDockWidgets = new K Action( i18n ( " Reset " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( resetDockWidgets ( ) ) , actionCollection ( ) , " reset_dock_widgets " ) ;
mResetDockWidgets = new TDE Action( 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 K Action( i18n ( " Configure External Tools... " ) , " configure " , 0 ,
( void ) new TDE Action( 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
{
K ActionPtrList actions ;
TDE ActionPtrList actions ;
actions
< < mToggleFullScreen
< < mToggleSlideShow
@ -1039,7 +1039,7 @@ void MainWindow::createObjectInteractions() {
}
{
K ActionPtrList actions ;
TDE ActionPtrList actions ;
actions
< < mFileViewController - > selectPrevious ( )
< < mFileViewController - > selectNext ( )
@ -1049,7 +1049,7 @@ void MainWindow::createObjectInteractions() {
}
{
K ActionPtrList actions ;
TDE ActionPtrList 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 K ActionMenu( i18n ( " &Bookmarks " ) , " bookmark " , actionCollection ( ) , " bookmarks " ) ;
TDEActionMenu* bookmark = new TDE ActionMenu( 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 K Action( caption , 0 , TQT_TQOBJECT ( dock ) , TQT_SLOT ( changeHideShowState ( ) ) , ( TQObject * ) 0 ) ;
TDEAction* action = new TDE Action( 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 K Action( i18n ( " Clear Location Bar " ) ,
( void ) new TDE Action( 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 K ToolBarLabelAction( i18n ( " L&ocation: " ) ,
TDEToolBarLabelAction* locationAction = new TDE ToolBarLabelAction( i18n ( " L&ocation: " ) ,
Key_F6 , TQT_TQOBJECT ( this ) , TQT_SLOT ( activateLocationLabel ( ) ) , actionCollection ( ) , " location_label " ) ;
locationAction - > setBuddy ( mURLEdit ) ;
// Go button
( void ) new K Action( i18n ( " Go " ) , " key_enter " , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotGo ( ) ) , actionCollection ( ) , " location_go " ) ;
( void ) new TDE Action( 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 < K Action> mActions ;
TQPtrList < TDE Action> mActions ;
MenuInfo ( ) { }
MenuInfo ( const TQString & name ) : mName ( name ) { }
} ;
@ -1304,8 +1304,8 @@ void MainWindow::slotReplug() {
if ( ! plugin ) continue ;
plugin - > setup ( this ) ;
K ActionPtrList actions = plugin - > actions ( ) ;
K ActionPtrList: : ConstIterator actionIt = actions . begin ( ) , end = actions . end ( ) ;
TDE ActionPtrList actions = plugin - > actions ( ) ;
TDE ActionPtrList: : 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 K Action( i18n ( " No Plugin " ) , 0 , 0 , 0 , actionCollection ( ) , " no_plugin " ) ;
TDEAction* noPlugin = new TDE Action( i18n ( " No Plugin " ) , 0 , 0 , 0 , actionCollection ( ) , " no_plugin " ) ;
noPlugin - > setShortcutConfigurable ( false ) ;
noPlugin - > setEnabled ( false ) ;
TQPtrList < K Action> noPluginList ;
TQPtrList < TDE Action> 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 K Action( i18n ( " No KIPI support " ) , 0 , 0 , 0 , actionCollection ( ) , " no_plugin " ) ;
TDEAction* noPlugin = new TDE Action( i18n ( " No KIPI support " ) , 0 , 0 , 0 , actionCollection ( ) , " no_plugin " ) ;
noPlugin - > setShortcutConfigurable ( false ) ;
noPlugin - > setEnabled ( false ) ;
TQPtrList < K Action> noPluginList ;
TQPtrList < TDE Action> noPluginList ;
noPluginList . append ( noPlugin ) ;
TQStringList lst ;