diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kolourpaint/views | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolourpaint/views')
-rw-r--r-- | kolourpaint/views/kpthumbnailview.cpp | 6 | ||||
-rw-r--r-- | kolourpaint/views/kpthumbnailview.h | 5 | ||||
-rw-r--r-- | kolourpaint/views/kpunzoomedthumbnailview.cpp | 16 | ||||
-rw-r--r-- | kolourpaint/views/kpunzoomedthumbnailview.h | 5 | ||||
-rw-r--r-- | kolourpaint/views/kpzoomedthumbnailview.cpp | 8 | ||||
-rw-r--r-- | kolourpaint/views/kpzoomedthumbnailview.h | 5 | ||||
-rw-r--r-- | kolourpaint/views/kpzoomedview.cpp | 4 | ||||
-rw-r--r-- | kolourpaint/views/kpzoomedview.h | 3 |
8 files changed, 28 insertions, 24 deletions
diff --git a/kolourpaint/views/kpthumbnailview.cpp b/kolourpaint/views/kpthumbnailview.cpp index 179f7c92..7332433a 100644 --- a/kolourpaint/views/kpthumbnailview.cpp +++ b/kolourpaint/views/kpthumbnailview.cpp @@ -39,12 +39,12 @@ kpThumbnailView::kpThumbnailView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { } @@ -77,7 +77,7 @@ void kpThumbnailView::resizeEvent (TQResizeEvent *e) << endl; #endif - // For QResizeEvent's, Qt already throws an entire widget repaint into + // For TQResizeEvent's, TQt already throws an entire widget tqrepaint into // the event loop. So eat useless update() calls that can only slow // things down. // TODO: this doesn't seem to work. diff --git a/kolourpaint/views/kpthumbnailview.h b/kolourpaint/views/kpthumbnailview.h index 9bc4dad8..5f2e1664 100644 --- a/kolourpaint/views/kpthumbnailview.h +++ b/kolourpaint/views/kpthumbnailview.h @@ -41,6 +41,7 @@ class kpThumbnailView : public kpView { Q_OBJECT + TQ_OBJECT public: /** @@ -53,7 +54,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs this thumbnail view. @@ -69,7 +70,7 @@ public: protected: /** - * Sets the mask to cover the rectangle with top-left, origin() and + * Sets the tqmask to cover the rectangle with top-left, origin() and * dimensions equal to or slightly less than (in case of rounding * error) the size of the document in view coordinates. This ensures * that all pixels are initialised with either document pixels or the diff --git a/kolourpaint/views/kpunzoomedthumbnailview.cpp b/kolourpaint/views/kpunzoomedthumbnailview.cpp index 4f019905..dea4e089 100644 --- a/kolourpaint/views/kpunzoomedthumbnailview.cpp +++ b/kolourpaint/views/kpunzoomedthumbnailview.cpp @@ -50,12 +50,12 @@ kpUnzoomedThumbnailView::kpUnzoomedThumbnailView ( kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpThumbnailView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name), + tqparent, name), d (new kpUnzoomedThumbnailViewPrivate ()) { if (buddyViewScrollableContainer ()) @@ -112,7 +112,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () if (document ()->width () > width ()) { x = (int) buddyView ()->transformViewToDocX (scrollViewContentsX); - const int rightMostAllowedX = QMAX (0, document ()->width () - width ()); + const int rightMostAllowedX = TQMAX (0, document ()->width () - width ()); #if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW kdDebug () << "\tdocX=" << x << " docWidth=" << document ()->width () @@ -135,7 +135,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () if (document ()->height () > height ()) { y = (int) buddyView ()->transformViewToDocY (scrollViewContentsY); - const int bottomMostAllowedY = QMAX (0, document ()->height () - height ()); + const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ()); #if DEBUG_KP_UNZOOMED_THUMBNAIL_VIEW kdDebug () << "\tdocY=" << y << " docHeight=" << document ()->height () @@ -163,12 +163,12 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () TQRect docRect = buddyView ()->transformViewToDoc ( TQRect (buddyViewScrollableContainer ()->contentsXSoon (), buddyViewScrollableContainer ()->contentsYSoon (), - QMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), - QMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); + TQMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()), + TQMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ()))); x = docRect.x () - (width () - docRect.width ()) / 2; kdDebug () << "\tnew suggest x=" << x << endl; - const int rightMostAllowedX = QMAX (0, document ()->width () - width ()); + const int rightMostAllowedX = TQMAX (0, document ()->width () - width ()); if (x < 0) x = 0; if (x > rightMostAllowedX) @@ -176,7 +176,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment () y = docRect.y () - (height () - docRect.height ()) / 2; kdDebug () << "\tnew suggest y=" << y << endl; - const int bottomMostAllowedY = QMAX (0, document ()->height () - height ()); + const int bottomMostAllowedY = TQMAX (0, document ()->height () - height ()); if (y < 0) y = 0; if (y > bottomMostAllowedY) diff --git a/kolourpaint/views/kpunzoomedthumbnailview.h b/kolourpaint/views/kpunzoomedthumbnailview.h index cff6bdab..7e81a5db 100644 --- a/kolourpaint/views/kpunzoomedthumbnailview.h +++ b/kolourpaint/views/kpunzoomedthumbnailview.h @@ -55,6 +55,7 @@ class kpViewScrollableContainer; /*sealed*/ class kpUnzoomedThumbnailView : public kpThumbnailView { Q_OBJECT + TQ_OBJECT public: /** @@ -65,7 +66,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs an unzoomed thumbnail view. @@ -86,7 +87,7 @@ public slots: * container will be visible. * * It tries to maximise the used area of this view. Unused areas will - * be set to the widget background thanks to the mask. + * be set to the widget background thanks to the tqmask. * * Call this if the size of the document changes. * Already connected to buddyViewScrollableContainer()'s diff --git a/kolourpaint/views/kpzoomedthumbnailview.cpp b/kolourpaint/views/kpzoomedthumbnailview.cpp index c5bde48d..adef47c0 100644 --- a/kolourpaint/views/kpzoomedthumbnailview.cpp +++ b/kolourpaint/views/kpzoomedthumbnailview.cpp @@ -43,12 +43,12 @@ kpZoomedThumbnailView::kpZoomedThumbnailView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpThumbnailView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { // Call to virtual function - this is why the class is sealed adjustToEnvironment (); @@ -97,8 +97,8 @@ void kpZoomedThumbnailView::adjustToEnvironment () } - int hzoom = QMAX (1, width () * 100 / document ()->width ()); - int vzoom = QMAX (1, height () * 100 / document ()->height ()); + int hzoom = TQMAX (1, width () * 100 / document ()->width ()); + int vzoom = TQMAX (1, height () * 100 / document ()->height ()); // keep aspect ratio if (hzoom < vzoom) diff --git a/kolourpaint/views/kpzoomedthumbnailview.h b/kolourpaint/views/kpzoomedthumbnailview.h index 882c6d08..c35c22bb 100644 --- a/kolourpaint/views/kpzoomedthumbnailview.h +++ b/kolourpaint/views/kpzoomedthumbnailview.h @@ -50,6 +50,7 @@ /*sealed*/ class kpZoomedThumbnailView : public kpThumbnailView { Q_OBJECT + TQ_OBJECT public: /** @@ -60,7 +61,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs a zoomed thumbnail view. @@ -77,7 +78,7 @@ public: public slots: /** * Changes its zoom level to accommodate the display of entire document - * in the view. It maintains aspect by changing the origin and mask. + * in the view. It maintains aspect by changing the origin and tqmask. * * Call this if the size of the document changes. * Already called by @ref kpThumbnailView resizeEvent(). diff --git a/kolourpaint/views/kpzoomedview.cpp b/kolourpaint/views/kpzoomedview.cpp index c2b1f47d..402b8e39 100644 --- a/kolourpaint/views/kpzoomedview.cpp +++ b/kolourpaint/views/kpzoomedview.cpp @@ -43,12 +43,12 @@ kpZoomedView::kpZoomedView (kpDocument *document, kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name) + TQWidget *tqparent, const char *name) : kpView (document, toolToolBar, viewManager, buddyView, scrollableContainer, - parent, name) + tqparent, name) { // Call to virtual function - this is why the class is sealed adjustToEnvironment (); diff --git a/kolourpaint/views/kpzoomedview.h b/kolourpaint/views/kpzoomedview.h index 12565ab4..e0228fde 100644 --- a/kolourpaint/views/kpzoomedview.h +++ b/kolourpaint/views/kpzoomedview.h @@ -51,6 +51,7 @@ /*sealed*/ class kpZoomedView : public kpView { Q_OBJECT + TQ_OBJECT public: /** @@ -61,7 +62,7 @@ public: kpViewManager *viewManager, kpView *buddyView, kpViewScrollableContainer *scrollableContainer, - TQWidget *parent, const char *name); + TQWidget *tqparent, const char *name); /** * Destructs an unzoomed view. |