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/kpthumbnail.cpp | |
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/kpthumbnail.cpp')
-rw-r--r-- | kolourpaint/kpthumbnail.cpp | 60 |
1 files changed, 21 insertions, 39 deletions
diff --git a/kolourpaint/kpthumbnail.cpp b/kolourpaint/kpthumbnail.cpp index 5c57b12d..08a2331e 100644 --- a/kolourpaint/kpthumbnail.cpp +++ b/kolourpaint/kpthumbnail.cpp @@ -45,54 +45,36 @@ // TODO: get out of the Alt+Tab list -kpThumbnail::kpThumbnail (kpMainWindow *parent, const char *name) -#if KP_IS_QT_3_3 - : TQDockWindow (TQDockWindow::OutsideDock, parent, name), -#else // With Qt <3.3, OutsideDock requires parent = 0, - // sync: make sure outside of dock - : TQDockWindow (TQDockWindow::InDock, parent, name), - #warning "Using Qt <3.3: the thumbnail will flicker more when appearing" -#endif - m_mainWindow (parent), +kpThumbnail::kpThumbnail (kpMainWindow *tqparent, const char *name) + : TQDockWindow (TQDockWindow::OutsideDock, tqparent, name), + m_mainWindow (tqparent), m_view (0) { - if (!parent) - kdError () << "kpThumbnail::kpThumbnail() requires parent" << endl; - - -#if !KP_IS_QT_3_3 - if (parent) - { - hide (); - - // sync: make sure outside of dock - parent->moveDockWindow (this, Qt::DockTornOff); - } -#endif - + if (!tqparent) + kdError () << "kpThumbnail::kpThumbnail() requires tqparent" << endl; - if (parent) + if (tqparent) { // Prevent thumbnail from docking - it's _really_ irritating otherwise - parent->leftDock ()->setAcceptDockWindow (this, false); - parent->rightDock ()->setAcceptDockWindow (this, false); - parent->topDock ()->setAcceptDockWindow (this, false); - parent->bottomDock ()->setAcceptDockWindow (this, false); + tqparent->leftDock ()->setAcceptDockWindow (this, false); + tqparent->rightDock ()->setAcceptDockWindow (this, false); + tqparent->topDock ()->setAcceptDockWindow (this, false); + tqparent->bottomDock ()->setAcceptDockWindow (this, false); } - TQSize layoutMinimumSize = layout () ? layout ()->minimumSize () : TQSize (); + TQSize tqlayoutMinimumSize = tqlayout () ? tqlayout ()->tqminimumSize () : TQSize (); #if DEBUG_KP_THUMBNAIL - kdDebug () << "\tlayout=" << layout () - << " minSize=" << (layout () ? layout ()->minimumSize () : TQSize ()) << endl; + kdDebug () << "\ttqlayout=" << tqlayout () + << " minSize=" << (tqlayout () ? tqlayout ()->tqminimumSize () : TQSize ()) << endl; kdDebug () << "\tboxLayout=" << boxLayout () - << " minSize=" << (boxLayout () ? boxLayout ()->minimumSize () : TQSize ()) + << " minSize=" << (boxLayout () ? boxLayout ()->tqminimumSize () : TQSize ()) << endl; #endif - if (layout ()) - layout ()->setResizeMode (TQLayout::FreeResize); - setMinimumSize (QMAX (layoutMinimumSize.width (), 64), - QMAX (layoutMinimumSize.height (), 64)); + if (tqlayout ()) + tqlayout ()->setResizeMode (TQLayout::FreeResize); + setMinimumSize (TQMAX (tqlayoutMinimumSize.width (), 64), + TQMAX (tqlayoutMinimumSize.height (), 64)); // Enable "X" Close Button @@ -158,7 +140,7 @@ void kpThumbnail::updateCaption () } -// public slot virtual [base QDockWindow] +// public slot virtual [base TQDockWindow] void kpThumbnail::dock () { #if DEBUG_KP_THUMBNAIL @@ -181,7 +163,7 @@ void kpThumbnail::slotViewDestroyed () } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpThumbnail::resizeEvent (TQResizeEvent *e) { #if DEBUG_KP_THUMBNAIL @@ -202,7 +184,7 @@ void kpThumbnail::resizeEvent (TQResizeEvent *e) } } -// protected virtual [base QWidget] +// protected virtual [base TQWidget] void kpThumbnail::moveEvent (TQMoveEvent * /*e*/) { if (m_mainWindow) |