diff options
Diffstat (limited to 'src/gvdirpart')
-rw-r--r-- | src/gvdirpart/gvdirpart.cpp | 74 | ||||
-rw-r--r-- | src/gvdirpart/gvdirpart.h | 14 |
2 files changed, 45 insertions, 43 deletions
diff --git a/src/gvdirpart/gvdirpart.cpp b/src/gvdirpart/gvdirpart.cpp index d2bde68..d9aff69 100644 --- a/src/gvdirpart/gvdirpart.cpp +++ b/src/gvdirpart/gvdirpart.cpp @@ -18,10 +18,10 @@ Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "gvdirpart.moc" -#include <qcursor.h> -#include <qfile.h> -#include <qsplitter.h> -#include <qvaluelist.h> +#include <tqcursor.h> +#include <tqfile.h> +#include <tqsplitter.h> +#include <tqvaluelist.h> #include <kdebug.h> #include <kdeversion.h> @@ -59,8 +59,8 @@ const char CONFIG_CACHE_GROUP[]="cache"; typedef KParts::GenericFactory<GVDirPart> GVDirFactory; K_EXPORT_COMPONENT_FACTORY( libgvdirpart /*library name*/, GVDirFactory ) -GVDirPart::GVDirPart(QWidget* parentWidget, const char* /*widgetName*/, QObject* parent, const char* name, - const QStringList &) : KParts::ReadOnlyPart( parent, name ) { +GVDirPart::GVDirPart(TQWidget* tqparentWidget, const char* /*widgetName*/, TQObject* tqparent, const char* name, + const TQStringList &) : KParts::ReadOnlyPart( tqparent, name ) { GVDirFactory::instance()->iconLoader()->addAppDir( "gwenview"); setInstance( GVDirFactory::instance() ); KGlobal::locale()->insertCatalogue("gwenview"); @@ -68,8 +68,8 @@ GVDirPart::GVDirPart(QWidget* parentWidget, const char* /*widgetName*/, QObject* mBrowserExtension = new GVDirPartBrowserExtension(this); - mSplitter = new QSplitter(Qt::Horizontal, parentWidget, "gwenview-kpart-splitter"); - mSplitter->setFocusPolicy(QWidget::ClickFocus); + mSplitter = new TQSplitter(Qt::Horizontal, tqparentWidget, "gwenview-kpart-splitter"); + mSplitter->setFocusPolicy(TQ_ClickFocus); mSplitter->setOpaqueResize(true); // Create the widgets @@ -80,44 +80,44 @@ GVDirPart::GVDirPart(QWidget* parentWidget, const char* /*widgetName*/, QObject* mFileViewController->resize(width, 10); } mImageView = new ImageView(mSplitter, mDocument, actionCollection()); - mSplitter->setResizeMode(mFileViewController, QSplitter::KeepSize); + mSplitter->setResizeMode(mFileViewController, TQSplitter::KeepSize); mSlideShow = new SlideShow(mDocument); setWidget(mSplitter); - KStdAction::saveAs( mDocument, SLOT(saveAs()), actionCollection(), "saveAs" ); - new KAction(i18n("Rotate &Left"), "rotate_ccw", CTRL + Key_L, this, SLOT(rotateLeft()), actionCollection(), "rotate_left"); - new KAction(i18n("Rotate &Right"), "rotate_cw", CTRL + Key_R, this, SLOT(rotateRight()), actionCollection(), "rotate_right"); + KStdAction::saveAs( mDocument, TQT_SLOT(saveAs()), actionCollection(), "saveAs" ); + new KAction(i18n("Rotate &Left"), "rotate_ccw", CTRL + Key_L, this, TQT_SLOT(rotateLeft()), actionCollection(), "rotate_left"); + new KAction(i18n("Rotate &Right"), "rotate_cw", CTRL + Key_R, this, TQT_SLOT(rotateRight()), actionCollection(), "rotate_right"); - connect(mFileViewController, SIGNAL(requestContextMenu(const QPoint&, bool)), - mBrowserExtension, SLOT(openFileViewContextMenu(const QPoint&, bool)) ); + connect(mFileViewController, TQT_SIGNAL(requestContextMenu(const TQPoint&, bool)), + mBrowserExtension, TQT_SLOT(openFileViewContextMenu(const TQPoint&, bool)) ); - connect(mFileViewController, SIGNAL(urlChanged(const KURL&)), - mDocument, SLOT(setURL(const KURL&)) ); + connect(mFileViewController, TQT_SIGNAL(urlChanged(const KURL&)), + mDocument, TQT_SLOT(setURL(const KURL&)) ); - connect(mFileViewController, SIGNAL(directoryChanged(const KURL&)), - this, SLOT(directoryChanged(const KURL&)) ); + connect(mFileViewController, TQT_SIGNAL(directoryChanged(const KURL&)), + this, TQT_SLOT(directoryChanged(const KURL&)) ); - connect(mFileViewController, SIGNAL(selectionChanged()), - mBrowserExtension, SLOT(updateActions()) ); + connect(mFileViewController, TQT_SIGNAL(selectionChanged()), + mBrowserExtension, TQT_SLOT(updateActions()) ); - connect(mImageView, SIGNAL(requestContextMenu(const QPoint&)), - mBrowserExtension, SLOT(openImageViewContextMenu(const QPoint&)) ); + connect(mImageView, TQT_SIGNAL(requestContextMenu(const TQPoint&)), + mBrowserExtension, TQT_SLOT(openImageViewContextMenu(const TQPoint&)) ); - connect(mSlideShow, SIGNAL(nextURL(const KURL&)), - this, SLOT(slotSlideShowChanged(const KURL&)) ); + connect(mSlideShow, TQT_SIGNAL(nextURL(const KURL&)), + this, TQT_SLOT(slotSlideShowChanged(const KURL&)) ); - connect(mDocument, SIGNAL(loaded(const KURL&)), - this, SLOT(loaded(const KURL&)) ); + connect(mDocument, TQT_SIGNAL(loaded(const KURL&)), + this, TQT_SLOT(loaded(const KURL&)) ); // For wheel browsing - connect(mImageView, SIGNAL(selectPrevious()), - mFileViewController, SLOT(slotSelectPrevious()) ); - connect(mImageView, SIGNAL(selectNext()), - mFileViewController, SLOT(slotSelectNext()) ); + connect(mImageView, TQT_SIGNAL(selectPrevious()), + mFileViewController, TQT_SLOT(slotSelectPrevious()) ); + connect(mImageView, TQT_SIGNAL(selectNext()), + mFileViewController, TQT_SLOT(slotSelectNext()) ); - mToggleSlideShow = new KToggleAction(i18n("Slide Show..."), "slideshow", 0, this, SLOT(toggleSlideShow()), actionCollection(), "slideshow"); + mToggleSlideShow = new KToggleAction(i18n("Slide Show..."), "slideshow", 0, this, TQT_SLOT(toggleSlideShow()), actionCollection(), "slideshow"); mToggleSlideShow->setCheckedState( i18n("Stop Slide Show" )); setXMLFile( "gvdirpart/gvdirpart.rc" ); @@ -171,9 +171,9 @@ bool GVDirPart::openURL(const KURL& url) { } void GVDirPart::loaded(const KURL& url) { - QString caption = url.filename(); + TQString caption = url.filename(); if( !mDocument->image().isNull()) - caption += QString(" %1 x %2").arg(mDocument->width()).arg(mDocument->height()); + caption += TQString(" %1 x %2").tqarg(mDocument->width()).tqarg(mDocument->height()); emit setWindowCaption(caption); emit completed(); } @@ -210,7 +210,7 @@ void GVDirPart::print() { printer.setDocName( m_url.filename() ); KPrinter::addDialogPage( new PrintDialogPage( mDocument, mImageView, "GV page")); - if (printer.setup(mImageView, QString::null, true)) { + if (printer.setup(mImageView, TQString(), true)) { mDocument->print(&printer); } } @@ -264,7 +264,7 @@ void GVDirPartBrowserExtension::trash() { } -void GVDirPartBrowserExtension::openFileViewContextMenu(const QPoint& pos, bool onItem) { +void GVDirPartBrowserExtension::openFileViewContextMenu(const TQPoint& pos, bool onItem) { if (onItem) { const KFileItemList* items = mGVDirPart->fileViewController()->currentFileView()->selectedItems(); emit popupMenu(pos, *items); @@ -274,9 +274,9 @@ void GVDirPartBrowserExtension::openFileViewContextMenu(const QPoint& pos, bool } -void GVDirPartBrowserExtension::openImageViewContextMenu(const QPoint& pos) { +void GVDirPartBrowserExtension::openImageViewContextMenu(const TQPoint& pos) { KURL url=mGVDirPart->url(); - QString mimeType=KMimeType::findByURL(url)->name(); + TQString mimeType=KMimeType::findByURL(url)->name(); emit popupMenu(pos, url, mimeType); } diff --git a/src/gvdirpart/gvdirpart.h b/src/gvdirpart/gvdirpart.h index 0cd3df7..339471f 100644 --- a/src/gvdirpart/gvdirpart.h +++ b/src/gvdirpart/gvdirpart.h @@ -23,8 +23,8 @@ Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. #include <kparts/browserextension.h> // Forward declarations -class QPoint; -class QSplitter; +class TQPoint; +class TQSplitter; class KAboutData; class KAction; class KToggleAction; @@ -44,6 +44,7 @@ class GVDirPart; */ class GVDirPartBrowserExtension: public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: GVDirPartBrowserExtension(GVDirPart* viewPart, const char* name=0L); @@ -58,8 +59,8 @@ public slots: void print(); private slots: - void openFileViewContextMenu(const QPoint&, bool onItem); - void openImageViewContextMenu(const QPoint&); + void openFileViewContextMenu(const TQPoint&, bool onItem); + void openImageViewContextMenu(const TQPoint&); private: GVDirPart* mGVDirPart; @@ -70,8 +71,9 @@ private: */ class GVDirPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - GVDirPart(QWidget*, const char*, QObject*, const char*, const QStringList &); + GVDirPart(TQWidget*, const char*, TQObject*, const char*, const TQStringList &); virtual ~GVDirPart(); /** @@ -139,7 +141,7 @@ protected: * The component's widget, contains the files view on the left * and scroll view on the right. */ - QSplitter* mSplitter; + TQSplitter* mSplitter; /** * Scroll widget |