diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /kpat/card.cpp | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpat/card.cpp')
-rw-r--r-- | kpat/card.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kpat/card.cpp b/kpat/card.cpp index 983a901d..a6529bd1 100644 --- a/kpat/card.cpp +++ b/kpat/card.cpp @@ -21,7 +21,7 @@ #include <math.h> #include <assert.h> -#include <qpainter.h> +#include <tqpainter.h> #include <kdebug.h> @@ -38,14 +38,14 @@ static const char *rank_names[] = {"Ace", "Two", "Three", "Four", "Five", "Six" const int Card::RTTI = 1001; -Card::Card( Rank r, Suit s, QCanvas* _parent ) - : QCanvasRectangle( _parent ), +Card::Card( Rank r, Suit s, TQCanvas* _parent ) + : TQCanvasRectangle( _parent ), m_suit( s ), m_rank( r ), m_source(0), scaleX(1.0), scaleY(1.0), tookDown(false) { // Set the name of the card // FIXME: i18n() - m_name = QString("%1 %2").arg(suit_names[s-1]).arg(rank_names[r-1]).utf8(); + m_name = TQString("%1 %2").arg(suit_names[s-1]).arg(rank_names[r-1]).utf8(); // Default for the card is face up, standard size. m_faceup = true; @@ -77,7 +77,7 @@ Card::~Card() // Return the pixmap of the card // -QPixmap Card::pixmap() const +TQPixmap Card::pixmap() const { return cardMap::self()->image( m_rank, m_suit ); } @@ -96,9 +96,9 @@ void Card::turn( bool _faceup ) // Draw the card on the painter 'p'. // -void Card::draw( QPainter &p ) +void Card::draw( TQPainter &p ) { - QPixmap side; + TQPixmap side; // Get the image to draw (front / back) if( isFaceUp() ) @@ -108,7 +108,7 @@ void Card::draw( QPainter &p ) // Rescale the image if necessary. if (scaleX <= 0.98 || scaleY <= 0.98) { - QWMatrix s; + TQWMatrix s; s.scale( scaleX, scaleY ); side = side.xForm( s ); int xoff = side.width() / 2; @@ -122,7 +122,7 @@ void Card::draw( QPainter &p ) void Card::moveBy(double dx, double dy) { - QCanvasRectangle::moveBy(dx, dy); + TQCanvasRectangle::moveBy(dx, dy); } @@ -215,7 +215,7 @@ int Card::Hz = 0; void Card::setZ(double z) { - QCanvasRectangle::setZ(z); + TQCanvasRectangle::setZ(z); if (z > Hz) Hz = int(z); } @@ -293,7 +293,7 @@ void Card::flipTo(int x2, int y2, int steps) // Advance a card animation one step. This function adds flipping of -// the card to the translation animation that QCanvasRectangle offers. +// the card to the translation animation that TQCanvasRectangle offers. // void Card::advance(int stage) { @@ -322,7 +322,7 @@ void Card::advance(int stage) } // Animate the translation of the card. - QCanvasRectangle::advance(stage); + TQCanvasRectangle::advance(stage); } @@ -344,7 +344,7 @@ void Card::setAnimated(bool anim) setZ(m_destZ); } - QCanvasRectangle::setAnimated(anim); + TQCanvasRectangle::setAnimated(anim); } |