diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /kig/misc/common.cpp | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip |
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kig/misc/common.cpp')
-rw-r--r-- | kig/misc/common.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp index b41b9284..83fdd077 100644 --- a/kig/misc/common.cpp +++ b/kig/misc/common.cpp @@ -347,7 +347,7 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, const Coordinate& } double getDoubleFromUser( const TQString& caption, const TQString& label, double value, - TQWidget* parent, bool* ok, double min, double max, int decimals ) + TQWidget* tqparent, bool* ok, double min, double max, int decimals ) { #ifdef KIG_USE_KDOUBLEVALIDATOR KDoubleValidator vtor( min, max, decimals, 0, 0 ); @@ -357,12 +357,12 @@ double getDoubleFromUser( const TQString& caption, const TQString& label, double #if KDE_IS_VERSION( 3, 1, 90 ) TQString input = KInputDialog::getText( caption, label, KGlobal::locale()->formatNumber( value, decimals ), - ok, parent, "getDoubleFromUserDialog", &vtor ); + ok, tqparent, "getDoubleFromUserDialog", &vtor ); #else TQString input = KLineEditDlg::getText( caption, label, KGlobal::locale()->formatNumber( value, decimals ), - ok, parent, &vtor ); + ok, tqparent, &vtor ); #endif bool myok = true; @@ -422,7 +422,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // if ( fabs( a.x - b.x ) <= 1e-7 ) // { // // too small to be useful.. -// return r.contains( Coordinate( a.x, r.center().y ), miss ); +// return r.tqcontains( Coordinate( a.x, r.center().y ), miss ); // } // in case we have a segment we need also to check for the case when @@ -433,7 +433,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // - if the midpoint is in the rect than returning true is safe (also // in the cases where we have a ray or a line) - if ( r.contains( 0.5*( a + b ), miss ) ) return true; + if ( r.tqcontains( 0.5*( a + b ), miss ) ) return true; Coordinate dir = b - a; double m = dir.y / dir.x; @@ -455,10 +455,10 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // intersection is not between the begin and end point.. ) and if // the rect contains the intersection.. If it does, we have a winner.. return - ( imp->contains( leftint, width, w ) && r.contains( leftint, miss ) ) || - ( imp->contains( rightint, width, w ) && r.contains( rightint, miss ) ) || - ( imp->contains( bottomint, width, w ) && r.contains( bottomint, miss ) ) || - ( imp->contains( topint, width, w ) && r.contains( topint, miss ) ); + ( imp->tqcontains( leftint, width, w ) && r.tqcontains( leftint, miss ) ) || + ( imp->tqcontains( rightint, width, w ) && r.tqcontains( rightint, miss ) ) || + ( imp->tqcontains( bottomint, width, w ) && r.tqcontains( bottomint, miss ) ) || + ( imp->tqcontains( topint, width, w ) && r.tqcontains( topint, miss ) ); } bool operator==( const LineData& l, const LineData& r ) |