diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficecore/KoRect.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kofficecore/KoRect.cpp')
-rw-r--r-- | lib/kofficecore/KoRect.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/kofficecore/KoRect.cpp b/lib/kofficecore/KoRect.cpp index b93a577d..78a63992 100644 --- a/lib/kofficecore/KoRect.cpp +++ b/lib/kofficecore/KoRect.cpp @@ -166,15 +166,15 @@ KoRect &KoRect::operator&=(const KoRect &rhs) { return *this; } -bool KoRect::contains(const KoPoint &p) const { +bool KoRect::tqcontains(const KoPoint &p) const { return (p.x() >= m_tl.x() && p.x() <= m_br.x() && p.y() >= m_tl.y() && p.y() <= m_br.y()); } -bool KoRect::contains(const double &x, const double &y) const { +bool KoRect::tqcontains(const double &x, const double &y) const { return (x >= m_tl.x() && x <= m_br.x() && y >= m_tl.y() && y <= m_br.y()); } -bool KoRect::contains(const KoRect &r) const { +bool KoRect::tqcontains(const KoRect &r) const { return (r.left() >= m_tl.x() && r.right() <= m_br.x() && r.top() >= m_tl.y() && r.bottom() <= m_br.y()); } @@ -188,8 +188,8 @@ KoRect KoRect::intersect(const KoRect &r) const { } bool KoRect::intersects(const KoRect &r) const { - return ( QMAX(m_tl.x(), r.left()) <= QMIN(m_br.x(), r.right()) && - QMAX(m_tl.y(), r.top()) <= QMIN(m_br.y(), r.bottom()) ); + return ( TQMAX(m_tl.x(), r.left()) <= TQMIN(m_br.x(), r.right()) && + TQMAX(m_tl.y(), r.top()) <= TQMIN(m_br.y(), r.bottom()) ); } KoRect operator|(const KoRect &lhs, const KoRect &rhs) { @@ -226,7 +226,7 @@ bool operator!=(const KoRect &lhs, const KoRect &rhs) { lhs.bottomRight()!=rhs.bottomRight() ); } -KoRect KoRect::transform(const QWMatrix &m) const +KoRect KoRect::transform(const TQWMatrix &m) const { KoRect result; if(m.m12() == 0.0F && m.m21() == 0.0F) @@ -248,10 +248,10 @@ KoRect KoRect::transform(const QWMatrix &m) const for(int i = 1; i < 4; i++) { - result.setLeft(QMIN(p[i].x(), result.left())); - result.setTop(QMIN(p[i].y(), result.top())); - result.setRight(QMAX(p[i].x(), result.right())); - result.setBottom(QMAX(p[i].y(), result.bottom())); + result.setLeft(TQMIN(p[i].x(), result.left())); + result.setTop(TQMIN(p[i].y(), result.top())); + result.setRight(TQMAX(p[i].x(), result.right())); + result.setBottom(TQMAX(p[i].y(), result.bottom())); } } return result; @@ -262,13 +262,13 @@ KoRect KoRect::translate(double dx, double dy) const return KoRect(left() + dx, top() + dy, width(), height()); } -QRect KoRect::toQRect() const +TQRect KoRect::toTQRect() const { - return QRect( qRound( left() ), qRound( top() ), qRound( width() ), qRound( height() ) ); + return TQRect( tqRound( left() ), tqRound( top() ), tqRound( width() ), tqRound( height() ) ); } //static -KoRect KoRect::fromQRect( const QRect &rect ) +KoRect KoRect::fromTQRect( const TQRect &rect ) { return KoRect( rect.left(), rect.top(), rect.width(), rect.height() ); } |