summaryrefslogtreecommitdiffstats
path: root/kjumpingcube/kcubewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjumpingcube/kcubewidget.cpp')
-rw-r--r--kjumpingcube/kcubewidget.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kjumpingcube/kcubewidget.cpp b/kjumpingcube/kcubewidget.cpp
index f23e3cce..d9500084 100644
--- a/kjumpingcube/kcubewidget.cpp
+++ b/kjumpingcube/kcubewidget.cpp
@@ -21,8 +21,8 @@
**************************************************************************** */
#include "kcubewidget.h"
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -31,8 +31,8 @@
** static elements **
** ****************************************************** */
bool KCubeWidget::_clicksAllowed=true;
-QPalette KCubeWidget::color1;
-QPalette KCubeWidget::color2;
+TQPalette KCubeWidget::color1;
+TQPalette KCubeWidget::color2;
void KCubeWidget::enableClicks(bool flag)
@@ -41,7 +41,7 @@ void KCubeWidget::enableClicks(bool flag)
}
-void KCubeWidget::setColor(Owner forWhom, QPalette newPalette)
+void KCubeWidget::setColor(Owner forWhom, TQPalette newPalette)
{
if(forWhom==One)
{
@@ -53,9 +53,9 @@ void KCubeWidget::setColor(Owner forWhom, QPalette newPalette)
}
}
-QPalette KCubeWidget::color(Owner forWhom)
+TQPalette KCubeWidget::color(Owner forWhom)
{
- QPalette color;
+ TQPalette color;
if(forWhom==One)
{
color=color1;
@@ -73,9 +73,9 @@ QPalette KCubeWidget::color(Owner forWhom)
** public functions **
** ****************************************************** */
-KCubeWidget::KCubeWidget(QWidget* parent,const char* name
+KCubeWidget::KCubeWidget(TQWidget* parent,const char* name
,Owner owner,int value,int max)
- : QFrame(parent,name),
+ : TQFrame(parent,name),
Cube(owner,value,max)
{
setFrameStyle(Panel|Raised);
@@ -86,9 +86,9 @@ KCubeWidget::KCubeWidget(QWidget* parent,const char* name
//initialize hintTimer
// will be automatically destroyed by the parent
- hintTimer = new QTimer(this);
+ hintTimer = new TQTimer(this);
hintCounter=0;
- connect(hintTimer,SIGNAL(timeout()),SLOT(hint()));
+ connect(hintTimer,TQT_SIGNAL(timeout()),TQT_SLOT(hint()));
setPalette(kapp->palette());
@@ -234,7 +234,7 @@ void KCubeWidget::hint()
** Event handler **
** ****************************************************** */
-void KCubeWidget::mouseReleaseEvent(QMouseEvent *e)
+void KCubeWidget::mouseReleaseEvent(TQMouseEvent *e)
{
// only accept click if it was inside this cube
if(e->x()< 0 || e->x() > width() || e->y() < 0 || e->y() > height())
@@ -249,19 +249,19 @@ void KCubeWidget::mouseReleaseEvent(QMouseEvent *e)
-void KCubeWidget::drawContents(QPainter *painter)
+void KCubeWidget::drawContents(TQPainter *painter)
{
- QRect contents=contentsRect();
- QPixmap buffer(contents.size());
+ TQRect contents=contentsRect();
+ TQPixmap buffer(contents.size());
buffer.fill(this,contents.topLeft());
- QPainter *p=new QPainter;
+ TQPainter *p=new QPainter;
p->begin(&buffer);
int h=contents.height();
int w=contents.width();
int circleSize=(h<w?h:w)/7;
int points=value();
- QBrush brush("black");
- QPen pen("black");
+ TQBrush brush("black");
+ TQPen pen("black");
p->setBrush(brush);
p->setPen(pen);
switch(points)
@@ -333,7 +333,7 @@ void KCubeWidget::drawContents(QPainter *painter)
default:
kdDebug() << "cube had value " << points << endl;
- QString s;
+ TQString s;
s.sprintf("%d",points);
p->drawText(w/2,h/2,s);
break;