diff options
Diffstat (limited to 'libtdegames/kgameprogress.cpp')
-rw-r--r-- | libtdegames/kgameprogress.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libtdegames/kgameprogress.cpp b/libtdegames/kgameprogress.cpp index 7327a70f..7002ee8d 100644 --- a/libtdegames/kgameprogress.cpp +++ b/libtdegames/kgameprogress.cpp @@ -32,12 +32,12 @@ KGameProgress::KGameProgress(TQWidget *parent, const char *name) : TQFrame(parent, name), TQRangeControl(0, 100, 1, 10, 0), - orient(Qt::Horizontal) + orient(TQt::Horizontal) { initialize(); } -KGameProgress::KGameProgress(Qt::Orientation orientation, TQWidget *parent, const char *name) +KGameProgress::KGameProgress(TQt::Orientation orientation, TQWidget *parent, const char *name) : TQFrame(parent, name), TQRangeControl(0, 100, 1, 10, 0), orient(orientation) @@ -46,7 +46,7 @@ KGameProgress::KGameProgress(Qt::Orientation orientation, TQWidget *parent, cons } KGameProgress::KGameProgress(int minValue, int maxValue, int value, - Qt::Orientation orientation, TQWidget *parent, const char *name) + TQt::Orientation orientation, TQWidget *parent, const char *name) : TQFrame(parent, name), TQRangeControl(minValue, maxValue, 1, 10, value), orient(orientation) @@ -70,15 +70,15 @@ void KGameProgress::initialize() use_supplied_bar_color = false; bar_pixmap = 0; bar_style = Solid; - text_enabled = TRUE; + text_enabled = true; setBackgroundMode( PaletteBackground ); - connect(kapp, TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(paletteChange())); + connect(tdeApp, TQ_SIGNAL(appearanceChanged()), this, TQ_SLOT(paletteChange())); paletteChange(); } void KGameProgress::paletteChange() { - TQPalette p = kapp->palette(); + TQPalette p = tdeApp->palette(); const TQColorGroup &colorGroup = p.active(); if (!use_supplied_bar_color) bar_color = colorGroup.highlight(); @@ -118,7 +118,7 @@ void KGameProgress::setBarStyle(BarStyle style) } } -void KGameProgress::setOrientation(Qt::Orientation orientation) +void KGameProgress::setOrientation(TQt::Orientation orientation) { if (orient != orientation) { orient = orientation; @@ -155,7 +155,7 @@ TQSize KGameProgress::sizeHint() const { TQSize s( size() ); - if(orientation() == Qt::Vertical) { + if(orientation() == TQt::Vertical) { s.setWidth(24); } else { s.setHeight(24); @@ -171,7 +171,7 @@ TQSize KGameProgress::minimumSizeHint() const TQSizePolicy KGameProgress::sizePolicy() const { - if ( orientation()==Qt::Vertical ) + if ( orientation()==TQt::Vertical ) return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); else return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); @@ -196,13 +196,13 @@ int KGameProgress::recalcValue(int range) void KGameProgress::valueChange() { - repaint(contentsRect(), FALSE); + repaint(contentsRect(), false); emit percentageChanged(recalcValue(100)); } void KGameProgress::rangeChange() { - repaint(contentsRect(), FALSE); + repaint(contentsRect(), false); emit percentageChanged(recalcValue(100)); } @@ -271,7 +271,7 @@ void KGameProgress::drawContents(TQPainter *p) switch (bar_style) { case Solid: - if (orient ==Qt::Horizontal) { + if (orient ==TQt::Horizontal) { fr.setWidth(recalcValue(cr.width())); er.setLeft(fr.right() + 1); } else { @@ -289,7 +289,7 @@ void KGameProgress::drawContents(TQPainter *p) case Blocked: const int margin = 2; int max, num, dx, dy; - if (orient ==Qt::Horizontal) { + if (orient ==TQt::Horizontal) { fr.setHeight(cr.height() - 2 * margin); fr.setWidth((int)(0.67 * fr.height())); fr.moveTopLeft(TQPoint(cr.left() + margin, cr.top() + margin)); @@ -315,7 +315,7 @@ void KGameProgress::drawContents(TQPainter *p) } if (num != max) { - if (orient ==Qt::Horizontal) + if (orient ==TQt::Horizontal) er.setLeft(fr.right() + 1); else er.setBottom(fr.bottom() + 1); |