summaryrefslogtreecommitdiffstats
path: root/libkdegames/kgamelcd.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /libkdegames/kgamelcd.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-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 'libkdegames/kgamelcd.cpp')
-rw-r--r--libkdegames/kgamelcd.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/libkdegames/kgamelcd.cpp b/libkdegames/kgamelcd.cpp
index 65c436a5..c87930b5 100644
--- a/libkdegames/kgamelcd.cpp
+++ b/libkdegames/kgamelcd.cpp
@@ -20,23 +20,23 @@
#include "kgamelcd.h"
#include "kgamelcd.moc"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <kglobal.h>
//-----------------------------------------------------------------------------
-KGameLCD::KGameLCD(uint nbDigits, QWidget *parent, const char *name)
- : QLCDNumber(nbDigits, parent, name), _htime(800)
+KGameLCD::KGameLCD(uint nbDigits, TQWidget *parent, const char *name)
+ : TQLCDNumber(nbDigits, parent, name), _htime(800)
{
- const QPalette &p = palette();
- _fgColor = p.color(QPalette::Active, QColorGroup::Foreground);
- _hlColor = p.color(QPalette::Active, QColorGroup::HighlightedText);
+ const TQPalette &p = palette();
+ _fgColor = p.color(TQPalette::Active, TQColorGroup::Foreground);
+ _hlColor = p.color(TQPalette::Active, TQColorGroup::HighlightedText);
- _timer = new QTimer(this);
- connect(_timer, SIGNAL(timeout()), SLOT(timeout()));
+ _timer = new TQTimer(this);
+ connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
setFrameStyle(Panel | Plain);
setSegmentStyle(Flat);
@@ -47,27 +47,27 @@ KGameLCD::KGameLCD(uint nbDigits, QWidget *parent, const char *name)
KGameLCD::~KGameLCD()
{}
-void KGameLCD::setDefaultBackgroundColor(const QColor &color)
+void KGameLCD::setDefaultBackgroundColor(const TQColor &color)
{
- QPalette p = palette();
- p.setColor(QColorGroup::Background, color);
+ TQPalette p = palette();
+ p.setColor(TQColorGroup::Background, color);
setPalette(p);
}
-void KGameLCD::setDefaultColor(const QColor &color)
+void KGameLCD::setDefaultColor(const TQColor &color)
{
_fgColor = color;
- QPalette p = palette();
- p.setColor(QColorGroup::Foreground, color);
+ TQPalette p = palette();
+ p.setColor(TQColorGroup::Foreground, color);
setPalette(p);
}
-void KGameLCD::setHighlightColor(const QColor &color)
+void KGameLCD::setHighlightColor(const TQColor &color)
{
_hlColor = color;
}
-void KGameLCD::setLeadingString(const QString &s)
+void KGameLCD::setLeadingString(const TQString &s)
{
_lead = s;
displayInt(0);
@@ -80,21 +80,21 @@ void KGameLCD::setHighlightTime(uint time)
void KGameLCD::resetColor()
{
- setColor(QColor());
+ setColor(TQColor());
}
-void KGameLCD::setColor(const QColor &color)
+void KGameLCD::setColor(const TQColor &color)
{
- const QColor &c = (color.isValid() ? color : _fgColor);
- QPalette p = palette();
- p.setColor(QColorGroup::Foreground, c);
+ const TQColor &c = (color.isValid() ? color : _fgColor);
+ TQPalette p = palette();
+ p.setColor(TQColorGroup::Foreground, c);
setPalette(p);
}
void KGameLCD::displayInt(int v)
{
int n = numDigits() - _lead.length();
- display(_lead + QString::number(v).rightJustify(n));
+ display(_lead + TQString::number(v).rightJustify(n));
}
void KGameLCD::highlight()
@@ -110,11 +110,11 @@ void KGameLCD::highlight(bool light)
}
//-----------------------------------------------------------------------------
-KGameLCDClock::KGameLCDClock(QWidget *parent, const char *name)
+KGameLCDClock::KGameLCDClock(TQWidget *parent, const char *name)
: KGameLCD(5, parent, name)
{
- _timerClock = new QTimer(this);
- connect(_timerClock, SIGNAL(timeout()), SLOT(timeoutClock()));
+ _timerClock = new TQTimer(this);
+ connect(_timerClock, TQT_SIGNAL(timeout()), TQT_SLOT(timeoutClock()));
}
KGameLCDClock::~KGameLCDClock()
@@ -132,10 +132,10 @@ void KGameLCDClock::timeoutClock()
showTime();
}
-QString KGameLCDClock::pretty() const
+TQString KGameLCDClock::pretty() const
{
- QString sec = QString::number(_sec).rightJustify(2, '0', true);
- QString min = QString::number(_min).rightJustify(2, '0', true);
+ TQString sec = TQString::number(_sec).rightJustify(2, '0', true);
+ TQString min = TQString::number(_min).rightJustify(2, '0', true);
return min + ':' + sec;
}
@@ -175,7 +175,7 @@ void KGameLCDClock::setTime(uint sec)
showTime();
}
-void KGameLCDClock::setTime(const QString &s)
+void KGameLCDClock::setTime(const TQString &s)
{
Q_ASSERT( s.length()==5 && s[2]==':' );
uint min = kMin(s.section(':', 0, 0).toUInt(), uint(59));
@@ -188,20 +188,20 @@ void KGameLCDClock::setTime(const QString &s)
class KGameLCDList::KGameLCDListPrivate
{
public:
- QValueVector<QLabel *> _leadings;
+ TQValueVector<TQLabel *> _leadings;
};
-KGameLCDList::KGameLCDList(const QString &title, QWidget *parent,
+KGameLCDList::KGameLCDList(const TQString &title, TQWidget *parent,
const char *name)
- : QWidget(parent, name)
+ : TQWidget(parent, name)
{
init(title);
}
-KGameLCDList::KGameLCDList(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KGameLCDList::KGameLCDList(TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- init(QString::null);
+ init(TQString::null);
}
KGameLCDList::~KGameLCDList()
@@ -209,34 +209,34 @@ KGameLCDList::~KGameLCDList()
delete d;
}
-void KGameLCDList::init(const QString &title)
+void KGameLCDList::init(const TQString &title)
{
d = new KGameLCDListPrivate;
- QGridLayout *top = new QGridLayout(this, 1, 2, 5);
+ TQGridLayout *top = new TQGridLayout(this, 1, 2, 5);
top->setColStretch(1, 1);
- _title = new QLabel(title, this);
+ _title = new TQLabel(title, this);
_title->setAlignment(AlignCenter);
top->addMultiCellWidget(_title, 0, 0, 0, 1, AlignCenter);
}
-void KGameLCDList::append(QLCDNumber *lcd)
+void KGameLCDList::append(TQLCDNumber *lcd)
{
- append(QString::null, lcd);
+ append(TQString::null, lcd);
}
-void KGameLCDList::append(const QString &leading, QLCDNumber *lcd)
+void KGameLCDList::append(const TQString &leading, TQLCDNumber *lcd)
{
uint i = size();
- QLabel *label = 0;
+ TQLabel *label = 0;
if ( !leading.isEmpty() ) {
- label = new QLabel(leading, this);
- static_cast<QGridLayout *>(layout())->addWidget(label, i+1, 0);
+ label = new TQLabel(leading, this);
+ static_cast<TQGridLayout *>(layout())->addWidget(label, i+1, 0);
}
d->_leadings.push_back(label);
_lcds.push_back(lcd);
- static_cast<QGridLayout *>(layout())->addWidget(lcd, i+1, 1);
+ static_cast<TQGridLayout *>(layout())->addWidget(lcd, i+1, 1);
}
void KGameLCDList::clear()