summaryrefslogtreecommitdiffstats
path: root/kcpuload/kcpuload/statdock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcpuload/kcpuload/statdock.cpp')
-rw-r--r--kcpuload/kcpuload/statdock.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kcpuload/kcpuload/statdock.cpp b/kcpuload/kcpuload/statdock.cpp
index 53554c1..e28f15e 100644
--- a/kcpuload/kcpuload/statdock.cpp
+++ b/kcpuload/kcpuload/statdock.cpp
@@ -13,28 +13,28 @@
#include "statdock.h"
#include "statpopup.h"
-#include <qpainter.h>
+#include <tqpainter.h>
const int StatDock::fillLines = 0;
const int StatDock::fillBars = 1;
const int StatDock::fillShaded = 2;
-const QColor StatDock::colorGrid(120, 120, 120);
-const QColor StatDock::colorGridInactive(60, 60, 60);
-const QColor StatDock::colorLabel(255, 255, 255);
-const QColor StatDock::colorLabelInactive(125, 125, 125);
-const QColor StatDock::colorLower(255, 255, 255);
-const QColor StatDock::colorLowerInactive(125, 125, 125);
-const QColor StatDock::colorBlack(0, 0, 0);
+const TQColor StatDock::colorGrid(120, 120, 120);
+const TQColor StatDock::colorGridInactive(60, 60, 60);
+const TQColor StatDock::colorLabel(255, 255, 255);
+const TQColor StatDock::colorLabelInactive(125, 125, 125);
+const TQColor StatDock::colorLower(255, 255, 255);
+const TQColor StatDock::colorLowerInactive(125, 125, 125);
+const TQColor StatDock::colorBlack(0, 0, 0);
//#define DOCK_SIZE 24
#define DOCK_SIZE width()
#define DOCK_SCALE (((float) 105)/((float) (DOCK_SIZE-1)))
#define SOFT_STEP 3
-StatDock::StatDock(int whichDock, const QString& useLabel,
- StatPopup *parent, const char *name) :
- KSystemTray(parent,name),
+StatDock::StatDock(int whichDock, const TQString& useLabel,
+ StatPopup *tqparent, const char *name) :
+ KSystemTray(tqparent,name),
label(useLabel),
bufUpper(0),
bufLower(0),
@@ -48,7 +48,7 @@ StatDock::StatDock(int whichDock, const QString& useLabel,
bufUpper[i] = bufLower[i] = 0;
// Initialise the display.
- parent->initDock(this, contextMenu(), whichDock);
+ tqparent->initDock(this, contextMenu(), whichDock);
setBackgroundColor(colorBlack);
resize(DOCK_SIZE, DOCK_SIZE);
show();
@@ -59,7 +59,7 @@ StatDock::~StatDock() {
delete[] bufLower;
}
-void StatDock::resizeEvent ( QResizeEvent * )
+void StatDock::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
int* bufUpperOld;
@@ -78,54 +78,54 @@ void StatDock::resizeEvent ( QResizeEvent * )
delete[] bufUpperOld;
delete[] bufLowerOld;
- repaint();
+ tqrepaint();
}
void StatDock::setGrid(bool set) {
grid = set;
- repaint();
+ tqrepaint();
}
void StatDock::setActive(bool set) {
active = set;
- repaint();
+ tqrepaint();
}
void StatDock::setSoft(bool set) {
soft = set;
- repaint();
+ tqrepaint();
}
void StatDock::setSplit(bool set) {
split = set;
- repaint();
+ tqrepaint();
}
void StatDock::setLabelled(bool set) {
labelled = set;
- repaint();
+ tqrepaint();
}
-void StatDock::setLabel(const QString& set) {
+void StatDock::setLabel(const TQString& set) {
label = set;
- repaint();
+ tqrepaint();
}
void StatDock::setFill(int set) {
fill = set;
- repaint();
+ tqrepaint();
}
-void StatDock::setColor(const QColor& set) {
+void StatDock::setColor(const TQColor& set) {
colorUpper = set;
colorUpperInactive = colorUpper.dark();
- repaint();
+ tqrepaint();
}
void StatDock::clearHistory(void) {
for (i = 0; i < DOCK_SIZE; i++)
bufUpper[i] = bufLower[i] = 0;
- repaint();
+ tqrepaint();
}
void StatDock::addPercentReading(int upper, int lower) {
@@ -164,11 +164,11 @@ void StatDock::addPercentReading(int upper, int lower) {
}
// Refresh the diagram.
- repaint();
+ tqrepaint();
}
-void StatDock::paintEvent(QPaintEvent*) {
- QPainter p(this);
+void StatDock::paintEvent(TQPaintEvent*) {
+ TQPainter p(this);
// Start by drawing the grid.
if(grid) {
@@ -261,7 +261,7 @@ void StatDock::paintEvent(QPaintEvent*) {
// Finally label the diagrams.
if(labelled) {
- p.setFont(QFont( "Helvetica", ((8*DOCK_SIZE)/24) ));
+ p.setFont(TQFont( "Helvetica", ((8*DOCK_SIZE)/24) ));
p.setPen((active) ? colorLabel : colorLabelInactive);
p.drawText(rect(), AlignLeft | AlignTop, label);
}