diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/fsview/fsview_part.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/fsview/fsview_part.cpp')
-rw-r--r-- | konq-plugins/fsview/fsview_part.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/konq-plugins/fsview/fsview_part.cpp b/konq-plugins/fsview/fsview_part.cpp index 745cb63..02df4c6 100644 --- a/konq-plugins/fsview/fsview_part.cpp +++ b/konq-plugins/fsview/fsview_part.cpp @@ -20,9 +20,9 @@ * The KPart embedding the FSView widget */ -#include <qclipboard.h> -#include <qtimer.h> -#include <qwhatsthis.h> +#include <tqclipboard.h> +#include <tqtimer.h> +#include <tqwhatsthis.h> #include <kinstance.h> #include <kfiledialog.h> @@ -57,8 +57,8 @@ FSJob::FSJob(FSView* v) : KIO::Job(false) { _view = v; - QObject::connect(v, SIGNAL(progress(int,int,const QString&)), - this, SLOT(progressSlot(int,int,const QString&))); + TQObject::connect(v, TQT_SIGNAL(progress(int,int,const TQString&)), + this, TQT_SLOT(progressSlot(int,int,const TQString&))); } void FSJob::kill(bool quietly) @@ -68,7 +68,7 @@ void FSJob::kill(bool quietly) Job::kill(quietly); } -void FSJob::progressSlot(int percent, int dirs, const QString& cDir) +void FSJob::progressSlot(int percent, int dirs, const TQString& cDir) { if (percent<100) { emitPercent(percent, 100); @@ -93,16 +93,16 @@ KAboutData* FSViewPart::createAboutData() return aboutData; } -FSViewPart::FSViewPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList& /* args */) +FSViewPart::FSViewPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList& /* args */) : KParts::ReadOnlyPart(parent, name) { // we need an instance setInstance( FSViewPartFactory::instance() ); _view = new FSView(new Inode(), parentWidget, widgetName); - QWhatsThis::add(_view, i18n("<p>This is the FSView plugin, a graphical " + TQWhatsThis::add(_view, i18n("<p>This is the FSView plugin, a graphical " "browsing mode showing filesystem utilization " "by using a tree map visualization.</p>" "<p>Note that in this mode, automatic updating " @@ -129,40 +129,40 @@ FSViewPart::FSViewPart(QWidget *parentWidget, const char *widgetName, KAction* action; action = new KAction( i18n( "&FSView Manual" ), "fsview", - KShortcut(), this, SLOT(showHelp()), + KShortcut(), this, TQT_SLOT(showHelp()), actionCollection(), "help_fsview" ); action->setToolTip(i18n("Show FSView manual")); action->setWhatsThis(i18n("Opens the help browser with the " "FSView documentation")); - QObject::connect (_visMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowVisMenu())); - QObject::connect (_areaMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowAreaMenu())); - QObject::connect (_depthMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowDepthMenu())); - QObject::connect (_colorMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowColorMenu())); + TQObject::connect (_visMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowVisMenu())); + TQObject::connect (_areaMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowAreaMenu())); + TQObject::connect (_depthMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowDepthMenu())); + TQObject::connect (_colorMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowColorMenu())); slotSettingsChanged(KApplication::SETTINGS_MOUSE); if (kapp) - connect( kapp, SIGNAL( settingsChanged(int) ), - SLOT( slotSettingsChanged(int) ) ); - - QObject::connect(_view,SIGNAL(returnPressed(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); - QObject::connect(_view,SIGNAL(selectionChanged()), - _ext,SLOT(updateActions())); - QObject::connect(_view, - SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint&)), + connect( kapp, TQT_SIGNAL( settingsChanged(int) ), + TQT_SLOT( slotSettingsChanged(int) ) ); + + TQObject::connect(_view,TQT_SIGNAL(returnPressed(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); + TQObject::connect(_view,TQT_SIGNAL(selectionChanged()), + _ext,TQT_SLOT(updateActions())); + TQObject::connect(_view, + TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint&)), _ext, - SLOT(contextMenu(TreeMapItem*, const QPoint&))); + TQT_SLOT(contextMenu(TreeMapItem*, const TQPoint&))); - QObject::connect(_view, SIGNAL(started()), this, SLOT(startedSlot())); - QObject::connect(_view, SIGNAL(completed(int)), - this, SLOT(completedSlot(int))); + TQObject::connect(_view, TQT_SIGNAL(started()), this, TQT_SLOT(startedSlot())); + TQObject::connect(_view, TQT_SIGNAL(completed(int)), + this, TQT_SLOT(completedSlot(int))); - QTimer::singleShot(1, this, SLOT(showInfo())); + TQTimer::singleShot(1, this, TQT_SLOT(showInfo())); setXMLFile( "fsview_part.rc" ); } @@ -180,34 +180,34 @@ void FSViewPart::slotSettingsChanged(int category) { if (category != KApplication::SETTINGS_MOUSE) return; - QObject::disconnect(_view,SIGNAL(clicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); - QObject::disconnect(_view,SIGNAL(doubleClicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); + TQObject::disconnect(_view,TQT_SIGNAL(clicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); + TQObject::disconnect(_view,TQT_SIGNAL(doubleClicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); if (KGlobalSettings::singleClick()) - QObject::connect(_view,SIGNAL(clicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); + TQObject::connect(_view,TQT_SIGNAL(clicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); else - QObject::connect(_view,SIGNAL(doubleClicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); + TQObject::connect(_view,TQT_SIGNAL(doubleClicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); } void FSViewPart::showInfo() { - QString info; + TQString info; info = i18n("FSView intentionally does not support automatic updates " "when changes are made to files or directories, " "currently visible in FSView, from the outside.\n" "For details, see the 'Help/FSView Manual'."); - KMessageBox::information( _view, info, QString::null, "ShowFSViewInfo"); + KMessageBox::information( _view, info, TQString::null, "ShowFSViewInfo"); } void FSViewPart::showHelp() { KApplication::startServiceByDesktopName("khelpcenter", - QString("help:/konq-plugins/fsview/index.html")); + TQString("help:/konq-plugins/fsview/index.html")); } void FSViewPart::startedSlot() @@ -219,12 +219,12 @@ void FSViewPart::startedSlot() void FSViewPart::completedSlot(int dirs) { if (_job) { - _job->progressSlot(100, dirs, QString::null); + _job->progressSlot(100, dirs, TQString::null); delete _job; _job = 0; } - KConfigGroup cconfig(_view->config(), QCString("MetricCache")); + KConfigGroup cconfig(_view->config(), TQCString("MetricCache")); _view->saveMetric(&cconfig); emit completed(); @@ -331,20 +331,20 @@ void FSViewBrowserExtension::del() // - search for the KonqOperations child of _view (name "KonqOperations") // - connect to destroyed signal KonqOperations* o = (KonqOperations*) _view->child("KonqOperations"); - if (o) connect(o, SIGNAL(destroyed()), SLOT(refresh())); + if (o) connect(o, TQT_SIGNAL(destroyed()), TQT_SLOT(refresh())); } void FSViewBrowserExtension::trash() { KonqOperations::del(_view, KonqOperations::TRASH, _view->selectedUrls()); KonqOperations* o = (KonqOperations*) _view->child("KonqOperations"); - if (o) connect(o, SIGNAL(destroyed()), SLOT(refresh())); + if (o) connect(o, TQT_SIGNAL(destroyed()), TQT_SLOT(refresh())); } void FSViewBrowserExtension::copySelection( bool move ) { KonqDrag *urlData = KonqDrag::newDrag( _view->selectedUrls(), move ); - QApplication::clipboard()->setData( urlData ); + TQApplication::clipboard()->setData( urlData ); } void FSViewBrowserExtension::editMimeType() @@ -386,7 +386,7 @@ void FSViewBrowserExtension::selected(TreeMapItem* i) emit openURLRequest(url); } -void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const QPoint& p) +void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const TQPoint& p) { TreeMapItemList s = _view->selection(); TreeMapItem* i; @@ -396,8 +396,8 @@ void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const QPoint& p) for(i=s.first();i;i=s.next()) { KURL u; u.setPath( ((Inode*)i)->path() ); - QString mimetype = ((Inode*)i)->mimeType()->name(); - const QFileInfo& info = ((Inode*)i)->fileInfo(); + TQString mimetype = ((Inode*)i)->mimeType()->name(); + const TQFileInfo& info = ((Inode*)i)->fileInfo(); mode_t mode = info.isFile() ? S_IFREG : info.isDir() ? S_IFDIR : |