summaryrefslogtreecommitdiffstats
path: root/plugin/smb4k_konqplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/smb4k_konqplugin.cpp')
-rw-r--r--plugin/smb4k_konqplugin.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/plugin/smb4k_konqplugin.cpp b/plugin/smb4k_konqplugin.cpp
index 3cab7fa..e66ba97 100644
--- a/plugin/smb4k_konqplugin.cpp
+++ b/plugin/smb4k_konqplugin.cpp
@@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2004 by Massimo Callegari *
- * massimocallegari@yahoo.it *
+ * massitqmocallegari@yahoo.it *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -18,21 +18,21 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-// Qt includes
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qheader.h>
-#include <qvaluelist.h>
-#include <qpixmap.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qdir.h>
-#include <qpushbutton.h>
+// TQt includes
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqheader.h>
+#include <tqvaluelist.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqdir.h>
+#include <tqpushbutton.h>
// KDE includes
#include <klibloader.h>
@@ -53,23 +53,23 @@
#include "../smb4k/core/smb4kcore.h"
#include "../smb4k/core/smb4kdefs.h"
-smb4kWidget::smb4kWidget( QWidget * parent, const char * name, WFlags f )
- : QVBox(parent, name, f)
+smb4kWidget::smb4kWidget( TQWidget * tqparent, const char * name, WFlags f )
+ : TQVBox(tqparent, name, f)
{
// Nothing exciting to do !
}
-KonqSidebar_Smb4K::KonqSidebar_Smb4K(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name):
- KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name)
+KonqSidebar_Smb4K::KonqSidebar_Smb4K(KInstance *inst,TQObject *tqparent,TQWidget *widgetParent, TQString &desktopName, const char* name):
+ KonqSidebarPlugin(inst,tqparent,widgetParent,desktopName,name)
{
widget = new smb4kWidget( widgetParent );
KToolBar *topBar = new KToolBar( widget, "Topbar" );
topBar->setIconSize(16);
- topBar->insertButton( "reload", 0, SIGNAL( clicked() ), this, SLOT( slotRescan() ) , TRUE, i18n( "Scan Network" ) );
- topBar->insertButton( "find", 1, SIGNAL( clicked() ), this, SLOT( slotSearch() ) , TRUE, i18n( "Search" ) );
- topBar->insertButton( "configure", 2, SIGNAL( clicked() ), this, SLOT( slotSmb4KOptionsDlg() ) , TRUE, i18n( "Configure" ) );
+ topBar->insertButton( "reload", 0, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRescan() ) , TRUE, i18n( "Scan Network" ) );
+ topBar->insertButton( "tqfind", 1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSearch() ) , TRUE, i18n( "Search" ) );
+ topBar->insertButton( "configure", 2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSmb4KOptionsDlg() ) , TRUE, i18n( "Configure" ) );
//
// Browser widget:
@@ -78,7 +78,7 @@ KonqSidebar_Smb4K::KonqSidebar_Smb4K(KInstance *inst,QObject *parent,QWidget *wi
if ( browser_factory )
{
- m_browser_part = static_cast<KParts::Part *>( browser_factory->create( widget, "BrowserPart", "KParts::Part", QStringList( "konqplugin=\"true\"" ) ) );
+ m_browser_part = static_cast<KParts::Part *>( browser_factory->create( TQT_TQOBJECT(widget), "BrowserPart", "KParts::Part", TQStringList( "konqplugin=\"true\"" ) ) );
// Do nothing here. The network scan (and the mounting of recently used
// shares) will be done by Smb4KCore::init() below.
@@ -90,8 +90,8 @@ KonqSidebar_Smb4K::KonqSidebar_Smb4K(KInstance *inst,QObject *parent,QWidget *wi
return;
}
- connect( Smb4KCore::mounter(), SIGNAL( mountedShare( const QString &) ), this, SLOT( slotMountedShare( const QString & ) ) );
- connect( Smb4KCore::mounter(), SIGNAL( aboutToUnmount( const QString& ) ), this, SLOT( slotPrepareUnmount( const QString& ) ) );
+ connect( Smb4KCore::mounter(), TQT_SIGNAL( mountedShare( const TQString &) ), this, TQT_SLOT( slotMountedShare( const TQString & ) ) );
+ connect( Smb4KCore::mounter(), TQT_SIGNAL( aboutToUnmount( const TQString& ) ), this, TQT_SLOT( slotPrepareUnmount( const TQString& ) ) );
// Scan the network and remount recently used shares:
Smb4KCore::self()->init();
@@ -106,7 +106,7 @@ KonqSidebar_Smb4K::~KonqSidebar_Smb4K()
extern "C"
{
- void* create_konqsidebar_smb4k(KInstance *instance,QObject *par,QWidget *widp,QString &desktopname,const char *name)
+ void* create_konqsidebar_smb4k(KInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name)
{
KGlobal::locale()->insertCatalogue("smb4k");
return new KonqSidebar_Smb4K(instance,par,widp,desktopname,name);
@@ -115,7 +115,7 @@ extern "C"
extern "C"
{
- bool add_konqsidebar_smb4k(QString* fn, QString* /*param*/, QMap<QString,QString> *map)
+ bool add_konqsidebar_smb4k(TQString* fn, TQString* /*param*/, TQMap<TQString,TQString> *map)
{
map->insert("Type","Link");
map->insert("Icon","smb4k");
@@ -136,7 +136,7 @@ void KonqSidebar_Smb4K::handleURL(const KURL &url)
void KonqSidebar_Smb4K::slotRescan()
{
// Send a custom rescan event to the browser part.
- QApplication::postEvent( m_browser_part, new QCustomEvent( EVENT_SCAN_NETWORK ) );
+ TQApplication::postEvent( m_browser_part, new TQCustomEvent( EVENT_SCAN_NETWORK ) );
}
void KonqSidebar_Smb4K::slotSearch()
@@ -149,22 +149,22 @@ void KonqSidebar_Smb4K::slotSearch()
KDialogBase *searchDialog = new KDialogBase( KDialogBase::Plain, i18n( "Search Dialog" ), KDialogBase::Close,
KDialogBase::NoDefault, widget, "sd", true, true );
- QFrame *frame = searchDialog->plainPage();
+ TQFrame *frame = searchDialog->plainPage();
- m_search_part = static_cast<KParts::Part *>( search_factory->create( frame, "SearchDialogPart", "KParts::Part" ) );
+ m_search_part = static_cast<KParts::Part *>( search_factory->create( TQT_TQOBJECT(frame), "SearchDialogPart", "KParts::Part" ) );
if ( m_search_part )
{
- QGridLayout *layout = new QGridLayout( frame );
- layout->setSpacing( 10 );
- layout->setMargin( 0 );
- layout->addWidget ( m_search_part->widget(), 0, 0, 0 );
+ TQGridLayout *tqlayout = new TQGridLayout( frame );
+ tqlayout->setSpacing( 10 );
+ tqlayout->setMargin( 0 );
+ tqlayout->addWidget ( m_search_part->widget(), 0, 0, 0 );
searchDialog->resize(400,300);
// We do not want the dialog to be closed if the user presses return.
// Instead we want that a search is started:
searchDialog->actionButton( KDialogBase::Close )->setAutoDefault( false );
- //connect( m_search_dialog, SIGNAL( searchResult( Smb4KHostItem * ) ), this, SLOT( slotInsertItem( Smb4KHostItem * ) ) );
+ //connect( m_search_dialog, TQT_SIGNAL( searchResult( Smb4KHostItem * ) ), this, TQT_SLOT( slotInsertItem( Smb4KHostItem * ) ) );
searchDialog->show();
}
@@ -188,11 +188,11 @@ void KonqSidebar_Smb4K::slotSmb4KOptionsDlg()
if ( config_factory )
{
- KConfigDialog *dlg = static_cast<KConfigDialog *>( config_factory->create( widget, "ConfigDialog", "KConfigDialog" ) );
+ KConfigDialog *dlg = static_cast<KConfigDialog *>( TQT_TQWIDGET(config_factory->create( TQT_TQOBJECT(widget), "ConfigDialog", "KConfigDialog" )) );
if ( dlg )
{
- connect( dlg, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) );
+ connect( dlg, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotSettingsChanged() ) );
dlg->show();
}
@@ -208,19 +208,19 @@ void KonqSidebar_Smb4K::slotSmb4KOptionsDlg()
void KonqSidebar_Smb4K::slotSettingsChanged()
{
- QApplication::postEvent( m_browser_part, new QCustomEvent( EVENT_LOAD_SETTINGS ) );
+ TQApplication::postEvent( m_browser_part, new TQCustomEvent( EVENT_LOAD_SETTINGS ) );
}
-void KonqSidebar_Smb4K::slotMountedShare( const QString &mountedShare )
+void KonqSidebar_Smb4K::slotMountedShare( const TQString &mountedShare )
{
emit openURLRequest( KURL(mountedShare) );
}
-void KonqSidebar_Smb4K::slotPrepareUnmount( const QString &mountpoint )
+void KonqSidebar_Smb4K::slotPrepareUnmount( const TQString &mountpoint )
{
- if ( QString::compare( currentKonquerorURL, mountpoint ) == 0 )
+ if ( TQString::compare( currentKonquerorURL, mountpoint ) == 0 )
{
- emit openURLRequest( KURL( QDir::home().canonicalPath() ) );
+ emit openURLRequest( KURL( TQDir::home().canonicalPath() ) );
}
else
{