summaryrefslogtreecommitdiffstats
path: root/src/cpupanel.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 09:59:06 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 09:59:06 -0500
commit24857cad8e92c27bc7d7377549ae887adbeccc58 (patch)
treee8aa2577506c17c68286ec1b65ae31b89ea0556b /src/cpupanel.cpp
parentea3a9effca9bebfe18bfb7546da619ecbbb121f3 (diff)
downloadksensors-24857cad8e92c27bc7d7377549ae887adbeccc58.tar.gz
ksensors-24857cad8e92c27bc7d7377549ae887adbeccc58.zip
Convert to TDE R14 API
Diffstat (limited to 'src/cpupanel.cpp')
-rw-r--r--src/cpupanel.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/cpupanel.cpp b/src/cpupanel.cpp
index 2eca1e5..74d9a9a 100644
--- a/src/cpupanel.cpp
+++ b/src/cpupanel.cpp
@@ -18,13 +18,13 @@
#include "cpupanel.h"
#include "qlcddraw.h"
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qlcdnumber.h>
+#include <ntqcolor.h>
+#include <ntqpainter.h>
+#include <ntqlcdnumber.h>
#include <string.h>
-bool getCpuInfoValue(const char *name,QString &value)
+bool getCpuInfoValue(const char *name,TQString &value)
{
char buffer[128];
char *ptr;
@@ -49,7 +49,7 @@ bool result;
return result;
}
-void adjustString(QString &str,int maxlen)
+void adjustString(TQString &str,int maxlen)
{
int i= str.find('(');
@@ -58,7 +58,7 @@ int i= str.find('(');
str= str.stripWhiteSpace();
}
-CpuPanel::CpuPanel(QWidget *parent, const char *name) : Panel(parent,name)
+CpuPanel::CpuPanel(TQWidget *parent, const char *name) : Panel(parent,name)
{
sCpu= "Unknown";
getCpuInfoValue("model name",sCpu);
@@ -72,22 +72,22 @@ CpuPanel::CpuPanel(QWidget *parent, const char *name) : Panel(parent,name)
getCpuInfoValue("bogomips",sBogomips);
sBogomips.sprintf("%.0f BMPS",sBogomips.toDouble());
- QString sSpeed= "0";
+ TQString sSpeed= "0";
getCpuInfoValue("cpu MHz",sSpeed);
sSpeed.sprintf("%.0f",sSpeed.toDouble());
- speed= new QLCDNumber(this);
+ speed= new TQLCDNumber(this);
speed->setGeometry(6,20,52,26);
speed->setNumDigits(sSpeed.length());
- speed->setSegmentStyle(QLCDNumber::Filled);
- speed->setFrameShape(QFrame::NoFrame);
+ speed->setSegmentStyle(TQLCDNumber::Filled);
+ speed->setFrameShape(TQFrame::NoFrame);
speed->display(sSpeed);
- QPalette cg= speed->palette();
- cg.setColor( QColorGroup::Foreground, QColor( 255, 0, 0) );
- cg.setColor( QColorGroup::Light, QColor( 255, 0, 0) );
- cg.setColor( QColorGroup::Midlight, QColor( 231, 232, 246) );
- cg.setColor( QColorGroup::Dark, QColor( 104, 105, 118) );
- cg.setColor( QColorGroup::Mid, QColor( 139, 140, 158) );
- cg.setColor( QColorGroup::Background, palette().active().background() );
+ TQPalette cg= speed->palette();
+ cg.setColor( TQColorGroup::Foreground, TQColor( 255, 0, 0) );
+ cg.setColor( TQColorGroup::Light, TQColor( 255, 0, 0) );
+ cg.setColor( TQColorGroup::Midlight, TQColor( 231, 232, 246) );
+ cg.setColor( TQColorGroup::Dark, TQColor( 104, 105, 118) );
+ cg.setColor( TQColorGroup::Mid, TQColor( 139, 140, 158) );
+ cg.setColor( TQColorGroup::Background, palette().active().background() );
speed->setPalette(cg);
speed->installEventFilter(this);
}
@@ -108,7 +108,7 @@ void CpuPanel::updateInfo()
update();
}
-void CpuPanel::drawContents(QPainter *p)
+void CpuPanel::drawContents(TQPainter *p)
{
int w= width();
int h= height();
@@ -116,20 +116,20 @@ void CpuPanel::drawContents(QPainter *p)
int i2= (h * 4) / 5;
int th= h-i2-h/11;
- QLcd::draw(p, 2,h/10,w-4,th,sCpu.latin1(),QLcd::alignJustify, &getColorTitle());
- QLcd::draw(p, 2,i2+1,w-4,th,sBogomips.latin1(),QLcd::alignCenter,&getColorTitle());
+ TQLcd::draw(p, 2,h/10,w-4,th,sCpu.latin1(),TQLcd::alignJustify, &getColorTitle());
+ TQLcd::draw(p, 2,i2+1,w-4,th,sBogomips.latin1(),TQLcd::alignCenter,&getColorTitle());
}
-void CpuPanel::paletteChange( const QPalette &oldPalette)
+void CpuPanel::paletteChange( const TQPalette &oldPalette)
{
-QPalette cg= speed->palette();
+TQPalette cg= speed->palette();
- cg.setColor(QColorGroup::Background,palette().active().background());
+ cg.setColor(TQColorGroup::Background,palette().active().background());
speed->setPalette(cg);
}
-void CpuPanel::resizeEvent ( QResizeEvent *e )
+void CpuPanel::resizeEvent ( TQResizeEvent *e )
{
int w= width();
int h= height();