summaryrefslogtreecommitdiffstats
path: root/src/gvdirpart/gvdirpart.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 21:04:57 +0000
commitbf7f88413be3831a9372d323d02fc0335b9f9188 (patch)
tree516fdef9206245b40a14f99b4e3d9ef9289196e0 /src/gvdirpart/gvdirpart.cpp
parente238aa77b1fb3c2f55aef2ef2c91ce52166d2cc8 (diff)
downloadgwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.tar.gz
gwenview-bf7f88413be3831a9372d323d02fc0335b9f9188.zip
TQt4 port Gwenview
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gwenview@1233720 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gvdirpart/gvdirpart.cpp')
-rw-r--r--src/gvdirpart/gvdirpart.cpp74
1 files changed, 37 insertions, 37 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);
}