summaryrefslogtreecommitdiffstats
path: root/src/gvcore/imageview.h
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/gvcore/imageview.h
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/gvcore/imageview.h')
-rw-r--r--src/gvcore/imageview.h73
1 files changed, 37 insertions, 36 deletions
diff --git a/src/gvcore/imageview.h b/src/gvcore/imageview.h
index 7c1d919..f688e27 100644
--- a/src/gvcore/imageview.h
+++ b/src/gvcore/imageview.h
@@ -23,32 +23,33 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef IMAGEVIEW_H
#define IMAGEVIEW_H
-// Qt
-#include <qmap.h>
-#include <qscrollview.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
+// TQt
+#include <tqmap.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
// Local
#include "busylevelmanager.h"
#include "imageutils/imageutils.h"
#include "libgwenview_export.h"
-class QEvent;
-class QLabel;
-class QMouseEvent;
-class QPainter;
-class QTimer;
-class QWheelEvent;
+class TQEvent;
+class TQLabel;
+class TQMouseEvent;
+class TQPainter;
+class TQTimer;
+class TQWheelEvent;
class KAction;
class KActionCollection;
class KToggleAction;
-typedef QValueList<KAction *> KActionPtrList;
+typedef TQValueList<KAction *> KActionPtrList;
namespace Gwenview {
class Document;
-class LIBGWENVIEW_EXPORT ImageView : public QScrollView {
+class LIBGWENVIEW_EXPORT ImageView : public TQScrollView {
Q_OBJECT
+ TQ_OBJECT
public:
class ToolBase;
@@ -64,9 +65,9 @@ public:
enum ToolID { SCROLL, ZOOM };
enum ZoomMode { ZOOM_FIT, ZOOM_FIT_WIDTH, ZOOM_FIT_HEIGHT, ZOOM_FREE };
- typedef QMap<ToolID,ToolBase*> Tools;
+ typedef TQMap<ToolID,ToolBase*> Tools;
- ImageView(QWidget* parent,Document*,KActionCollection*);
+ ImageView(TQWidget* tqparent,Document*,KActionCollection*);
~ImageView();
// Properties
@@ -89,34 +90,34 @@ signals:
void selectPrevious();
void selectNext();
void doubleClicked();
- void requestContextMenu(const QPoint&);
+ void requestContextMenu(const TQPoint&);
// Emitted whenever an hint should be displayed
- void requestHintDisplay(const QString& hint);
+ void requestHintDisplay(const TQString& hint);
// Emitted whenever brightness, contrast or gamma changes
void bcgChanged();
protected:
- virtual void contentsDragEnterEvent(QDragEnterEvent*);
- virtual void contentsDropEvent(QDropEvent*);
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void contentsDragEnterEvent(TQDragEnterEvent*);
+ virtual void contentsDropEvent(TQDropEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
private:
struct Private;
Private* d;
struct PendingPaint {
- PendingPaint( bool s, const QRect& r ) : rect( r ), smooth( s ) {};
- PendingPaint() {}; // stupid Qt containers
- QRect rect;
+ PendingPaint( bool s, const TQRect& r ) : rect( r ), smooth( s ) {};
+ PendingPaint() {}; // stupid TQt containers
+ TQRect rect;
bool smooth;
};
enum Operation { CHECK_OPERATIONS = 0, SMOOTH_PASS = 1 << 0 };
- void addPendingPaint( bool smooth, QRect rect = QRect());
- void addPendingPaintInternal( bool smooth, QRect rect = QRect());
- void performPaint( QPainter* painter, int clipx, int clipy, int clipw, int cliph, bool smooth );
+ void addPendingPaint( bool smooth, TQRect rect = TQRect());
+ void addPendingPaintInternal( bool smooth, TQRect rect = TQRect());
+ void performPaint( TQPainter* painter, int clipx, int clipy, int clipw, int cliph, bool smooth );
void limitPaintSize( PendingPaint& paint );
void fullRepaint();
void cancelPending();
@@ -145,7 +146,7 @@ private:
void emitSelectNext() { emit selectNext(); }
// Used by the zoom tool
- QPoint offset() const;
+ TQPoint offset() const;
bool canZoom(bool in) const;
KToggleAction* zoomToFit() const;
@@ -167,7 +168,7 @@ private slots:
void increaseContrast();
void decreaseContrast();
void slotImageSizeUpdated();
- void slotImageRectUpdated(const QRect&);
+ void slotImageRectUpdated(const TQRect&);
void checkPendingOperations();
void loadingStarted();
void slotBusyLevelChanged(BusyLevel);
@@ -175,14 +176,14 @@ private slots:
protected:
// Overloaded methods
- bool eventFilter(QObject*, QEvent*);
- void viewportMousePressEvent(QMouseEvent*);
- void viewportMouseMoveEvent(QMouseEvent*);
- void viewportMouseReleaseEvent(QMouseEvent*);
- bool viewportKeyEvent(QKeyEvent*); // This one is not inherited, it's called from the eventFilter
- void wheelEvent(QWheelEvent* event);
- void resizeEvent(QResizeEvent* event);
- void drawContents(QPainter* p,int clipx,int clipy,int clipw,int cliph);
+ bool eventFilter(TQObject*, TQEvent*);
+ void viewportMousePressEvent(TQMouseEvent*);
+ void viewportMouseMoveEvent(TQMouseEvent*);
+ void viewportMouseReleaseEvent(TQMouseEvent*);
+ bool viewportKeyEvent(TQKeyEvent*); // This one is not inherited, it's called from the eventFilter
+ void wheelEvent(TQWheelEvent* event);
+ void resizeEvent(TQResizeEvent* event);
+ void drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph);
};
} // namespace