summaryrefslogtreecommitdiffstats
path: root/src/app/mainWindow.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 14:58:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 14:58:51 -0600
commit1d88613b6be64c0b6588952dd1f81396168be44b (patch)
tree5882f9217c6940b723d6997f2da52d1d7eccb380 /src/app/mainWindow.cpp
parent401bc51c194b27be9ffaad75a85bf3209c26891b (diff)
downloadfilelight-1d88613b6be64c0b6588952dd1f81396168be44b.tar.gz
filelight-1d88613b6be64c0b6588952dd1f81396168be44b.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src/app/mainWindow.cpp')
-rw-r--r--src/app/mainWindow.cpp32
1 files changed, 16 insertions, 16 deletions
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 <cstdlib> //std::exit()
-#include <kaccel.h> //KStdAccel namespace
+#include <kaccel.h> //TDEStdAccel namespace
#include <kaction.h>
#include <kapplication.h> //setupActions()
#include <kcombobox.h> //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<TQPopupMenu*>(w)->changeItem( id, menu_text );
- else if (w->inherits( "KToolBar" )) {
- TQWidget *button = static_cast<KToolBar*>(w)->getWidget( id );
- if (button->inherits( "KToolBarButton" ))
+ else if (w->inherits( "TDEToolBar" )) {
+ TQWidget *button = static_cast<TDEToolBar*>(w)->getWidget( id );
+ if (button->inherits( "TDEToolBarButton" ))
TQToolTip::add( button, suffix );
}
}