diff options
Diffstat (limited to 'kwin4/kwin4/scorewidget.cpp')
-rw-r--r-- | kwin4/kwin4/scorewidget.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kwin4/kwin4/scorewidget.cpp b/kwin4/kwin4/scorewidget.cpp index 7d0586fb..2d2551e8 100644 --- a/kwin4/kwin4/scorewidget.cpp +++ b/kwin4/kwin4/scorewidget.cpp @@ -19,22 +19,22 @@ #include "prefs.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qsizepolicy.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqsizepolicy.h> #include <kdebug.h> #include <klocale.h> #define COL_STATUSBORDER black -#define COL_STATUSFIELD QColor(130,130,255) -#define COL_STATUSDARK QColor(0,0,65) -#define COL_STATUSLIGHT QColor(210,210,255) +#define COL_STATUSFIELD TQColor(130,130,255) +#define COL_STATUSDARK TQColor(0,0,65) +#define COL_STATUSLIGHT TQColor(210,210,255) -ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl ) - : QFrame( parent, name, fl ) +ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl ) + : TQFrame( parent, name, fl ) { - setFrameStyle( QFrame::Box | QFrame::Raised ); + setFrameStyle( TQFrame::Box | TQFrame::Raised ); setLineWidth( 2 ); setMidLineWidth( 4 ); @@ -44,47 +44,47 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl ) int row=0; setCaption( i18n( "Form1" ) ); - //LayoutB = new QGridLayout( this,4,3,15,5 ); - LayoutB = new QGridLayout( this); + //LayoutB = new TQGridLayout( this,4,3,15,5 ); + LayoutB = new TQGridLayout( this); LayoutB->setSpacing( 3 ); LayoutB->setMargin( 15 ); - TextLabel7 = new QLabel( this, "TextLabel7" ); + TextLabel7 = new TQLabel( this, "TextLabel7" ); setPlayer("-----",0); TextLabel7->setBackgroundColor( COL_STATUSFIELD ); TextLabel7->setAlignment(Qt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel7, row, row,0,2 ); row++; - TextLabel8 = new QLabel( this, "TextLabel8" ); + TextLabel8 = new TQLabel( this, "TextLabel8" ); TextLabel8->setText( i18n( "vs" ) ); TextLabel8->setBackgroundColor( COL_STATUSFIELD ); TextLabel8->setAlignment(Qt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel8, row, row,0,2 ); row++; - TextLabel9 = new QLabel( this, "TextLabel9" ); + TextLabel9 = new TQLabel( this, "TextLabel9" ); setPlayer("-----",1); - // TextLabel9->setFrameShape(QFrame::Box ); + // TextLabel9->setFrameShape(TQFrame::Box ); // TextLabel9->setLineWidth(5); TextLabel9->setBackgroundColor( COL_STATUSFIELD ); TextLabel9->setAlignment(Qt::AlignHCenter); LayoutB->addMultiCellWidget( TextLabel9, row, row,0,2 ); row++; - QSpacerItem *Spacer2=new QSpacerItem(0,16,QSizePolicy::Preferred,QSizePolicy::Preferred); + TQSpacerItem *Spacer2=new TQSpacerItem(0,16,TQSizePolicy::Preferred,TQSizePolicy::Preferred); LayoutB->addMultiCell( Spacer2, row, row,0,2 ); row++; - QSpacerItem *Spacer1=new QSpacerItem(25,0,QSizePolicy::Preferred,QSizePolicy::Preferred); + TQSpacerItem *Spacer1=new TQSpacerItem(25,0,TQSizePolicy::Preferred,TQSizePolicy::Preferred); LayoutB->addMultiCell( Spacer1, row, row+2,1,1 ); - TextLabel1 = new QLabel( this, "Level" ); + TextLabel1 = new TQLabel( this, "Level" ); TextLabel1->setText( i18n( "Level" ) ); TextLabel1->setBackgroundColor( COL_STATUSFIELD ); LayoutB->addWidget( TextLabel1, row, 0 ); - TextLabel4 = new QLabel( this, "L" ); + TextLabel4 = new TQLabel( this, "L" ); setLevel(Prefs::level()); TextLabel4->setAlignment(Qt::AlignRight); TextLabel4->setBackgroundColor( COL_STATUSFIELD ); @@ -93,12 +93,12 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl ) row++; - TextLabel2 = new QLabel( this, "Move" ); + TextLabel2 = new TQLabel( this, "Move" ); TextLabel2->setText( i18n("number of MOVE in game", "Move" ) ); TextLabel2->setBackgroundColor( COL_STATUSFIELD ); LayoutB->addWidget( TextLabel2, row, 0 ); - TextLabel5 = new QLabel( this, "M" ); + TextLabel5 = new TQLabel( this, "M" ); setMove(0); TextLabel5->setAlignment(Qt::AlignRight); TextLabel5->setBackgroundColor( COL_STATUSFIELD ); @@ -107,12 +107,12 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl ) row++; - TextLabel3 = new QLabel( this, "Chance" ); + TextLabel3 = new TQLabel( this, "Chance" ); TextLabel3->setText( i18n( "Chance" ) ); TextLabel3->setBackgroundColor( COL_STATUSFIELD ); LayoutB->addWidget( TextLabel3, row, 0 ); - TextLabel6 = new QLabel( this, "C" ); + TextLabel6 = new TQLabel( this, "C" ); setChance(0); TextLabel6->setAlignment(Qt::AlignRight); TextLabel6->setBackgroundColor( COL_STATUSFIELD ); @@ -120,7 +120,7 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl ) row++; - QSpacerItem *Spacer3=new QSpacerItem(0,8,QSizePolicy::Preferred,QSizePolicy::Preferred); + TQSpacerItem *Spacer3=new TQSpacerItem(0,8,TQSizePolicy::Preferred,TQSizePolicy::Preferred); LayoutB->addMultiCell( Spacer3, row, row,0,2 ); row++; @@ -129,31 +129,31 @@ ScoreWidget::ScoreWidget( QWidget* parent, const char* name, WFlags fl ) adjustSize(); } -void ScoreWidget::paintEvent( QPaintEvent * p) +void ScoreWidget::paintEvent( TQPaintEvent * p) { - QPainter paint( this ); + TQPainter paint( this ); paint.setClipRect(p->rect()); Paint( &paint, p->rect() ); } -void ScoreWidget::Paint(QPainter *p,QRect /*cliprect*/) +void ScoreWidget::Paint(TQPainter *p,TQRect /*cliprect*/) { - QPalette pal; - pal.setColor(QColorGroup::Light, COL_STATUSLIGHT); - pal.setColor(QColorGroup::Mid, COL_STATUSFIELD); - pal.setColor(QColorGroup::Dark, COL_STATUSDARK); + TQPalette pal; + pal.setColor(TQColorGroup::Light, COL_STATUSLIGHT); + pal.setColor(TQColorGroup::Mid, COL_STATUSFIELD); + pal.setColor(TQColorGroup::Dark, COL_STATUSDARK); setPalette(pal); drawFrame(p); } void ScoreWidget::setMove(int i) { - TextLabel5->setText( QString("%1").arg(i)); + TextLabel5->setText( TQString("%1").arg(i)); } void ScoreWidget::setLevel(int i) { - TextLabel4->setText( QString("%1").arg(i)); + TextLabel4->setText( TQString("%1").arg(i)); } void ScoreWidget::setChance(int i) @@ -165,10 +165,10 @@ void ScoreWidget::setChance(int i) else if (i<=-999) TextLabel6->setText(i18n("Loser")); else - TextLabel6->setText(QString("%1").arg(i)); + TextLabel6->setText(TQString("%1").arg(i)); } -void ScoreWidget::setPlayer(QString s,int no) +void ScoreWidget::setPlayer(TQString s,int no) { if (no==0) TextLabel7->setText(s); else TextLabel9->setText(s); |