From 1d88613b6be64c0b6588952dd1f81396168be44b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 14:58:51 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- src/app/mainWindow.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/app/mainWindow.cpp') diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index 5bd35bf..cb617e9 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -6,7 +6,7 @@ #include "historyAction.h" #include //std::exit() -#include //KStdAccel namespace +#include //TDEStdAccel namespace #include #include //setupActions() #include //locationbar @@ -52,7 +52,7 @@ MainWindow::MainWindow() stateChanged( "scan_failed" ); //bah! doesn't affect the parts' actions, should I add them to the actionCollection here? - TQObjectList *buttons = toolBar()->queryList( "KToolBarButton" ); + TQObjectList *buttons = toolBar()->queryList( "TDEToolBarButton" ); if (buttons->isEmpty()) KMessageBox::error( this, i18n("Filelight is not installed properly, consequently its menus and toolbars will appear reduced or even empty") ); delete buttons; @@ -74,7 +74,7 @@ MainWindow::MainWindow() inline void MainWindow::setupActions() //singleton function { - KActionCollection *const ac = actionCollection(); + TDEActionCollection *const ac = actionCollection(); m_combo = new KHistoryCombo( this, "history_combo" ); m_combo->setCompletionObject( new KURLCompletion( KURLCompletion::DirCompletion ) ); @@ -88,15 +88,15 @@ MainWindow::setupActions() //singleton function KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configToolbars()), ac); KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configKeys()), ac); - new KAction( i18n( "Scan &Home Directory" ), "folder_home", CTRL+Key_Home, TQT_TQOBJECT(this), TQT_SLOT(slotScanHomeDirectory()), ac, "scan_home" ); - new KAction( i18n( "Scan &Root Directory" ), "folder_red", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScanRootDirectory()), ac, "scan_root" ); - new KAction( i18n( "Rescan" ), "reload", KStdAccel::reload(), TQT_TQOBJECT(m_part), TQT_SLOT(rescan()), ac, "scan_rescan" ); - new KAction( i18n( "Stop" ), "stop", TQt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotAbortScan()), ac, "scan_stop" ); - new KAction( i18n( "Clear Location Bar" ), TDEApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, TQT_TQOBJECT(m_combo), TQT_SLOT(clearEdit()), ac, "clear_location" ); - new KAction( i18n( "Go" ), "key_enter", 0, TQT_TQOBJECT(m_combo), TQT_SIGNAL(returnPressed()), ac, "go" ); + new TDEAction( i18n( "Scan &Home Directory" ), "folder_home", CTRL+Key_Home, TQT_TQOBJECT(this), TQT_SLOT(slotScanHomeDirectory()), ac, "scan_home" ); + new TDEAction( i18n( "Scan &Root Directory" ), "folder_red", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScanRootDirectory()), ac, "scan_root" ); + new TDEAction( i18n( "Rescan" ), "reload", TDEStdAccel::reload(), TQT_TQOBJECT(m_part), TQT_SLOT(rescan()), ac, "scan_rescan" ); + new TDEAction( i18n( "Stop" ), "stop", TQt::Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotAbortScan()), ac, "scan_stop" ); + new TDEAction( i18n( "Clear Location Bar" ), TDEApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, TQT_TQOBJECT(m_combo), TQT_SLOT(clearEdit()), ac, "clear_location" ); + new TDEAction( i18n( "Go" ), "key_enter", 0, TQT_TQOBJECT(m_combo), TQT_SIGNAL(returnPressed()), ac, "go" ); KWidgetAction *combo = new KWidgetAction( m_combo, i18n( "Location Bar" ), 0, 0, 0, ac, "location_bar" ); - m_recentScans = new KRecentFilesAction( i18n( "&Recent Scans" ), 0, ac, "scan_recent", 8 ); + m_recentScans = new TDERecentFilesAction( i18n( "&Recent Scans" ), 0, ac, "scan_recent", 8 ); m_histories = new HistoryCollection( ac, TQT_TQOBJECT(this), "history_collection" ); ac->action( "scan_directory" )->setText( i18n( "&Scan Directory..." ) ); @@ -176,7 +176,7 @@ MainWindow::slotScanUrl( const KURL &url ) if (b) { m_histories->push( oldUrl ); - action( "go_back" )->KAction::setEnabled( false ); } //FIXME + action( "go_back" )->TDEAction::setEnabled( false ); } //FIXME return b; } @@ -205,7 +205,7 @@ MainWindow::scanFailed() void MainWindow::scanCompleted() { - KAction *goUp = action( "go_up" ); + TDEAction *goUp = action( "go_up" ); const KURL url = m_part->url(); stateChanged( "scan_complete" ); @@ -256,7 +256,7 @@ MainWindow::readProperties( TDEConfig *config ) //virtual /// declared in historyAction.h -void setActionMenuTextOnly( KAction *a, TQString const &suffix ) +void setActionMenuTextOnly( TDEAction *a, TQString const &suffix ) { TQString const menu_text = suffix.isEmpty() ? a->text() @@ -269,9 +269,9 @@ void setActionMenuTextOnly( KAction *a, TQString const &suffix ) if (w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING )) static_cast(w)->changeItem( id, menu_text ); - else if (w->inherits( "KToolBar" )) { - TQWidget *button = static_cast(w)->getWidget( id ); - if (button->inherits( "KToolBarButton" )) + else if (w->inherits( "TDEToolBar" )) { + TQWidget *button = static_cast(w)->getWidget( id ); + if (button->inherits( "TDEToolBarButton" )) TQToolTip::add( button, suffix ); } } -- cgit v1.2.1