summaryrefslogtreecommitdiffstats
path: root/superkaramba/src
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /superkaramba/src
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'superkaramba/src')
-rw-r--r--superkaramba/src/bar.cpp10
-rw-r--r--superkaramba/src/bar.h18
-rw-r--r--superkaramba/src/bar_python.cpp2
-rw-r--r--superkaramba/src/clickable.cpp8
-rw-r--r--superkaramba/src/clickable.h20
-rw-r--r--superkaramba/src/clickarea.cpp24
-rw-r--r--superkaramba/src/clickarea.h36
-rw-r--r--superkaramba/src/clickmap.cpp14
-rw-r--r--superkaramba/src/clickmap.h10
-rw-r--r--superkaramba/src/config_python.cpp30
-rw-r--r--superkaramba/src/cpusensor.cpp30
-rw-r--r--superkaramba/src/cpusensor.h8
-rw-r--r--superkaramba/src/datesensor.cpp38
-rw-r--r--superkaramba/src/datesensor.h12
-rw-r--r--superkaramba/src/dcopinterface.h14
-rw-r--r--superkaramba/src/disksensor.cpp102
-rw-r--r--superkaramba/src/disksensor.h26
-rw-r--r--superkaramba/src/graph.cpp6
-rw-r--r--superkaramba/src/graph.h8
-rw-r--r--superkaramba/src/graph_python.cpp2
-rw-r--r--superkaramba/src/imagelabel.cpp102
-rw-r--r--superkaramba/src/imagelabel.h52
-rw-r--r--superkaramba/src/imagelabel_python.cpp12
-rw-r--r--superkaramba/src/input.cpp50
-rw-r--r--superkaramba/src/input.h44
-rw-r--r--superkaramba/src/input_python.cpp28
-rw-r--r--superkaramba/src/karamba.cpp360
-rw-r--r--superkaramba/src/karamba.h130
-rw-r--r--superkaramba/src/karamba_python.cpp8
-rw-r--r--superkaramba/src/karamba_python.h8
-rw-r--r--superkaramba/src/karambaapp.cpp98
-rw-r--r--superkaramba/src/karambaapp.h20
-rw-r--r--superkaramba/src/karambainterface.cpp40
-rw-r--r--superkaramba/src/karambainterface.h16
-rw-r--r--superkaramba/src/karambalistboxitem.cpp2
-rw-r--r--superkaramba/src/karambalistboxitem.h8
-rw-r--r--superkaramba/src/karambarootpixmap.cpp2
-rw-r--r--superkaramba/src/karambarootpixmap.h6
-rw-r--r--superkaramba/src/karambasessionmanaged.cpp14
-rw-r--r--superkaramba/src/kwidgetlistbox.cpp36
-rw-r--r--superkaramba/src/kwidgetlistbox.h24
-rw-r--r--superkaramba/src/lineparser.cpp30
-rw-r--r--superkaramba/src/lineparser.h22
-rw-r--r--superkaramba/src/main.cpp12
-rw-r--r--superkaramba/src/memsensor.cpp66
-rw-r--r--superkaramba/src/memsensor.h12
-rw-r--r--superkaramba/src/menu_python.cpp16
-rw-r--r--superkaramba/src/meter.cpp6
-rw-r--r--superkaramba/src/meter.h44
-rw-r--r--superkaramba/src/meter_python.cpp72
-rw-r--r--superkaramba/src/meter_python.h38
-rw-r--r--superkaramba/src/misc_python.cpp70
-rw-r--r--superkaramba/src/networksensor.cpp24
-rw-r--r--superkaramba/src/networksensor.h12
-rw-r--r--superkaramba/src/noatunsensor.cpp56
-rw-r--r--superkaramba/src/noatunsensor.h14
-rw-r--r--superkaramba/src/programsensor.cpp30
-rw-r--r--superkaramba/src/programsensor.h16
-rw-r--r--superkaramba/src/richtextlabel.cpp42
-rw-r--r--superkaramba/src/richtextlabel.h44
-rw-r--r--superkaramba/src/richtextlabel_python.cpp4
-rw-r--r--superkaramba/src/rsssensor.cpp34
-rw-r--r--superkaramba/src/rsssensor.h14
-rw-r--r--superkaramba/src/sensor.cpp6
-rw-r--r--superkaramba/src/sensor.h16
-rw-r--r--superkaramba/src/sensorparams.cpp4
-rw-r--r--superkaramba/src/sensorparams.h10
-rw-r--r--superkaramba/src/sensorsensor.cpp30
-rw-r--r--superkaramba/src/sensorsensor.h18
-rw-r--r--superkaramba/src/showdesktop.cpp22
-rw-r--r--superkaramba/src/showdesktop.h2
-rw-r--r--superkaramba/src/sklineedit.cpp24
-rw-r--r--superkaramba/src/sklineedit.h28
-rw-r--r--superkaramba/src/sknewstuff.cpp20
-rw-r--r--superkaramba/src/sknewstuff.h6
-rw-r--r--superkaramba/src/svcgrp_python.cpp4
-rw-r--r--superkaramba/src/systemtray.cpp38
-rw-r--r--superkaramba/src/systemtray.h14
-rw-r--r--superkaramba/src/systray_python.cpp6
-rw-r--r--superkaramba/src/task_python.cpp2
-rw-r--r--superkaramba/src/taskbartest.cpp14
-rw-r--r--superkaramba/src/taskmanager.cpp94
-rw-r--r--superkaramba/src/taskmanager.h96
-rw-r--r--superkaramba/src/textfield.cpp28
-rw-r--r--superkaramba/src/textfield.h28
-rw-r--r--superkaramba/src/textfilesensor.cpp34
-rw-r--r--superkaramba/src/textfilesensor.h16
-rw-r--r--superkaramba/src/textlabel.cpp66
-rw-r--r--superkaramba/src/textlabel.h64
-rw-r--r--superkaramba/src/textlabel_python.cpp6
-rw-r--r--superkaramba/src/themefile.cpp86
-rw-r--r--superkaramba/src/themefile.h84
-rw-r--r--superkaramba/src/themelocale.cpp48
-rw-r--r--superkaramba/src/themelocale.h14
-rw-r--r--superkaramba/src/themesdlg.cpp144
-rw-r--r--superkaramba/src/themesdlg.h28
-rw-r--r--superkaramba/src/themewidget.cpp14
-rw-r--r--superkaramba/src/themewidget.h8
-rw-r--r--superkaramba/src/uptimesensor.cpp28
-rw-r--r--superkaramba/src/uptimesensor.h10
-rw-r--r--superkaramba/src/widget_python.cpp10
-rw-r--r--superkaramba/src/xmmssensor.cpp34
-rw-r--r--superkaramba/src/xmmssensor.h10
103 files changed, 1685 insertions, 1685 deletions
diff --git a/superkaramba/src/bar.cpp b/superkaramba/src/bar.cpp
index 354433d..a5405fe 100644
--- a/superkaramba/src/bar.cpp
+++ b/superkaramba/src/bar.cpp
@@ -24,14 +24,14 @@ Bar::~Bar()
{
}
-bool Bar::setImage(QString fileName)
+bool Bar::setImage(TQString fileName)
{
- QFileInfo fileInfo(fileName);
+ TQFileInfo fileInfo(fileName);
bool res = false;
if(m_karamba->theme().isThemeFile(fileName))
{
- QByteArray ba = m_karamba->theme().readThemeFile(fileName);
+ TQByteArray ba = m_karamba->theme().readThemeFile(fileName);
res = pixmap.loadFromData(ba);
}
else
@@ -85,7 +85,7 @@ void Bar::setValue( long v )
}
}
-void Bar::setValue(QString v)
+void Bar::setValue(TQString v)
{
setValue((long)(v.toDouble() + 0.5));
}
@@ -107,7 +107,7 @@ void Bar::setVertical(bool b)
vertical = b;
}
-void Bar::mUpdate(QPainter *p)
+void Bar::mUpdate(TQPainter *p)
{
int x, y, width, height;
x = getX();
diff --git a/superkaramba/src/bar.h b/superkaramba/src/bar.h
index d23ac3e..eb4b831 100644
--- a/superkaramba/src/bar.h
+++ b/superkaramba/src/bar.h
@@ -11,9 +11,9 @@
#define BAR_H
#include "meter.h"
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqpainter.h>
class Bar : public Meter
{
@@ -22,18 +22,18 @@ public:
Bar(karamba* k,int ix,int iy,int iw,int ih );
~Bar();
- void mUpdate( QPainter * );
+ void mUpdate( TQPainter * );
virtual void setMax( long m );
virtual void setMin( long m );
public slots:
- bool setImage( QString imagePath );
- QString getImage() { return imagePath; };
+ bool setImage( TQString imagePath );
+ TQString getImage() { return imagePath; };
void setValue( long );
long getValue() { return barValue; };
- void setValue( QString );
+ void setValue( TQString );
void recalculateValue() {setValue(barValue); };
void setVertical( bool );
@@ -48,8 +48,8 @@ private:
bool vertical; // vertical bar?
- QString imagePath;
- QPixmap pixmap;
+ TQString imagePath;
+ TQPixmap pixmap;
}
;
#endif // BAR_H
diff --git a/superkaramba/src/bar_python.cpp b/superkaramba/src/bar_python.cpp
index fa94f85..a789239 100644
--- a/superkaramba/src/bar_python.cpp
+++ b/superkaramba/src/bar_python.cpp
@@ -25,7 +25,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
diff --git a/superkaramba/src/clickable.cpp b/superkaramba/src/clickable.cpp
index ac3ae1b..794b7fe 100644
--- a/superkaramba/src/clickable.cpp
+++ b/superkaramba/src/clickable.cpp
@@ -13,25 +13,25 @@
Clickable::Clickable( int x, int y, int w, int h )
{
- boundingBox = QRect( x, y, w, h );
+ boundingBox = TQRect( x, y, w, h );
}
Clickable::~Clickable()
{}
/*
-void Clickable::setOnClick( QString oc )
+void Clickable::setOnClick( TQString oc )
{
onClick = oc;
}
-void Clickable::setOnMiddleClick( QString oc )
+void Clickable::setOnMiddleClick( TQString oc )
{
onMiddleClick = oc;
}
*/
-QRect Clickable::getBoundingBox()
+TQRect Clickable::getBoundingBox()
{
return boundingBox;
}
diff --git a/superkaramba/src/clickable.h b/superkaramba/src/clickable.h
index f549893..b8482fb 100644
--- a/superkaramba/src/clickable.h
+++ b/superkaramba/src/clickable.h
@@ -11,9 +11,9 @@
#ifndef CLICKABLE_H
#define CLICKABLE_H
-#include <qstring.h>
-#include <qrect.h>
-#include <qevent.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqevent.h>
/**
@@ -27,19 +27,19 @@ public:
virtual ~Clickable();
- virtual void click( QMouseEvent* ) = 0;
+ virtual void click( TQMouseEvent* ) = 0;
/*
- void setOnClick( QString );
- void setOnMiddleClick( QString );
+ void setOnClick( TQString );
+ void setOnMiddleClick( TQString );
*/
- virtual QRect getBoundingBox();
+ virtual TQRect getBoundingBox();
protected:
- QRect boundingBox;
+ TQRect boundingBox;
/*
- QString onClick;
- QString onMiddleClick;
+ TQString onClick;
+ TQString onMiddleClick;
*/
};
diff --git a/superkaramba/src/clickarea.cpp b/superkaramba/src/clickarea.cpp
index d060b4d..c2ca63e 100644
--- a/superkaramba/src/clickarea.cpp
+++ b/superkaramba/src/clickarea.cpp
@@ -18,18 +18,18 @@ ClickArea::ClickArea(karamba* k, int x, int y, int w, int h )
: Meter(k, x, y, w, h )
{
value = "";
- rect = QRect( x, y, w, h );
+ rect = TQRect( x, y, w, h );
}
ClickArea::~ClickArea()
{}
-bool ClickArea::click( QMouseEvent *e )
+bool ClickArea::click( TQMouseEvent *e )
{
if( rect.contains( e->x(), e->y() ) )
{
- //qDebug(QString::number(e->type()));
+ //qDebug(TQString::number(e->type()));
//KShellProcess ksp;
if( e->button() != Qt::LeftButton )
return false;
@@ -42,9 +42,9 @@ bool ClickArea::click( QMouseEvent *e )
}
else
{
- QString program;
+ TQString program;
program = onClick;
- program.replace( QRegExp("%v", false), value );
+ program.replace( TQRegExp("%v", false), value );
if( !program.isEmpty() )
{
@@ -56,30 +56,30 @@ bool ClickArea::click( QMouseEvent *e )
return false;
}
-void ClickArea::setOnClick( QString oc )
+void ClickArea::setOnClick( TQString oc )
{
onClick = oc;
}
-void ClickArea::setServiceOnClick( QString name , QString exec, QString icon )
+void ClickArea::setServiceOnClick( TQString name , TQString exec, TQString icon )
{
svc_name = name;
svc_onClick = exec;
svc_icon = icon;
}
-void ClickArea::setOnMiddleClick( QString oc )
+void ClickArea::setOnMiddleClick( TQString oc )
{
onMiddleClick = oc;
}
-QRect ClickArea::getRectangle()
+TQRect ClickArea::getRectangle()
{
return rect;
}
-void ClickArea::mUpdate( QPainter *p )
+void ClickArea::mUpdate( TQPainter *p )
{
p->drawRect(boundingBox);
@@ -90,12 +90,12 @@ void ClickArea::mUpdate( QPainter *p )
void ClickArea::setValue( long v)
{
- setValue( QString::number( v ) );
+ setValue( TQString::number( v ) );
}
-void ClickArea::setValue( QString v )
+void ClickArea::setValue( TQString v )
{
value = v;
}
diff --git a/superkaramba/src/clickarea.h b/superkaramba/src/clickarea.h
index 80625ee..6719794 100644
--- a/superkaramba/src/clickarea.h
+++ b/superkaramba/src/clickarea.h
@@ -22,10 +22,10 @@
#ifndef CLICKAREA_H
#define CLICKAREA_H
-#include <qstring.h>
-#include <qrect.h>
-#include <qevent.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqevent.h>
+#include <tqregexp.h>
#include <kprocess.h>
#include <kprocio.h>
@@ -45,25 +45,25 @@ public:
~ClickArea();
- virtual bool click( QMouseEvent* );
- void setOnClick( QString );
- void setServiceOnClick( QString , QString, QString);
- void setOnMiddleClick( QString );
+ virtual bool click( TQMouseEvent* );
+ void setOnClick( TQString );
+ void setServiceOnClick( TQString , TQString, TQString);
+ void setOnMiddleClick( TQString );
- QRect getRectangle();
+ TQRect getRectangle();
- void mUpdate( QPainter* );
+ void mUpdate( TQPainter* );
void setValue( long );
- void setValue( QString );
+ void setValue( TQString );
- QRect rect;
- QString onClick;
- QString svc_onClick;
- QString svc_name;
- QString svc_icon;
- QString onMiddleClick;
- QString value;
+ TQRect rect;
+ TQString onClick;
+ TQString svc_onClick;
+ TQString svc_name;
+ TQString svc_icon;
+ TQString onMiddleClick;
+ TQString value;
};
#endif
diff --git a/superkaramba/src/clickmap.cpp b/superkaramba/src/clickmap.cpp
index 62b4376..2189916 100644
--- a/superkaramba/src/clickmap.cpp
+++ b/superkaramba/src/clickmap.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "clickmap.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <krun.h>
ClickMap::ClickMap(karamba* k, int x, int y, int w, int h )
@@ -38,14 +38,14 @@ void ClickMap::setTextProps( TextField *t )
text = *t;
}
-bool ClickMap::click( QMouseEvent *e ) {
+bool ClickMap::click( TQMouseEvent *e ) {
//Don't load the web page if the click isn't for us
if (boundingBox.contains(e->x(), e->y())) {
int index = ((e -> y() - getY()) / text.getLineHeight()) + 1;
if (index >= 1 && index <= (int)displays.count()) {
- // qDebug( "You clicked item " + QString::number( index ) + ", " +
+ // qDebug( "You clicked item " + TQString::number( index ) + ", " +
// displays[index - 1] + " " + links[index - 1] );
KRun::runCommand("konqueror " + links[index - 1]);
}
@@ -53,13 +53,13 @@ bool ClickMap::click( QMouseEvent *e ) {
return false;
}
-void ClickMap::mUpdate( QPainter *p )
+void ClickMap::mUpdate( TQPainter *p )
{
int i = 0; //text.getLineHeight();
int row = 1;
p->setFont(text.getFont());
- QStringList::Iterator it = displays.begin();
+ TQStringList::Iterator it = displays.begin();
while( it != displays.end() && (row <= getHeight() || getHeight() == -1 ) )
{
p->setPen( text.getColor() );
@@ -71,9 +71,9 @@ void ClickMap::mUpdate( QPainter *p )
}
}
-void ClickMap::setValue( QString v )
+void ClickMap::setValue( TQString v )
{
- QRegExp rx("^http://", false );
+ TQRegExp rx("^http://", false );
if ( rx.search( v ) == -1 )
{
displays.append( v );
diff --git a/superkaramba/src/clickmap.h b/superkaramba/src/clickmap.h
index f6df0db..ee802f7 100644
--- a/superkaramba/src/clickmap.h
+++ b/superkaramba/src/clickmap.h
@@ -27,17 +27,17 @@ public:
ClickMap(karamba* k, int x, int y, int w, int h);
~ClickMap();
- virtual bool click( QMouseEvent* );
- void mUpdate( QPainter* );
- void setValue( QString );
+ virtual bool click( TQMouseEvent* );
+ void mUpdate( TQPainter* );
+ void setValue( TQString );
void setValue( long );
void setTextProps( TextField * );
private:
TextField text;
- QStringList links;
- QStringList displays;
+ TQStringList links;
+ TQStringList displays;
};
#endif
diff --git a/superkaramba/src/config_python.cpp b/superkaramba/src/config_python.cpp
index 28d5364..1a094eb 100644
--- a/superkaramba/src/config_python.cpp
+++ b/superkaramba/src/config_python.cpp
@@ -27,14 +27,14 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
#include "config_python.h"
// API-Function addMenuConfigOption
-long addMenuConfigOption(long widget, QString key, QString name)
+long addMenuConfigOption(long widget, TQString key, TQString name)
{
karamba* currTheme = (karamba*)widget;
@@ -54,14 +54,14 @@ PyObject* py_add_menu_config_option(PyObject *, PyObject *args)
if (!checkKaramba(widget))
return NULL;
- QString k, n;
+ TQString k, n;
k.setAscii(key);
- n = PyString2QString(name);
+ n = PyString2TQString(name);
return Py_BuildValue((char*)"l", addMenuConfigOption(widget, k, n));
}
-long setMenuConfigOption(long widget, QString key, bool value)
+long setMenuConfigOption(long widget, TQString key, bool value)
{
karamba* currTheme = (karamba*)widget;
@@ -79,13 +79,13 @@ PyObject* py_set_menu_config_option(PyObject *, PyObject *args)
if (!checkKaramba(widget))
return NULL;
- QString k;
+ TQString k;
k.setAscii(key);
return Py_BuildValue((char*)"l", setMenuConfigOption(widget, k, (bool)value));
}
-long readMenuConfigOption(long widget, QString key)
+long readMenuConfigOption(long widget, TQString key)
{
karamba* currTheme = (karamba*)widget;
@@ -102,14 +102,14 @@ PyObject* py_read_menu_config_option(PyObject *, PyObject *args)
if (!checkKaramba(widget))
return NULL;
- QString k;
+ TQString k;
k.setAscii(key);
return Py_BuildValue((char*)"l", readMenuConfigOption(widget, k));
}
// API-Function writeConfigEntry
-long writeConfigEntry(long widget, QString key, QString value)
+long writeConfigEntry(long widget, TQString key, TQString value)
{
karamba* currTheme = (karamba*)widget;
@@ -129,7 +129,7 @@ PyObject* py_write_config_entry(PyObject *, PyObject *args)
return NULL;
if (!checkKaramba(widget))
return NULL;
- QString k, v;
+ TQString k, v;
k.setAscii(key);
v.setAscii(value);
@@ -137,7 +137,7 @@ PyObject* py_write_config_entry(PyObject *, PyObject *args)
}
// API-Function readConfigEntry
-QVariant readConfigEntry(long widget, QString key)
+TQVariant readConfigEntry(long widget, TQString key)
{
karamba* currTheme = (karamba*)widget;
@@ -153,11 +153,11 @@ PyObject* py_read_config_entry(PyObject *, PyObject *args)
return NULL;
if (!checkKaramba(widget))
return NULL;
- QString k;
+ TQString k;
k.setAscii(key);
- QVariant entry = readConfigEntry(widget, k);
- QString type;
+ TQVariant entry = readConfigEntry(widget, k);
+ TQString type;
type.setAscii(entry.typeName());
if (type == "Bool")
@@ -172,7 +172,7 @@ PyObject* py_read_config_entry(PyObject *, PyObject *args)
return Py_BuildValue((char*)"l", i);
}
- if (type == "QString")
+ if (type == "TQString")
{
return Py_BuildValue((char*)"s", entry.toString().ascii());
}
diff --git a/superkaramba/src/cpusensor.cpp b/superkaramba/src/cpusensor.cpp
index bc4b095..1cf9a06 100644
--- a/superkaramba/src/cpusensor.cpp
+++ b/superkaramba/src/cpusensor.cpp
@@ -8,7 +8,7 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef __FreeBSD__
#include <sys/time.h>
@@ -26,11 +26,11 @@
#include "cpusensor.h"
-CPUSensor::CPUSensor( QString cpu, int interval ) :
+CPUSensor::CPUSensor( TQString cpu, int interval ) :
Sensor(interval), userTicks(0), sysTicks(0), niceTicks(0), idleTicks(0)
{
cpuNbr = cpu;
- QRegExp rx("^\\d+$");
+ TQRegExp rx("^\\d+$");
if( rx.search( cpu.lower() ) == -1)
cpuNbr = "";
cpuNbr = "cpu"+cpuNbr;
@@ -69,12 +69,12 @@ void CPUSensor::getTicks (long &u,long &s,long &n,long &i)
i = cp_time[CP_IDLE];
}
#else
- QFile file("/proc/stat");
- QString line;
+ TQFile file("/proc/stat");
+ TQString line;
if ( file.open(IO_ReadOnly | IO_Translate) )
{
- QTextStream t( &file ); // use a text stream
- QRegExp rx( cpuNbr+"\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)");
+ TQTextStream t( &file ); // use a text stream
+ TQRegExp rx( cpuNbr+"\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)");
line = t.readLine();
rx.search( line );
while( (line = t.readLine()) !=0 && rx.cap(0) == "" )
@@ -131,10 +131,10 @@ void CPUSensor::update()
{
SensorParams *sp;
Meter *meter;
- QString format;
+ TQString format;
int load = getCPULoad();
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while (it != 0)
{
sp = (SensorParams*)(*it);
@@ -145,12 +145,12 @@ void CPUSensor::update()
{
format = "%v";
}
- format.replace( QRegExp("%load", false), QString::number( load ) );
- format.replace( QRegExp("%user", false), QString::number( user ) );
- format.replace( QRegExp("%nice", false), QString::number( nice ) );
- format.replace( QRegExp("%idle", false), QString::number( idle ) );
- format.replace( QRegExp("%system", false), QString::number( system ) );
- format.replace( QRegExp("%v", false), QString::number( load ) );
+ format.replace( TQRegExp("%load", false), TQString::number( load ) );
+ format.replace( TQRegExp("%user", false), TQString::number( user ) );
+ format.replace( TQRegExp("%nice", false), TQString::number( nice ) );
+ format.replace( TQRegExp("%idle", false), TQString::number( idle ) );
+ format.replace( TQRegExp("%system", false), TQString::number( system ) );
+ format.replace( TQRegExp("%v", false), TQString::number( load ) );
meter->setValue( format );
++it;
diff --git a/superkaramba/src/cpusensor.h b/superkaramba/src/cpusensor.h
index 5b857f6..ce9840b 100644
--- a/superkaramba/src/cpusensor.h
+++ b/superkaramba/src/cpusensor.h
@@ -11,14 +11,14 @@
#define CPUSENSOR_H
#include "sensor.h"
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
class CPUSensor : public Sensor
{
Q_OBJECT
public:
- CPUSensor( QString cpuNbr, int interval );
+ CPUSensor( TQString cpuNbr, int interval );
~CPUSensor();
void update();
void setMaxValue( SensorParams *sp );
@@ -37,7 +37,7 @@ private:
int idle;
void getTicks (long &u,long &s,long &n,long &i);
- QString cpuNbr;
+ TQString cpuNbr;
};
diff --git a/superkaramba/src/datesensor.cpp b/superkaramba/src/datesensor.cpp
index 186f552..6ca4e20 100644
--- a/superkaramba/src/datesensor.cpp
+++ b/superkaramba/src/datesensor.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "datesensor.h"
-#include <qapplication.h>
+#include <tqapplication.h>
DateSensor::DateSensor( int interval ) : Sensor( interval )
{
hidden = true;
@@ -20,12 +20,12 @@ DateSensor::~DateSensor()
void DateSensor::update()
{
- QDateTime qdt = QDateTime::currentDateTime();
- QString format;
+ TQDateTime qdt = TQDateTime::currentDateTime();
+ TQString format;
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while (it != 0)
{
sp = (SensorParams*)(*it);
@@ -48,11 +48,11 @@ void DateSensor::slotCalendarDeleted()
}
-DatePicker::DatePicker(QWidget *parent)
- : QVBox( parent, 0, WType_TopLevel | WDestructiveClose |
+DatePicker::DatePicker(TQWidget *parent)
+ : TQVBox( parent, 0, WType_TopLevel | WDestructiveClose |
WStyle_Customize | WStyle_StaysOnTop | WStyle_NoBorder )
{
- setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
+ setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised );
//KWin::setOnAllDesktops( handle(), true );
picker = new KDatePicker(this);
picker->setCloseButton(true);
@@ -62,24 +62,24 @@ DatePicker::DatePicker(QWidget *parent)
//setIcon(SmallIcon("date"));
}
-void DatePicker::keyReleaseEvent(QKeyEvent *e)
+void DatePicker::keyReleaseEvent(TQKeyEvent *e)
{
- QVBox::keyReleaseEvent(e);
+ TQVBox::keyReleaseEvent(e);
if (e->key() == Qt::Key_Escape)
close();
}
-void DateSensor::toggleCalendar(QMouseEvent *ev)
+void DateSensor::toggleCalendar(TQMouseEvent *ev)
{
- QObjectListIt it(*objList);
+ TQObjectListIt it(*objList);
while (it != 0)
{
SensorParams *sp = (SensorParams*)(*it);
Meter *meter = sp->getMeter();
- QString width = sp->getParam("CALWIDTH");
- QString height = sp->getParam("CALHEIGHT");
+ TQString width = sp->getParam("CALWIDTH");
+ TQString height = sp->getParam("CALHEIGHT");
- QRect rect(meter->getX(),meter->getY(),width.toInt(), height.toInt());
+ TQRect rect(meter->getX(),meter->getY(),width.toInt(), height.toInt());
if (rect.contains( ev->x(), ev->y() ))
{
if (hidden)
@@ -87,14 +87,14 @@ void DateSensor::toggleCalendar(QMouseEvent *ev)
hidden = false;
cal = new DatePicker(0);
- connect(cal, SIGNAL(destroyed()), SLOT(slotCalendarDeleted()));
- QPoint c = (QPoint(ev->x(), ev->y()));
+ connect(cal, TQT_SIGNAL(destroyed()), TQT_SLOT(slotCalendarDeleted()));
+ TQPoint c = (TQPoint(ev->x(), ev->y()));
int w = cal->sizeHint().width();
int h = cal->sizeHint().height();
// make calendar fully visible
- QRect deskR = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(c));
+ TQRect deskR = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(c));
if (c.y()+h > deskR.bottom()) c.setY(deskR.bottom()-h-1);
@@ -113,11 +113,11 @@ void DateSensor::toggleCalendar(QMouseEvent *ev)
}
}
-void DateSensor::mousePressEvent(QMouseEvent *ev)
+void DateSensor::mousePressEvent(TQMouseEvent *ev)
{
switch (ev->button())
{
- case QMouseEvent::LeftButton:
+ case TQMouseEvent::LeftButton:
toggleCalendar(ev);
break;
default:
diff --git a/superkaramba/src/datesensor.h b/superkaramba/src/datesensor.h
index 75db6e0..a761d6b 100644
--- a/superkaramba/src/datesensor.h
+++ b/superkaramba/src/datesensor.h
@@ -11,17 +11,17 @@
#define DATESENSOR_H
#include "sensor.h"
#include "sensorparams.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdatepicker.h>
-#include <qvbox.h>
+#include <tqvbox.h>
class DatePicker : public QVBox
{
public:
- DatePicker(QWidget*);
+ DatePicker(TQWidget*);
private:
KDatePicker *picker;
- void keyReleaseEvent(QKeyEvent *e);
+ void keyReleaseEvent(TQKeyEvent *e);
};
class DateSensor : public Sensor
@@ -31,8 +31,8 @@ public:
DateSensor( int interval );
~DateSensor();
- void toggleCalendar(QMouseEvent *ev);
- void mousePressEvent(QMouseEvent *ev);
+ void toggleCalendar(TQMouseEvent *ev);
+ void mousePressEvent(TQMouseEvent *ev);
void update();
protected slots:
diff --git a/superkaramba/src/dcopinterface.h b/superkaramba/src/dcopinterface.h
index 665187d..256c9e2 100644
--- a/superkaramba/src/dcopinterface.h
+++ b/superkaramba/src/dcopinterface.h
@@ -19,17 +19,17 @@ class dcopIface : virtual public DCOPObject
public:
k_dcop:
- virtual ASYNC openTheme(QString file) = 0;
- virtual ASYNC openNamedTheme(QString file, QString name, bool is_sub_theme) = 0;
- virtual ASYNC closeTheme(QString name) = 0;
+ virtual ASYNC openTheme(TQString file) = 0;
+ virtual ASYNC openNamedTheme(TQString file, TQString name, bool is_sub_theme) = 0;
+ virtual ASYNC closeTheme(TQString name) = 0;
virtual ASYNC quit() = 0;
virtual ASYNC hideSystemTray(bool hide) = 0;
virtual ASYNC showThemeDialog() = 0;
- virtual int themeAdded(QString appId, QString file) = 0;
- virtual ASYNC themeClosed(QString appId, QString file, int instance) = 0;
- virtual ASYNC themeNotify(QString name, QString text) = 0;
- virtual ASYNC setIncomingData(QString name, QString obj) = 0;
+ virtual int themeAdded(TQString appId, TQString file) = 0;
+ virtual ASYNC themeClosed(TQString appId, TQString file, int instance) = 0;
+ virtual ASYNC themeNotify(TQString name, TQString text) = 0;
+ virtual ASYNC setIncomingData(TQString name, TQString obj) = 0;
virtual bool isMainKaramba() = 0;
};
diff --git a/superkaramba/src/disksensor.cpp b/superkaramba/src/disksensor.cpp
index b8b9b96..b53c6e3 100644
--- a/superkaramba/src/disksensor.cpp
+++ b/superkaramba/src/disksensor.cpp
@@ -9,19 +9,19 @@
***************************************************************************/
#include "disksensor.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <kprocess.h>
#include <kprocio.h>
DiskSensor::DiskSensor( int msec ) : Sensor( msec )
{
- connect(&ksp, SIGNAL(receivedStdout(KProcess *, char *, int )),
- this,SLOT(receivedStdout(KProcess *, char *, int )));
- connect(&ksp, SIGNAL(processExited(KProcess *)),
- this,SLOT(processExited( KProcess * )));
+ connect(&ksp, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
+ this,TQT_SLOT(receivedStdout(KProcess *, char *, int )));
+ connect(&ksp, TQT_SIGNAL(processExited(KProcess *)),
+ this,TQT_SLOT(processExited( KProcess * )));
// update values on startup
ksp.clearArguments();
@@ -32,38 +32,38 @@ DiskSensor::DiskSensor( int msec ) : Sensor( msec )
DiskSensor::~DiskSensor()
{}
-long DiskSensor::getFreeSpace(QString mntPt) const
+long DiskSensor::getFreeSpace(TQString mntPt) const
{
- QRegExp rx( "^\\S*\\s*\\d+\\s+\\d+\\s+(\\d+)");
+ TQRegExp rx( "^\\S*\\s*\\d+\\s+\\d+\\s+(\\d+)");
rx.search(mntMap[mntPt]);
return rx.cap(1).toLong();
}
-long DiskSensor::getUsedSpace(QString mntPt) const
+long DiskSensor::getUsedSpace(TQString mntPt) const
{
- QRegExp rx( "^\\S*\\s*\\d+\\s+(\\d+)\\s+\\d+");
+ TQRegExp rx( "^\\S*\\s*\\d+\\s+(\\d+)\\s+\\d+");
rx.search(mntMap[mntPt]);
return rx.cap(1).toLong();
}
-long DiskSensor::getTotalSpace(QString mntPt) const
+long DiskSensor::getTotalSpace(TQString mntPt) const
{
- QRegExp rx( "^\\S*\\s*(\\d+)\\s+\\d+\\s+\\d+");
+ TQRegExp rx( "^\\S*\\s*(\\d+)\\s+\\d+\\s+\\d+");
rx.search(mntMap[mntPt]);
return rx.cap(1).toLong();
}
-int DiskSensor::getPercentUsed(QString mntPt) const
+int DiskSensor::getPercentUsed(TQString mntPt) const
{
- QRegExp rx( "\\s+(\\d+)%\\s+");
+ TQRegExp rx( "\\s+(\\d+)%\\s+");
rx.search(mntMap[mntPt]);
return rx.cap(1).toInt();
}
-int DiskSensor::getPercentFree(QString mntPt) const
+int DiskSensor::getPercentFree(TQString mntPt) const
{
return ( 100 - getPercentUsed( mntPt ) );
}
@@ -72,17 +72,17 @@ void DiskSensor::receivedStdout(KProcess *, char *buffer, int len )
{
buffer[len] = 0;
- sensorResult += QString( QCString(buffer) );
+ sensorResult += TQString( TQCString(buffer) );
}
void DiskSensor::processExited(KProcess *)
{
- QStringList stringList = QStringList::split('\n',sensorResult);
+ TQStringList stringList = TQStringList::split('\n',sensorResult);
sensorResult = "";
- QStringList::Iterator it = stringList.begin();
- //QRegExp rx( "^(/dev/).*(/\\S*)$");
- QRegExp rx( ".*\\s+(/\\S*)$");
+ TQStringList::Iterator it = stringList.begin();
+ //TQRegExp rx( "^(/dev/).*(/\\S*)$");
+ TQRegExp rx( ".*\\s+(/\\S*)$");
while( it != stringList.end())
{
@@ -95,12 +95,12 @@ void DiskSensor::processExited(KProcess *)
}
stringList.clear();
- QString format;
- QString mntPt;
+ TQString format;
+ TQString mntPt;
SensorParams *sp;
Meter *meter;
- QObjectListIt lit( *objList );
+ TQObjectListIt lit( *objList );
while (lit != 0)
{
sp = (SensorParams*)(*lit);
@@ -114,31 +114,31 @@ void DiskSensor::processExited(KProcess *)
{
format = "%u";
}
- format.replace( QRegExp("%fp", false),QString::number(getPercentFree(mntPt)));
- format.replace( QRegExp("%fg",false),
- QString::number(getFreeSpace(mntPt)/(1024*1024)));
- format.replace( QRegExp("%fkb",false),
- QString::number(getFreeSpace(mntPt)*8) );
- format.replace( QRegExp("%fk",false),
- QString::number(getFreeSpace(mntPt)) );
- format.replace( QRegExp("%f", false),QString::number(getFreeSpace(mntPt)/1024));
+ format.replace( TQRegExp("%fp", false),TQString::number(getPercentFree(mntPt)));
+ format.replace( TQRegExp("%fg",false),
+ TQString::number(getFreeSpace(mntPt)/(1024*1024)));
+ format.replace( TQRegExp("%fkb",false),
+ TQString::number(getFreeSpace(mntPt)*8) );
+ format.replace( TQRegExp("%fk",false),
+ TQString::number(getFreeSpace(mntPt)) );
+ format.replace( TQRegExp("%f", false),TQString::number(getFreeSpace(mntPt)/1024));
- format.replace( QRegExp("%up", false),QString::number(getPercentUsed(mntPt)));
- format.replace( QRegExp("%ug",false),
- QString::number(getUsedSpace(mntPt)/(1024*1024)));
- format.replace( QRegExp("%ukb",false),
- QString::number(getUsedSpace(mntPt)*8) );
- format.replace( QRegExp("%uk",false),
- QString::number(getUsedSpace(mntPt)) );
- format.replace( QRegExp("%u", false),QString::number(getUsedSpace(mntPt)/1024));
-
- format.replace( QRegExp("%tg",false),
- QString::number(getTotalSpace(mntPt)/(1024*1024)));
- format.replace( QRegExp("%tkb",false),
- QString::number(getTotalSpace(mntPt)*8));
- format.replace( QRegExp("%tk",false),
- QString::number(getTotalSpace(mntPt)));
- format.replace( QRegExp("%t", false),QString::number(getTotalSpace(mntPt)/1024));
+ format.replace( TQRegExp("%up", false),TQString::number(getPercentUsed(mntPt)));
+ format.replace( TQRegExp("%ug",false),
+ TQString::number(getUsedSpace(mntPt)/(1024*1024)));
+ format.replace( TQRegExp("%ukb",false),
+ TQString::number(getUsedSpace(mntPt)*8) );
+ format.replace( TQRegExp("%uk",false),
+ TQString::number(getUsedSpace(mntPt)) );
+ format.replace( TQRegExp("%u", false),TQString::number(getUsedSpace(mntPt)/1024));
+
+ format.replace( TQRegExp("%tg",false),
+ TQString::number(getTotalSpace(mntPt)/(1024*1024)));
+ format.replace( TQRegExp("%tkb",false),
+ TQString::number(getTotalSpace(mntPt)*8));
+ format.replace( TQRegExp("%tk",false),
+ TQString::number(getTotalSpace(mntPt)));
+ format.replace( TQRegExp("%t", false),TQString::number(getTotalSpace(mntPt)/1024));
meter->setValue(format);
++lit;
}
@@ -160,9 +160,9 @@ void DiskSensor::setMaxValue( SensorParams *sp )
{
Meter *meter;
meter = sp->getMeter();
- const QString mntPt = sp->getParam( "MOUNTPOINT" );
+ const TQString mntPt = sp->getParam( "MOUNTPOINT" );
- QString f;
+ TQString f;
f = sp->getParam("FORMAT");
if( f == "%fp" || f == "%up" )
meter->setMax( 100 );
diff --git a/superkaramba/src/disksensor.h b/superkaramba/src/disksensor.h
index e35b9d8..d42c9ef 100644
--- a/superkaramba/src/disksensor.h
+++ b/superkaramba/src/disksensor.h
@@ -10,11 +10,11 @@
#ifndef DISKSENSOR_H
#define DISKSENSOR_H
#include "sensor.h"
-#include <qmap.h>
-#include <qstring.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kprocess.h>
class DiskSensor : public Sensor
{
@@ -26,17 +26,17 @@ public:
void setMaxValue( SensorParams *sp );
private:
- long getFreeSpace(QString mntPt) const;
- long getUsedSpace(QString mntPt) const;
- long getTotalSpace(QString mntPt) const;
- int getPercentUsed(QString mntPt) const;
- int getPercentFree(QString mntPt) const;
+ long getFreeSpace(TQString mntPt) const;
+ long getUsedSpace(TQString mntPt) const;
+ long getTotalSpace(TQString mntPt) const;
+ int getPercentUsed(TQString mntPt) const;
+ int getPercentFree(TQString mntPt) const;
KShellProcess ksp;
- QString sensorResult;
+ TQString sensorResult;
- QMap<QString,QString> mntMap;
- QStringList stringList;
+ TQMap<TQString,TQString> mntMap;
+ TQStringList stringList;
int init;
diff --git a/superkaramba/src/graph.cpp b/superkaramba/src/graph.cpp
index c028aea..d485829 100644
--- a/superkaramba/src/graph.cpp
+++ b/superkaramba/src/graph.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "graph.h"
-#include <qstring.h>
+#include <tqstring.h>
Graph::Graph(karamba* k, int x, int y, int w, int h, int nbrPts):
Meter(k, x, y, w, h), lastValue(0)
@@ -46,12 +46,12 @@ void Graph::setValue( long v)
ptPtr = (ptPtr + 1) % nbrPoints;
}
-void Graph::setValue( QString v )
+void Graph::setValue( TQString v )
{
setValue((long)(v.toDouble() + 0.5));
}
-void Graph::mUpdate(QPainter *p)
+void Graph::mUpdate(TQPainter *p)
{
if (hidden == 0)
{
diff --git a/superkaramba/src/graph.h b/superkaramba/src/graph.h
index 626b569..a2c164f 100644
--- a/superkaramba/src/graph.h
+++ b/superkaramba/src/graph.h
@@ -12,8 +12,8 @@
#define GRAPH_H
#include "meter.h"
-#include <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
class Graph : public Meter
{
@@ -26,8 +26,8 @@ public:
void setValue( long );
long getValue() { return lastValue; };
- void setValue( QString );
- void mUpdate( QPainter * );
+ void setValue( TQString );
+ void mUpdate( TQPainter * );
private:
int lastValue;
diff --git a/superkaramba/src/graph_python.cpp b/superkaramba/src/graph_python.cpp
index 1ef6e73..0183085 100644
--- a/superkaramba/src/graph_python.cpp
+++ b/superkaramba/src/graph_python.cpp
@@ -25,7 +25,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
diff --git a/superkaramba/src/imagelabel.cpp b/superkaramba/src/imagelabel.cpp
index 9959e8b..ef38ec0 100644
--- a/superkaramba/src/imagelabel.cpp
+++ b/superkaramba/src/imagelabel.cpp
@@ -21,9 +21,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
****************************************************************************/
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kpixmapeffect.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -39,7 +39,7 @@ Effect::Effect(ImageLabel* img, int msec) :
if (msec > 0)
{
// remove the effect after the given time
- //QTimer::singleShot (millisec, myImage, SLOT(slotEffectExpired()));
+ //TQTimer::singleShot (millisec, myImage, TQT_SLOT(slotEffectExpired()));
//timer -> changeInterval(millisec);
millisec = msec;
}
@@ -57,7 +57,7 @@ void Effect::startTimer()
{
if (millisec > 0)
{
- QTimer::singleShot (millisec, myImage, SLOT(slotEffectExpired()));
+ TQTimer::singleShot (millisec, myImage, TQT_SLOT(slotEffectExpired()));
millisec = 0;
}
}
@@ -77,7 +77,7 @@ KPixmap Intensity::apply(KPixmap pixmap)
}
// ChannelIntensity
-ChannelIntensity::ChannelIntensity(ImageLabel* img, float r, QString c,
+ChannelIntensity::ChannelIntensity(ImageLabel* img, float r, TQString c,
int millisec) :
Effect(img, millisec)
{
@@ -151,13 +151,13 @@ ImageLabel::~ImageLabel()
}
if(!old_tip_rect.isNull())
{
- QToolTip::remove(m_karamba, old_tip_rect);
+ TQToolTip::remove(m_karamba, old_tip_rect);
}
}
void ImageLabel::setValue(long v)
{
- setValue( QString::number( v ) );
+ setValue( TQString::number( v ) );
}
void ImageLabel::show()
@@ -227,7 +227,7 @@ void ImageLabel::applyTransformations(bool useSmoothScale)
if (doRotate)
{
// KDE and QT seem to miss a high quality image rotation
- QWMatrix rotMat;
+ TQWMatrix rotMat;
rotMat.rotate(rot_angle);
pixmap = pixmap.xForm(rotMat);
}
@@ -242,7 +242,7 @@ void ImageLabel::applyTransformations(bool useSmoothScale)
{
double widthFactor = ((double)scale_w) / ((double)pixmap.width());
double heightFactor = ((double)scale_h) / ((double)pixmap.height());
- QWMatrix scaleMat;
+ TQWMatrix scaleMat;
scaleMat.scale(widthFactor, heightFactor);
pixmap = pixmap.xForm(scaleMat);
}
@@ -257,7 +257,7 @@ void ImageLabel::applyTransformations(bool useSmoothScale)
void ImageLabel::slotCopyResult(KIO::Job* job)
{
- QString tempFile = ((KIO::FileCopyJob*)job)->destURL().path();
+ TQString tempFile = ((KIO::FileCopyJob*)job)->destURL().path();
if(job->error() == 0)
{
setValue(tempFile);
@@ -272,30 +272,30 @@ void ImageLabel::slotCopyResult(KIO::Job* job)
KIO::NetAccess::removeTempFile(tempFile);
}
-void ImageLabel::setValue(QString fn)
+void ImageLabel::setValue(TQString fn)
{
// use the first line
- QStringList sList = QStringList::split( "\n", fn );
- QString fileName = *sList.begin();
+ TQStringList sList = TQStringList::split( "\n", fn );
+ TQString fileName = *sList.begin();
KURL url(fileName);
- QRegExp rx("^[a-zA-Z]{1,5}:/",false);
+ TQRegExp rx("^[a-zA-Z]{1,5}:/",false);
bool protocol = (rx.search(fileName)!=-1)?true:false;
- QPixmap pm;
+ TQPixmap pm;
if(protocol && url.isLocalFile() == false)
{
KTempFile tmpFile;
KIO::FileCopyJob* copy = KIO::file_copy(fileName, tmpFile.name(), 0600,
true, false, false);
- connect(copy, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotCopyResult(KIO::Job*)));
+ connect(copy, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotCopyResult(KIO::Job*)));
return;
}
else
{
if(m_karamba->theme().isThemeFile(fileName))
{
- QByteArray ba = m_karamba->theme().readThemeFile(fileName);
+ TQByteArray ba = m_karamba->theme().readThemeFile(fileName);
pm.loadFromData(ba);
}
else
@@ -309,9 +309,9 @@ void ImageLabel::setValue(QString fn)
//Matthew Kay: a new version of setValue to be used by createTaskIcon()
/**
- * set the internal pixmap of this image to the given QPixmap pix
+ * set the internal pixmap of this image to the given TQPixmap pix
*/
-void ImageLabel::setValue(QPixmap& pix)
+void ImageLabel::setValue(TQPixmap& pix)
{
realpixmap = KPixmap(pix);
pixmap = realpixmap;
@@ -320,10 +320,10 @@ void ImageLabel::setValue(QPixmap& pix)
pixmapWidth = pixmap.width();
pixmapHeight = pixmap.height();
- rect_off = QRect(getX(),getY(),pixmapWidth,pixmapHeight);
+ rect_off = TQRect(getX(),getY(),pixmapWidth,pixmapHeight);
}
-void ImageLabel::mUpdate(QPainter* p, int backgroundUpdate)
+void ImageLabel::mUpdate(TQPainter* p, int backgroundUpdate)
{
if (backgroundUpdate == 1)
{
@@ -337,9 +337,9 @@ void ImageLabel::mUpdate(QPainter* p, int backgroundUpdate)
{
//Blend this image with a color
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
- QImage result = KImageEffect::blend(QColor(255,0,0), image, 0.5f);
+ TQImage result = KImageEffect::blend(TQColor(255,0,0), image, 0.5f);
p->drawImage(getX(),getY(),result);
//p->drawRect(boundingBox);
@@ -353,7 +353,7 @@ void ImageLabel::mUpdate(QPainter* p, int backgroundUpdate)
}
}
-void ImageLabel::mUpdate(QPainter* p)
+void ImageLabel::mUpdate(TQPainter* p)
{
//only draw image if not hidden
if (hidden == 0 && background == 0)
@@ -367,9 +367,9 @@ void ImageLabel::mUpdate(QPainter* p)
{
//Blend this image with a color
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
- QImage result = KImageEffect::blend(QColor(255,0,0), image, 0.5f);
+ TQImage result = KImageEffect::blend(TQColor(255,0,0), image, 0.5f);
p->drawImage(getX(),getY(),result);
//p->drawRect(boundingBox);
@@ -382,11 +382,11 @@ void ImageLabel::mUpdate(QPainter* p)
}
}
-bool ImageLabel::click(QMouseEvent* e)
+bool ImageLabel::click(TQMouseEvent* e)
{
if (getBoundingBox().contains(e -> x(), e -> y()) && isEnabled())
{
- QString program;
+ TQString program;
if (e -> button() == Qt::LeftButton)
{
program = leftButtonAction;
@@ -412,7 +412,7 @@ bool ImageLabel::click(QMouseEvent* e)
return false;
}
-void ImageLabel::parseImages(QString fn, QString fn_roll, int _xoff,
+void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff,
int _yoff, int _xon, int _yon)
{
//fn = filename;
@@ -424,12 +424,12 @@ void ImageLabel::parseImages(QString fn, QString fn_roll, int _xoff,
yon = _yon;
// use the first line
- QStringList sList = QStringList::split( "\n", fn );
- QString fileName = *sList.begin();
- QFileInfo fileInfo( fileName );
- QString path;
+ TQStringList sList = TQStringList::split( "\n", fn );
+ TQString fileName = *sList.begin();
+ TQFileInfo fileInfo( fileName );
+ TQString path;
- QRegExp rx("^http://",false);
+ TQRegExp rx("^http://",false);
bool fileOnNet = (rx.search(fileName)!=-1)?true:false;
@@ -444,7 +444,7 @@ void ImageLabel::parseImages(QString fn, QString fn_roll, int _xoff,
if ( fileOnNet )
{
- QString tmpFile;
+ TQString tmpFile;
#if defined(KDE_3_2)
if(KIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow()))
#else
@@ -468,15 +468,15 @@ void ImageLabel::parseImages(QString fn, QString fn_roll, int _xoff,
pixmapOffWidth = pixmap.width();
pixmapOffHeight = pixmap.height();
- rect_off = QRect(xoff,yoff,pixmapWidth,pixmapHeight);
+ rect_off = TQRect(xoff,yoff,pixmapWidth,pixmapHeight);
/////////////////////////////
if (fn_roll.isEmpty())
return;
rollover=true;
- sList = QStringList::split( "\n", fn_roll );
+ sList = TQStringList::split( "\n", fn_roll );
fileName = *sList.begin();
- fileInfo = QFileInfo( fileName );
+ fileInfo = TQFileInfo( fileName );
fileOnNet = (rx.search(fileName)!=-1)?true:false;
@@ -492,7 +492,7 @@ void ImageLabel::parseImages(QString fn, QString fn_roll, int _xoff,
if ( fileOnNet )
{
- QString tmpFile;
+ TQString tmpFile;
#if defined(KDE_3_2)
if(KIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow()))
#else
@@ -515,7 +515,7 @@ void ImageLabel::parseImages(QString fn, QString fn_roll, int _xoff,
pixmapOnWidth = pixmap_on.width();
pixmapOnHeight = pixmap_on.height();
- rect_on = QRect(xon,yon,pixmapOnWidth,pixmapOnHeight);
+ rect_on = TQRect(xon,yon,pixmapOnWidth,pixmapOnHeight);
}
void ImageLabel::setBackground(int b)
@@ -523,7 +523,7 @@ void ImageLabel::setBackground(int b)
background = b;
}
-void ImageLabel::rolloverImage(QMouseEvent *e)
+void ImageLabel::rolloverImage(TQMouseEvent *e)
{
if (!rollover)
return;
@@ -560,11 +560,11 @@ void ImageLabel::rolloverImage(QMouseEvent *e)
}
}
-void ImageLabel::setTooltip(QString txt)
+void ImageLabel::setTooltip(TQString txt)
{
- QRect rect(getX(),getY(),pixmapWidth,pixmapHeight);
- QToolTip::add(m_karamba, rect, txt);
- old_tip_rect = QRect(rect.topLeft(), rect.bottomRight());
+ TQRect rect(getX(),getY(),pixmapWidth,pixmapHeight);
+ TQToolTip::add(m_karamba, rect, txt);
+ old_tip_rect = TQRect(rect.topLeft(), rect.bottomRight());
}
@@ -590,7 +590,7 @@ void ImageLabel::intensity(float ratio, int millisec)
applyTransformations();
}
-void ImageLabel::channelIntensity(float ratio, QString channel, int millisec)
+void ImageLabel::channelIntensity(float ratio, TQString channel, int millisec)
{
if (imageEffect != 0)
{
@@ -620,9 +620,9 @@ void ImageLabel::slotEffectExpired()
m_karamba -> externalStep();
}
-void ImageLabel::attachClickArea(QString leftMouseButton,
- QString middleMouseButton,
- QString rightMouseButton)
+void ImageLabel::attachClickArea(TQString leftMouseButton,
+ TQString middleMouseButton,
+ TQString rightMouseButton)
{
leftButtonAction = leftMouseButton;
middleButtonAction = middleMouseButton;
diff --git a/superkaramba/src/imagelabel.h b/superkaramba/src/imagelabel.h
index ff2a7ec..ebe417d 100644
--- a/superkaramba/src/imagelabel.h
+++ b/superkaramba/src/imagelabel.h
@@ -26,15 +26,15 @@
#include "meter.h"
#include <kpixmap.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include "karamba.h"
class ImageLabel;
@@ -78,7 +78,7 @@ private:
class ChannelIntensity : public Effect
{
public:
- ChannelIntensity(ImageLabel*, float r, QString c, int millisec);
+ ChannelIntensity(ImageLabel*, float r, TQString c, int millisec);
KPixmap apply(KPixmap pixmap);
@@ -105,38 +105,38 @@ public:
ImageLabel(karamba* k, int ix,int iy,int iw,int ih );
ImageLabel(karamba* k);
~ImageLabel();
- void setValue( QString imagePath );
+ void setValue( TQString imagePath );
void setValue( long );
- void setValue( QPixmap& );
- QString getStringValue() { return imagePath; };
+ void setValue( TQPixmap& );
+ TQString getStringValue() { return imagePath; };
void scale( int, int );
void smoothScale( int, int );
void rotate(int);
void removeImageTransformations();
- void mUpdate( QPainter * );
- void mUpdate( QPainter *, int );
+ void mUpdate( TQPainter * );
+ void mUpdate( TQPainter *, int );
- void rolloverImage(QMouseEvent *e);
- void parseImages( QString fn, QString fn_roll, int, int, int, int );
+ void rolloverImage(TQMouseEvent *e);
+ void parseImages( TQString fn, TQString fn_roll, int, int, int, int );
virtual void show();
virtual void hide();
- void setTooltip(QString txt);
+ void setTooltip(TQString txt);
int cblend;
int background;
// Pixmap Effects
void removeEffects();
void intensity(float ratio, int millisec);
- void channelIntensity(float ratio, QString channel, int millisec);
+ void channelIntensity(float ratio, TQString channel, int millisec);
void toGray(int millisec);
void setBackground(int b);
- void attachClickArea(QString leftMouseButton, QString middleMouseButton,
- QString rightMouseButton);
+ void attachClickArea(TQString leftMouseButton, TQString middleMouseButton,
+ TQString rightMouseButton);
- virtual bool click(QMouseEvent*);
+ virtual bool click(TQMouseEvent*);
private slots:
@@ -165,27 +165,27 @@ private:
Effect* imageEffect;
// Scale Matrix
- //QWMatrix scaleMat;
+ //TQWMatrix scaleMat;
int scale_w;
int scale_h;
// Rotation Matrix
- //QWMatrix rotMat;
+ //TQWMatrix rotMat;
int rot_angle;
KPixmap pixmap;
KPixmap realpixmap;
- QRect rect_off, rect_on;
- QRect old_tip_rect;
+ TQRect rect_off, rect_on;
+ TQRect old_tip_rect;
bool zoomed;
- //QString fn, fn_roll;
+ //TQString fn, fn_roll;
bool rollover;
KPixmap pixmap_off;
KPixmap pixmap_on;
int xoff,xon;
int yoff,yon;
- QString imagePath;
+ TQString imagePath;
};
#endif // IMAGELABEL_H
diff --git a/superkaramba/src/imagelabel_python.cpp b/superkaramba/src/imagelabel_python.cpp
index 6564ce5..7cf6d73 100644
--- a/superkaramba/src/imagelabel_python.cpp
+++ b/superkaramba/src/imagelabel_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "imagelabel.h"
#include "meter_python.h"
@@ -37,8 +37,8 @@
ImageLabel* createImageLabel(karamba *theme, long x, long y,
char* path, bool bg)
{
- QString file;
- //QString fakefile;
+ TQString file;
+ //TQString fakefile;
/*tmp->setThemePath(theme->themePath);*/
//FIXME: This is an ugly hack to ensure a unique reference
@@ -124,8 +124,8 @@ PyObject* py_createTaskIcon(PyObject *, PyObject *args)
qWarning("Task not found.");
return (long)NULL ;
}
- //retrieve the QPixmap that represents this image
- QPixmap iconPixmap = KWin::icon(currTask->window());
+ //retrieve the TQPixmap that represents this image
+ TQPixmap iconPixmap = KWin::icon(currTask->window());
ImageLabel *tmp = createImageLabel((karamba*)widget, x, y, 0, 0);
tmp->setValue(iconPixmap);
@@ -326,6 +326,6 @@ PyObject* py_addImageTooltip(PyObject *, PyObject *args)
return NULL;
if (!checkKarambaAndMeter(widget, meter, "ImageLabel"))
return NULL;
- ((ImageLabel*)meter)->setTooltip(PyString2QString(t));
+ ((ImageLabel*)meter)->setTooltip(PyString2TQString(t));
return Py_BuildValue((char*)"l", 1);
}
diff --git a/superkaramba/src/input.cpp b/superkaramba/src/input.cpp
index a917488..eae8780 100644
--- a/superkaramba/src/input.cpp
+++ b/superkaramba/src/input.cpp
@@ -24,7 +24,7 @@
Input::Input(karamba* k, int x, int y, int w, int h):
Meter(k, x, y, w, h)
{
- edit = new SKLineEdit((QWidget*)k, this);
+ edit = new SKLineEdit((TQWidget*)k, this);
edit->setGeometry(x,y,w,h);
}
@@ -33,38 +33,38 @@ Input::~Input()
delete edit;
}
-void Input::mUpdate(QPainter*)
+void Input::mUpdate(TQPainter*)
{
edit->repaint();
}
-void Input::setValue(QString text)
+void Input::setValue(TQString text)
{
edit->setText(text);
}
-QString Input::getStringValue() const
+TQString Input::getStringValue() const
{
return edit->text();
}
-void Input::setBGColor(QColor c)
+void Input::setBGColor(TQColor c)
{
edit->setBackgroundColor(c);
}
-void Input::setColor(QColor c)
+void Input::setColor(TQColor c)
{
Meter::setColor(c);
edit->setFrameColor(c);
}
-QColor Input::getBGColor() const
+TQColor Input::getBGColor() const
{
return edit->backgroundColor();
}
-QColor Input::getColor() const
+TQColor Input::getColor() const
{
return edit->getFrameColor();
}
@@ -111,53 +111,53 @@ void Input::setHeight(int ih)
edit->setGeometry(getX(), getY(), getWidth(), ih);
}
-void Input::setFont(QString f)
+void Input::setFont(TQString f)
{
font.setFamily(f);
edit->setFont(font);
}
-QString Input::getFont() const
+TQString Input::getFont() const
{
return font.family();
}
-void Input::setFontColor(QColor fontColor)
+void Input::setFontColor(TQColor fontColor)
{
- QPalette palette = edit->palette();
- palette.setColor(QColorGroup::Text, fontColor);
+ TQPalette palette = edit->palette();
+ palette.setColor(TQColorGroup::Text, fontColor);
edit->setPalette(palette);
}
-QColor Input::getFontColor() const
+TQColor Input::getFontColor() const
{
- const QColorGroup &color = edit->colorGroup();
+ const TQColorGroup &color = edit->colorGroup();
return color.text();
}
-void Input::setSelectionColor(QColor selectionColor)
+void Input::setSelectionColor(TQColor selectionColor)
{
- QPalette palette = edit->palette();
- palette.setColor(QColorGroup::Highlight, selectionColor);
+ TQPalette palette = edit->palette();
+ palette.setColor(TQColorGroup::Highlight, selectionColor);
edit->setPalette(palette);
}
-QColor Input::getSelectionColor() const
+TQColor Input::getSelectionColor() const
{
- const QColorGroup &color = edit->colorGroup();
+ const TQColorGroup &color = edit->colorGroup();
return color.highlight();
}
-void Input::setSelectedTextColor(QColor selectedTextColor)
+void Input::setSelectedTextColor(TQColor selectedTextColor)
{
- QPalette palette = edit->palette();
- palette.setColor(QColorGroup::HighlightedText, selectedTextColor);
+ TQPalette palette = edit->palette();
+ palette.setColor(TQColorGroup::HighlightedText, selectedTextColor);
edit->setPalette(palette);
}
-QColor Input::getSelectedTextColor() const
+TQColor Input::getSelectedTextColor() const
{
- const QColorGroup &color = edit->colorGroup();
+ const TQColorGroup &color = edit->colorGroup();
return color.highlightedText();
}
diff --git a/superkaramba/src/input.h b/superkaramba/src/input.h
index 15c16e0..0c9ad71 100644
--- a/superkaramba/src/input.h
+++ b/superkaramba/src/input.h
@@ -24,12 +24,12 @@
#include <meter.h>
#include <sklineedit.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qlineedit.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qfont.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqlineedit.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqfont.h>
#include "textfield.h"
@@ -42,21 +42,21 @@ public:
~Input();
- void mUpdate(QPainter *p);
+ void mUpdate(TQPainter *p);
- void setValue(QString text);
- QString getStringValue() const;
+ void setValue(TQString text);
+ TQString getStringValue() const;
- void setBGColor(QColor c);
- QColor getBGColor() const;
- void setColor(QColor c);
- QColor getColor() const;
- void setFontColor(QColor fontColor);
- QColor getFontColor() const;
- void setSelectionColor(QColor selectionColor);
- QColor getSelectionColor() const;
- void setSelectedTextColor(QColor selectedTextColor);
- QColor getSelectedTextColor() const;
+ void setBGColor(TQColor c);
+ TQColor getBGColor() const;
+ void setColor(TQColor c);
+ TQColor getColor() const;
+ void setFontColor(TQColor fontColor);
+ TQColor getFontColor() const;
+ void setSelectionColor(TQColor selectionColor);
+ TQColor getSelectionColor() const;
+ void setSelectedTextColor(TQColor selectedTextColor);
+ TQColor getSelectedTextColor() const;
void setTextProps(TextField*);
void hide();
@@ -68,8 +68,8 @@ public:
void setWidth(int iw);
void setHeight(int ih);
- void setFont(QString f);
- QString getFont() const;
+ void setFont(TQString f);
+ TQString getFont() const;
void setFontSize(int size);
int getFontSize() const;
@@ -78,7 +78,7 @@ public:
private:
SKLineEdit *edit;
- QFont font;
+ TQFont font;
};
#endif
diff --git a/superkaramba/src/input_python.cpp b/superkaramba/src/input_python.cpp
index 0bf45e1..fc1d9ad 100644
--- a/superkaramba/src/input_python.cpp
+++ b/superkaramba/src/input_python.cpp
@@ -28,7 +28,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
@@ -45,7 +45,7 @@ PyObject* py_createInputBox(PyObject *, PyObject *args)
return NULL;
Input *tmp = new Input((karamba*)widget, (int)x, (int)y, (int)w, (int)h);
- tmp->setValue(PyString2QString(text));
+ tmp->setValue(PyString2TQString(text));
tmp->setTextProps(((karamba*)widget)->getDefaultTextProps());
((karamba*)widget)->meterList->append(tmp);
tmp->show();
@@ -153,7 +153,7 @@ PyObject* py_setInputBoxFontColor(PyObject *, PyObject *args)
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- ((Input*)inputBox)->setFontColor(QColor(r, g, b));
+ ((Input*)inputBox)->setFontColor(TQColor(r, g, b));
return Py_BuildValue((char*)"l", 1);
}
@@ -166,7 +166,7 @@ PyObject* py_getInputBoxFontColor(PyObject *, PyObject *args)
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- QColor color = ((Input*)inputBox)->getFontColor();
+ TQColor color = ((Input*)inputBox)->getFontColor();
return Py_BuildValue((char*)"(i,i,i)", color.red(), color.green(), color.blue());
}
@@ -180,7 +180,7 @@ PyObject* py_setInputBoxSelectionColor(PyObject *, PyObject *args)
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- ((Input*)inputBox)->setSelectionColor(QColor(r, g, b));
+ ((Input*)inputBox)->setSelectionColor(TQColor(r, g, b));
return Py_BuildValue((char*)"l", 1);
}
@@ -193,7 +193,7 @@ PyObject* py_getInputBoxSelectionColor(PyObject *, PyObject *args)
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- QColor color = ((Input*)inputBox)->getSelectionColor();
+ TQColor color = ((Input*)inputBox)->getSelectionColor();
return Py_BuildValue((char*)"(i,i,i)", color.red(), color.green(), color.blue());
}
@@ -207,7 +207,7 @@ PyObject* py_setInputBoxBGColor(PyObject *, PyObject *args)
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- ((Input*)inputBox)->setBGColor(QColor(r, g, b));
+ ((Input*)inputBox)->setBGColor(TQColor(r, g, b));
return Py_BuildValue((char*)"l", 1);
}
@@ -220,7 +220,7 @@ if (!PyArg_ParseTuple(args, (char*)"ll:getInputBoxBackgroundColor", &widget, &in
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- QColor color = ((Input*)inputBox)->getBGColor();
+ TQColor color = ((Input*)inputBox)->getBGColor();
return Py_BuildValue((char*)"(i,i,i)", color.red(), color.green(), color.blue());
}
@@ -234,7 +234,7 @@ if (!PyArg_ParseTuple(args, (char*)"lllll:changeInputBoxFrameColor", &widget, &i
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- ((Input*)inputBox)->setColor(QColor(r, g, b));
+ ((Input*)inputBox)->setColor(TQColor(r, g, b));
return Py_BuildValue((char*)"l", 1);
}
@@ -247,7 +247,7 @@ if (!PyArg_ParseTuple(args, (char*)"ll:getInputBoxFrameColor", &widget, &inputBo
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- QColor color = ((Input*)inputBox)->getColor();
+ TQColor color = ((Input*)inputBox)->getColor();
return Py_BuildValue((char*)"(i,i,i)", color.red(), color.green(), color.blue());
}
@@ -261,7 +261,7 @@ if (!PyArg_ParseTuple(args, (char*)"lllll:changeInputBoxSelectedTextColor", &wid
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- ((Input*)inputBox)->setSelectedTextColor(QColor(r, g, b));
+ ((Input*)inputBox)->setSelectedTextColor(TQColor(r, g, b));
return Py_BuildValue((char*)"l", 1);
}
@@ -274,7 +274,7 @@ if (!PyArg_ParseTuple(args, (char*)"ll:getInputBoxSelectedTextColor", &widget, &
if (!checkKarambaAndMeter(widget, inputBox, "Input"))
return NULL;
- QColor color = ((Input*)inputBox)->getSelectedTextColor();
+ TQColor color = ((Input*)inputBox)->getSelectedTextColor();
return Py_BuildValue((char*)"(i,i,i)", color.red(), color.green(), color.blue());
}
@@ -346,9 +346,9 @@ PyObject* py_getInputFocus(PyObject *, PyObject *args)
// FocusWidget() returns the currently focused line edit,
// but unfortunately we need an 'Input' object here.
//
- QWidget *obj = ((karamba*)widget)->focusWidget();
+ TQWidget *obj = ((karamba*)widget)->focusWidget();
- if(obj->isA("QLineEdit")) // SKLineEdit is no Q_Object, but QLineEdit can only be here as a SKLineEdit
+ if(obj->isA("TQLineEdit")) // SKLineEdit is no Q_Object, but TQLineEdit can only be here as a SKLineEdit
return Py_BuildValue((char*)"l", ((SKLineEdit*)obj)->getInput());
return Py_BuildValue((char*)"l", 0);
diff --git a/superkaramba/src/karamba.cpp b/superkaramba/src/karamba.cpp
index b112af0..fb90a45 100644
--- a/superkaramba/src/karamba.cpp
+++ b/superkaramba/src/karamba.cpp
@@ -42,16 +42,16 @@
#include <kparts/componentfactory.h>
#include <kparts/part.h>
-#include <qdir.h>
-#include <qwidgetlist.h>
+#include <tqdir.h>
+#include <tqwidgetlist.h>
// Menu IDs
#define EDITSCRIPT 1
#define THEMECONF 2
-karamba::karamba(QString fn, QString name, bool reloading, int instance,
+karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
bool sub_theme):
- QWidget(0,"karamba", Qt::WGroupLeader | WStyle_Customize |
+ TQWidget(0,"karamba", Qt::WGroupLeader | WStyle_Customize |
WRepaintNoErase| WStyle_NoBorder | WDestructiveClose ),
meterList(0), imageList(0), clickList(0), kpop(0), widgetMask(0),
config(0), kWinModule(0), tempUnit('C'), m_instance(instance),
@@ -77,7 +77,7 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
if(!m_theme.set(url))
{
setFixedSize(0, 0);
- QTimer::singleShot(100, this, SLOT(killWidget()));
+ TQTimer::singleShot(100, this, TQT_SLOT(killWidget()));
return;
}
// Add self to list of open themes
@@ -85,23 +85,23 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
karambaApp->addKaramba(this, reloading);
if(prettyName.isEmpty())
- prettyName = QString("%1 - %2").arg(m_theme.name()).arg(m_instance);
+ prettyName = TQString("%1 - %2").arg(m_theme.name()).arg(m_instance);
kdDebug() << "Starting theme: " << m_theme.name()
<< " pretty name: " << prettyName << endl;
- QString qName = "karamba - " + prettyName;
+ TQString qName = "karamba - " + prettyName;
setName(qName.ascii());
KDirWatch *dirWatch = KDirWatch::self();
- connect(dirWatch, SIGNAL( dirty( const QString & ) ),
- SLOT( slotFileChanged( const QString & ) ) );
+ connect(dirWatch, TQT_SIGNAL( dirty( const TQString & ) ),
+ TQT_SLOT( slotFileChanged( const TQString & ) ) );
if(!dirWatch->contains(m_theme.file()))
dirWatch->addFile(m_theme.file());
if(!m_theme.isZipTheme() && m_theme.pythonModuleExists())
{
- QString pythonFile = m_theme.path() + "/" + m_theme.pythonModule() + ".py";
+ TQString pythonFile = m_theme.path() + "/" + m_theme.pythonModule() + ".py";
if(!dirWatch->contains(pythonFile))
dirWatch->addFile(pythonFile);
}
@@ -109,15 +109,15 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
widgetUpdate = true;
// Creates KConfig Object
- QString instanceString;
+ TQString instanceString;
if(m_instance > 1)
- instanceString = QString("-%1").arg(m_instance);
- QString cfg = QDir::home().absPath() + "/.superkaramba/"
+ instanceString = TQString("-%1").arg(m_instance);
+ TQString cfg = TQDir::home().absPath() + "/.superkaramba/"
+ m_theme.id() + instanceString + ".rc";
kdDebug() << cfg << endl;
- QFile themeConfigFile(cfg);
+ TQFile themeConfigFile(cfg);
// Tests if config file Exists
- if (!QFileInfo(themeConfigFile).exists())
+ if (!TQFileInfo(themeConfigFile).exists())
{
// Create config file
themeConfigFile.open(IO_ReadWrite);
@@ -132,7 +132,7 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
if(m_theme.pythonModuleExists())
{
kdDebug() << "Loading python module: " << m_theme.pythonModule() << endl;
- QTimer::singleShot(0, this, SLOT(initPythonInterface()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initPythonInterface()));
}
widgetMask = 0;
@@ -142,22 +142,22 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
kWinModule = new KWinModule();
desktop = 0;
- connect( kWinModule,SIGNAL(currentDesktopChanged(int)), this,
- SLOT(currentDesktopChanged(int)) );
- connect( kapp, SIGNAL(backgroundChanged(int)), this,
- SLOT(currentWallpaperChanged(int)));
+ connect( kWinModule,TQT_SIGNAL(currentDesktopChanged(int)), this,
+ TQT_SLOT(currentDesktopChanged(int)) );
+ connect( kapp, TQT_SIGNAL(backgroundChanged(int)), this,
+ TQT_SLOT(currentWallpaperChanged(int)));
// Setup of the Task Manager Callbacks
- connect(&taskManager, SIGNAL(activeTaskChanged(Task*)), this,
- SLOT(activeTaskChanged(Task*)) );
- connect(&taskManager, SIGNAL(taskAdded(Task*)), this,
- SLOT(taskAdded(Task*)) );
- connect(&taskManager, SIGNAL(taskRemoved(Task*)), this,
- SLOT(taskRemoved(Task*)) );
- connect(&taskManager, SIGNAL(startupAdded(Startup*)), this,
- SLOT(startupAdded(Startup*)) );
- connect(&taskManager, SIGNAL(startupRemoved(Startup*)), this,
- SLOT(startupRemoved(Startup*)) );
+ connect(&taskManager, TQT_SIGNAL(activeTaskChanged(Task*)), this,
+ TQT_SLOT(activeTaskChanged(Task*)) );
+ connect(&taskManager, TQT_SIGNAL(taskAdded(Task*)), this,
+ TQT_SLOT(taskAdded(Task*)) );
+ connect(&taskManager, TQT_SIGNAL(taskRemoved(Task*)), this,
+ TQT_SLOT(taskRemoved(Task*)) );
+ connect(&taskManager, TQT_SIGNAL(startupAdded(Startup*)), this,
+ TQT_SLOT(startupAdded(Startup*)) );
+ connect(&taskManager, TQT_SIGNAL(startupRemoved(Startup*)), this,
+ TQT_SLOT(startupRemoved(Startup*)) );
themeConfMenu = new KPopupMenu( this);
themeConfMenu -> setCheckable(true);
@@ -171,17 +171,17 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
toDesktopMenu -> setCheckable(true);
mid = toDesktopMenu -> insertItem (i18n("&All Desktops"),
dslot = new DesktopChangeSlot(this,0),
- SLOT(receive()));
+ TQT_SLOT(receive()));
dslot->setMenuId(mid);
toDesktopMenu -> insertSeparator();
for (int ndesktop=1; ndesktop <= kWinModule->numberOfDesktops(); ndesktop++)
{
- QString name = i18n("Desktop &");
+ TQString name = i18n("Desktop &");
name += ('0' + ndesktop);
mid = toDesktopMenu -> insertItem (name,
- dslot = new DesktopChangeSlot(this, ndesktop), SLOT(receive()));
+ dslot = new DesktopChangeSlot(this, ndesktop), TQT_SLOT(receive()));
dslot->setMenuId(mid);
}
@@ -193,11 +193,11 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
menuAccColl = new KActionCollection( this );
kpop->insertItem( SmallIconSet("reload"),i18n("Update"), this,
- SLOT(updateSensors()), Key_F5 );
+ TQT_SLOT(updateSensors()), Key_F5 );
toggleLocked = new KToggleAction ( i18n("Toggle &Locked Position"),
SmallIconSet("locked"),
CTRL+Key_L, this,
- SLOT( slotToggleLocked() ),
+ TQT_SLOT( slotToggleLocked() ),
accColl, "Locked position" );
accColl->insert(toggleLocked);
toggleLocked -> setChecked(true);
@@ -206,7 +206,7 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
toggleFastTransforms = new KToggleAction(i18n("Use &Fast Image Scaling"),
CTRL+Key_F, this,
- SLOT( slotToggleFastTransforms() ),
+ TQT_SLOT( slotToggleFastTransforms() ),
accColl, "Fast transformations");
accColl->insert(toggleFastTransforms);
@@ -221,9 +221,9 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
kpop->insertItem(i18n("To Des&ktop"), toDesktopMenu);
kpop->insertItem( SmallIconSet("reload3"),i18n("&Reload Theme"),this,
- SLOT(reloadConfig()), CTRL+Key_R );
+ TQT_SLOT(reloadConfig()), CTRL+Key_R );
kpop->insertItem( SmallIconSet("fileclose"),i18n("&Close This Theme"), this,
- SLOT(killWidget()), CTRL+Key_C );
+ TQT_SLOT(killWidget()), CTRL+Key_C );
if(!SuperKarambaSettings::showSysTray())
showMenuExtension();
@@ -239,14 +239,14 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
fixedPosition = false;
defaultTextField = new TextField();
- meterList = new QObjectList();
+ meterList = new TQObjectList();
meterList->setAutoDelete( true );
- sensorList = new QObjectList();
+ sensorList = new TQObjectList();
sensorList->setAutoDelete( true );
- clickList = new QObjectList();
- timeList = new QObjectList();
- imageList = new QObjectList();
- menuList = new QObjectList();
+ clickList = new TQObjectList();
+ timeList = new TQObjectList();
+ imageList = new TQObjectList();
+ menuList = new TQObjectList();
menuList->setAutoDelete( true );
client = kapp->dcopClient();
@@ -262,12 +262,12 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
if( !parseConfig() )
{
setFixedSize(0,0);
- QTimer::singleShot( 100, this, SLOT(killWidget()) );
+ TQTimer::singleShot( 100, this, TQT_SLOT(killWidget()) );
qWarning("Could not read config file.");
}
else
{
- kroot = new KarambaRootPixmap((QWidget*)this);
+ kroot = new KarambaRootPixmap((TQWidget*)this);
kroot->start();
}
@@ -314,7 +314,7 @@ karamba::karamba(QString fn, QString name, bool reloading, int instance,
this->setMouseTracking(true);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
}
karamba::~karamba()
@@ -378,14 +378,14 @@ bool karamba::parseConfig()
if(m_theme.open())
{
- QValueStack<QPoint> offsetStack;
+ TQValueStack<TQPoint> offsetStack;
LineParser lineParser;
int x=0;
int y=0;
int w=0;
int h=0;
- offsetStack.push(QPoint(0,0));
+ offsetStack.push(TQPoint(0,0));
while(m_theme.nextLine(lineParser))
{
@@ -412,7 +412,7 @@ bool karamba::parseConfig()
if(lineParser.getBoolean("RIGHT"))
{
- QDesktopWidget *d = QApplication::desktop();
+ TQDesktopWidget *d = TQApplication::desktop();
x = d->width() - w;
}
else if(lineParser.getBoolean("LEFT"))
@@ -422,7 +422,7 @@ bool karamba::parseConfig()
if(lineParser.getBoolean("BOTTOM"))
{
- QDesktopWidget *d = QApplication::desktop();
+ TQDesktopWidget *d = TQApplication::desktop();
y = d->height() - h;
}
else if(lineParser.getBoolean("TOP"))
@@ -431,7 +431,7 @@ bool karamba::parseConfig()
}
move(x,y);
- //pm = QPixmap(size());
+ //pm = TQPixmap(size());
if(lineParser.getBoolean("ONTOP"))
{
@@ -480,7 +480,7 @@ bool karamba::parseConfig()
if(lineParser.getBoolean("BOTTOMBAR"))
{
- int dh = QApplication::desktop()->height();
+ int dh = TQApplication::desktop()->height();
move( x, dh - h );
KWin::setStrut( winId(), 0, 0, 0, h );
toggleLocked->setChecked( true );
@@ -490,7 +490,7 @@ bool karamba::parseConfig()
if(lineParser.getBoolean("RIGHTBAR"))
{
- int dw = QApplication::desktop()->width();
+ int dw = TQApplication::desktop()->width();
move( dw - w, y );
KWin::setStrut( winId(), 0, w, 0, 0 );
toggleLocked->setChecked( true );
@@ -507,12 +507,12 @@ bool karamba::parseConfig()
toggleLocked->setEnabled(false);
}
- QString path = lineParser.getString("MASK");
+ TQString path = lineParser.getString("MASK");
- QFileInfo info(path);
- QString absPath;
- QBitmap bmMask;
- QByteArray ba;
+ TQFileInfo info(path);
+ TQString absPath;
+ TQBitmap bmMask;
+ TQByteArray ba;
if( info.isRelative() )
{
absPath.setAscii(m_theme.path().ascii());
@@ -537,25 +537,25 @@ bool karamba::parseConfig()
m_interval = lineParser.getInt("INTERVAL");
m_interval = (m_interval == 0) ? 1000 : m_interval;
- QString temp = lineParser.getString("TEMPUNIT", "C").upper();
+ TQString temp = lineParser.getString("TEMPUNIT", "C").upper();
tempUnit = temp.ascii()[0];
foundKaramba = true;
}
if(lineParser.meter() == "THEME")
{
- QString path = lineParser.getString("PATH");
- QFileInfo info(path);
+ TQString path = lineParser.getString("PATH");
+ TQFileInfo info(path);
if( info.isRelative())
path = m_theme.path() +"/" + path;
- (new karamba( path, QString() ))->show();
+ (new karamba( path, TQString() ))->show();
}
if(lineParser.meter() == "<GROUP>")
{
int offsetX = offsetStack.top().x();
int offsetY = offsetStack.top().y();
- offsetStack.push( QPoint( offsetX + lineParser.getInt("X"),
+ offsetStack.push( TQPoint( offsetX + lineParser.getInt("X"),
offsetY + lineParser.getInt("Y")));
}
@@ -585,12 +585,12 @@ bool karamba::parseConfig()
if(lineParser.meter() == "IMAGE")
{
- QString file = lineParser.getString("PATH");
- QString file_roll = lineParser.getString("PATHROLL");
+ TQString file = lineParser.getString("PATH");
+ TQString file_roll = lineParser.getString("PATHROLL");
int xon = lineParser.getInt("XROLL");
int yon = lineParser.getInt("YROLL");
- QString tiptext = lineParser.getString("TOOLTIP");
- QString name = lineParser.getString("NAME");
+ TQString tiptext = lineParser.getString("TOOLTIP");
+ TQString name = lineParser.getString("NAME");
bool bg = lineParser.getBoolean("BACKGROUND");
xon = ( xon <= 0 ) ? x:xon;
yon = ( yon <= 0 ) ? y:yon;
@@ -605,7 +605,7 @@ bool karamba::parseConfig()
if (!tiptext.isEmpty())
tmp->setTooltip(tiptext);
- connect(tmp, SIGNAL(pixmapLoaded()), this, SLOT(externalStep()));
+ connect(tmp, TQT_SIGNAL(pixmapLoaded()), this, TQT_SLOT(externalStep()));
setSensor(lineParser, (Meter*) tmp );
meterList->append (tmp );
imageList->append (tmp );
@@ -617,9 +617,9 @@ bool karamba::parseConfig()
defaultTextField = new TextField( );
defaultTextField->setColor(lineParser.getColor("COLOR",
- QColor("black")));
+ TQColor("black")));
defaultTextField->setBGColor(lineParser.getColor("BGCOLOR",
- QColor("white")));
+ TQColor("white")));
defaultTextField->setFont(lineParser.getString("FONT", "Helvetica"));
defaultTextField->setFontSize(lineParser.getInt("FONTSIZE", 12));
defaultTextField->setAlignment(lineParser.getString("ALIGN",
@@ -664,7 +664,7 @@ bool karamba::parseConfig()
tmp->setValue(
m_theme.locale()->translate(lineParser.getString("VALUE")));
- QString name = lineParser.getString("NAME");
+ TQString name = lineParser.getString("NAME");
if (!name.isEmpty())
tmp->setName(name.ascii());
@@ -698,7 +698,7 @@ bool karamba::parseConfig()
tmp->setWidth(w);
tmp->setHeight(h);
- QString name = lineParser.getString("NAME");
+ TQString name = lineParser.getString("NAME");
if (!name.isEmpty())
tmp->setName(name.ascii());
@@ -711,7 +711,7 @@ bool karamba::parseConfig()
{
Input *tmp = new Input(this, x, y, w, h);
- QString name = lineParser.getString("NAME");
+ TQString name = lineParser.getString("NAME");
if (!name.isEmpty())
tmp->setName(name.ascii());
@@ -732,7 +732,7 @@ bool karamba::parseConfig()
tmp->setMax(lineParser.getInt("MAX", 100));
tmp->setMin(lineParser.getInt("MIN", 0));
tmp->setValue(lineParser.getInt("VALUE"));
- QString name = lineParser.getString("NAME");
+ TQString name = lineParser.getString("NAME");
if (!name.isEmpty())
tmp->setName(name.ascii());
setSensor(lineParser, (Meter*)tmp );
@@ -746,7 +746,7 @@ bool karamba::parseConfig()
Graph *tmp = new Graph(this, x, y, w, h, points);
tmp->setMax(lineParser.getInt("MAX", 100));
tmp->setMin(lineParser.getInt("MIN", 0));
- QString name = lineParser.getString("NAME");
+ TQString name = lineParser.getString("NAME");
if (!name.isEmpty())
tmp->setName(name.ascii());
@@ -788,14 +788,14 @@ bool karamba::parseConfig()
void karamba::start()
{
- m_sysTimer = new QTimer(this);
+ m_sysTimer = new TQTimer(this);
- connect(m_sysTimer, SIGNAL(timeout()), SLOT(step()));
+ connect(m_sysTimer, TQT_SIGNAL(timeout()), TQT_SLOT(step()));
m_sysTimer->start(m_interval);
//Start the widget running
- QTimer::singleShot( 0, this, SLOT(step()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(step()) );
if( !(onTop || managed) )
lowerTimer.start();
@@ -818,7 +818,7 @@ void karamba::makePassive()
if(managed)
return;
- QObject *meter;
+ TQObject *meter;
for (meter = meterList->first(); meter; meter = meterList->next())
{
if((meter)->isA("Input"))
@@ -847,7 +847,7 @@ void karamba::reloadConfig()
writeConfigData();
if(m_theme.exists())
{
- QFileInfo fileInfo( m_theme.file() );
+ TQFileInfo fileInfo( m_theme.file() );
(new karamba(m_theme.file(), fileInfo.baseName(), true, m_instance))->show();
}
closeTheme(true);
@@ -872,8 +872,8 @@ void karamba::initPythonInterface()
void karamba::editConfig()
{
//qDebug("karamba::editConfig");
- QFileInfo fileInfo( m_theme.file() );
- QString path;
+ TQFileInfo fileInfo( m_theme.file() );
+ TQString path;
if( fileInfo.isRelative() )
{
@@ -890,8 +890,8 @@ void karamba::editConfig()
void karamba::editScript()
{
//qDebug("karamba::editScript");
- QFileInfo fileInfo( m_theme.file() );
- QString path;
+ TQFileInfo fileInfo( m_theme.file() );
+ TQString path;
if( fileInfo.isRelative() )
{
@@ -899,16 +899,16 @@ void karamba::editScript()
}
else
{
- path = QFileInfo(m_theme.file()).dirPath() + "/" + m_theme.name() + ".py";
+ path = TQFileInfo(m_theme.file()).dirPath() + "/" + m_theme.name() + ".py";
}
KRun::runURL( KURL( path ), "text/plain" );
}
-QString karamba::findSensorFromMap(Sensor* sensor)
+TQString karamba::findSensorFromMap(Sensor* sensor)
{
//qDebug("karamba::findSensorFromMap");
- QMap<QString,Sensor*>::ConstIterator it;
- QMap<QString,Sensor*>::ConstIterator end( sensorMap.end() );
+ TQMap<TQString,Sensor*>::ConstIterator it;
+ TQMap<TQString,Sensor*>::ConstIterator end( sensorMap.end() );
for ( it = sensorMap.begin(); it != end; ++it )
{
if (it.data() == sensor)
@@ -920,7 +920,7 @@ QString karamba::findSensorFromMap(Sensor* sensor)
Sensor* karamba::findSensorFromList(Meter* meter)
{
//qDebug("karamba::findSensorFromList");
- QObjectListIt it( *sensorList ); // iterate over meters
+ TQObjectListIt it( *sensorList ); // iterate over meters
while ( it != 0 )
{
@@ -931,10 +931,10 @@ Sensor* karamba::findSensorFromList(Meter* meter)
return NULL;
}
-QString karamba::getSensor(Meter* meter)
+TQString karamba::getSensor(Meter* meter)
{
//qDebug("karamba::getSensor");
- QString s;
+ TQString s;
Sensor* sensor = findSensorFromList(meter);
if (sensor)
s = findSensorFromMap(sensor);
@@ -951,7 +951,7 @@ void karamba::deleteMeterFromSensors(Meter* meter)
sensor->deleteMeter(meter);
if (sensor->isEmpty())
{
- QString s = findSensorFromMap(sensor);
+ TQString s = findSensorFromMap(sensor);
sensorMap.erase(s);
sensorList->removeRef(sensor);
}
@@ -965,11 +965,11 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
deleteMeterFromSensors(meter);
- QString sens = lineParser.getString("SENSOR").upper();
+ TQString sens = lineParser.getString("SENSOR").upper();
if( sens == "CPU" )
{
- QString cpuNbr = lineParser.getString("CPU");
+ TQString cpuNbr = lineParser.getString("CPU");
sensor = sensorMap["CPU"+cpuNbr];
if (sensor == 0)
{
@@ -1015,12 +1015,12 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
int interval = lineParser.getInt("INTERVAL");
interval = (interval == 0)?5000:interval;
sensor = ( sensorMap["DISK"] = new DiskSensor( interval ) );
- connect( sensor, SIGNAL(initComplete()), this, SLOT(externalStep()) );
+ connect( sensor, TQT_SIGNAL(initComplete()), this, TQT_SLOT(externalStep()) );
sensorList->append( sensor );
}
// meter->setMax( ((DiskSensor*)sensor)->getTotalSpace(mntPt)/1024 );
SensorParams *sp = new SensorParams(meter);
- QString mntPt = lineParser.getString("MOUNTPOINT");
+ TQString mntPt = lineParser.getString("MOUNTPOINT");
if( mntPt.isEmpty() )
{
mntPt = "/";
@@ -1042,7 +1042,7 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
{
int interval = lineParser.getInt("INTERVAL");
interval = (interval == 0)?2000:interval;
- QString device = lineParser.getString("DEVICE");
+ TQString device = lineParser.getString("DEVICE");
sensor = sensorMap["NETWORK"+device];
if (sensor == 0)
{
@@ -1094,21 +1094,21 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
if( sens == "TEXTFILE" )
{
- QString path = lineParser.getString("PATH");
+ TQString path = lineParser.getString("PATH");
bool rdf = lineParser.getBoolean("RDF");
sensor = sensorMap["TEXTFILE"+path];
if (sensor == 0)
{
int interval = lineParser.getInt("INTERVAL");
interval = ( interval == 0 )?60000:interval;
- QString encoding = lineParser.getString("ENCODING");
+ TQString encoding = lineParser.getString("ENCODING");
sensor = ( sensorMap["TEXTFILE"+path] =
new TextFileSensor( path, rdf, interval, encoding ) );
sensorList->append( sensor );
}
SensorParams *sp = new SensorParams(meter);
- sp->addParam("LINE",QString::number(lineParser.getInt("LINE")));
+ sp->addParam("LINE",TQString::number(lineParser.getInt("LINE")));
sensor->addMeter(sp);
}
@@ -1141,7 +1141,7 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
{
int interval = lineParser.getInt("INTERVAL");
interval = (interval == 0)?1000:interval;
- QString encoding = lineParser.getString("ENCODING");
+ TQString encoding = lineParser.getString("ENCODING");
sensor = ( sensorMap["XMMS"] = new XMMSSensor( interval, encoding ) );
sensorList->append( sensor );
@@ -1174,28 +1174,28 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
if( sens == "PROGRAM")
{
- QString progName = lineParser.getString("PROGRAM");
+ TQString progName = lineParser.getString("PROGRAM");
sensor = sensorMap["PROGRAM"+progName];
if (sensor == 0)
{
int interval = lineParser.getInt("INTERVAL");
interval = (interval == 0)?3600000:interval;
- QString encoding = lineParser.getString("ENCODING");
+ TQString encoding = lineParser.getString("ENCODING");
sensor = (sensorMap["PROGRAM"+progName] =
new ProgramSensor( progName, interval, encoding ) );
sensorList->append( sensor );
}
SensorParams *sp = new SensorParams(meter);
- sp->addParam( "LINE", QString::number(lineParser.getInt("LINE")));
+ sp->addParam( "LINE", TQString::number(lineParser.getInt("LINE")));
sp->addParam( "THEMAPATH", m_theme.path() );
sensor->addMeter(sp);
}
if( sens == "RSS" )
{
- QString source = lineParser.getString("SOURCE");
- QString format =
+ TQString source = lineParser.getString("SOURCE");
+ TQString format =
m_theme.locale()->translate(lineParser.getString("FORMAT").ascii());
sensor = sensorMap["RSS"+source];
@@ -1203,7 +1203,7 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
{
int interval = lineParser.getInt( "INTERVAL");
interval = ( interval == 0 )?60000:interval;
- QString encoding = lineParser.getString("ENCODING");
+ TQString encoding = lineParser.getString("ENCODING");
sensor = ( sensorMap["RSS"+source] =
new RssSensor( source, interval, format, encoding ) );
@@ -1216,39 +1216,39 @@ void karamba::setSensor(const LineParser& lineParser, Meter* meter)
if (sensor != 0)
{
- QTimer::singleShot( 0, sensor, SLOT(update()) );
+ TQTimer::singleShot( 0, sensor, TQT_SLOT(update()) );
sensor->start();
}
}
-void karamba::slotFileChanged( const QString & file)
+void karamba::slotFileChanged( const TQString & file)
{
//kdDebug() << "fileChanged: " << file << endl;
- QString pythonFile = m_theme.path() + "/" + m_theme.pythonModule() + ".py";
+ TQString pythonFile = m_theme.path() + "/" + m_theme.pythonModule() + ".py";
if(file == m_theme.file() || file == pythonFile)
reloadConfig();
}
-void karamba::passMenuOptionChanged(QString key, bool value)
+void karamba::passMenuOptionChanged(TQString key, bool value)
{
//Everything below is to call the python callback function
if (pythonIface && pythonIface->isExtensionLoaded())
pythonIface->menuOptionChanged(this, key, value);
}
-void karamba::setIncomingData(QString theme, QString obj)
+void karamba::setIncomingData(TQString theme, TQString obj)
{
KarambaApplication* app = (KarambaApplication*)qApp;
kdDebug() << "karamba::setIncomingData " << theme << obj << endl;
- //QByteArray data;
- //QDataStream dataStream( data, IO_WriteOnly );
+ //TQByteArray data;
+ //TQDataStream dataStream( data, IO_WriteOnly );
//dataStream << theme;
//dataStream << txt;
- //kapp->dcopClient()->send( app->dcopClient()->appId(), "KarambaIface", "themeNotify(QString,QString)", data );
+ //kapp->dcopClient()->send( app->dcopClient()->appId(), "KarambaIface", "themeNotify(TQString,TQString)", data );
DCOPClient *c = kapp->dcopClient();
if (!c->isAttached())
@@ -1258,17 +1258,17 @@ void karamba::setIncomingData(QString theme, QString obj)
app->dcopStub()->setIncomingData(theme, obj);
}
-void karamba::callTheme(QString theme, QString txt)
+void karamba::callTheme(TQString theme, TQString txt)
{
KarambaApplication* app = (KarambaApplication*)qApp;
kdDebug() << "karamba::callTheme " << theme << txt << endl;
//qWarning("karamba::callTheme");
- //QByteArray data;
- //QDataStream dataStream( data, IO_WriteOnly );
+ //TQByteArray data;
+ //TQDataStream dataStream( data, IO_WriteOnly );
//dataStream << theme;
//dataStream << txt;
- //kapp->dcopClient()->send( app->dcopClient()->appId(), "KarambaIface", "themeNotify(QString,QString)", data );
+ //kapp->dcopClient()->send( app->dcopClient()->appId(), "KarambaIface", "themeNotify(TQString,TQString)", data );
DCOPClient *c = kapp->dcopClient();
if (!c->isAttached())
@@ -1278,7 +1278,7 @@ void karamba::callTheme(QString theme, QString txt)
app->dcopStub()->themeNotify(theme, txt);
}
-void karamba::themeNotify(QString theme, QString txt)
+void karamba::themeNotify(TQString theme, TQString txt)
{
kdDebug() << "karamba::themeNotify" << theme << txt << endl;
if (pythonIface->isExtensionLoaded())
@@ -1287,7 +1287,7 @@ void karamba::themeNotify(QString theme, QString txt)
}
}
-void karamba::meterClicked(QMouseEvent* e, Meter* meter)
+void karamba::meterClicked(TQMouseEvent* e, Meter* meter)
{
//qWarning("karamba::meterClicked");
if (pythonIface && pythonIface->isExtensionLoaded() && haveUpdated)
@@ -1319,10 +1319,10 @@ void karamba::changeInterval(int interval)
m_sysTimer->changeInterval(interval);
}
-void karamba::passClick(QMouseEvent *e)
+void karamba::passClick(TQMouseEvent *e)
{
//qDebug("karamba::passClick");
- QObjectListIt it2( *timeList ); // iterate over meters
+ TQObjectListIt it2( *timeList ); // iterate over meters
while ( it2 != 0 )
{
(( DateSensor* ) *it2)->toggleCalendar( e );
@@ -1332,8 +1332,8 @@ void karamba::passClick(QMouseEvent *e)
// We create a temporary click list here because original
// can change during the loop (infinite loop Bug 994359)
- QObjectList clickListTmp(*clickList);
- QObjectListIt it(clickListTmp);
+ TQObjectList clickListTmp(*clickList);
+ TQObjectListIt it(clickListTmp);
while (it != 0)
{
Meter* meter = (Meter*)(*it);
@@ -1362,7 +1362,7 @@ void karamba::passClick(QMouseEvent *e)
}
}
-void karamba::passWheelClick( QWheelEvent *e )
+void karamba::passWheelClick( TQWheelEvent *e )
{
//qDebug("karamba::passWheelClick");
//Everything below is to call the python callback function
@@ -1379,10 +1379,10 @@ void karamba::passWheelClick( QWheelEvent *e )
// can change during the loop (infinite loop Bug 994359)
if (want_meter_wheel_event)
{
- QObjectList clickListTmp(*clickList);
- QObjectListIt it(clickListTmp);
+ TQObjectList clickListTmp(*clickList);
+ TQObjectListIt it(clickListTmp);
- QMouseEvent fakeEvent(QEvent::MouseButtonPress, e->pos(), e->globalPos(), button, e->state());
+ TQMouseEvent fakeEvent(TQEvent::MouseButtonPress, e->pos(), e->globalPos(), button, e->state());
while (it != 0)
{
@@ -1410,10 +1410,10 @@ void karamba::passWheelClick( QWheelEvent *e )
void karamba::management_popup( void )
{
- kpop->popup(QCursor::pos());
+ kpop->popup(TQCursor::pos());
}
-void karamba::mousePressEvent( QMouseEvent *e )
+void karamba::mousePressEvent( TQMouseEvent *e )
{
//qDebug("karamba::mousePressEvent");
if( e->button() == RightButton && !want_right_button )
@@ -1430,19 +1430,19 @@ void karamba::mousePressEvent( QMouseEvent *e )
}
}
-void karamba::wheelEvent( QWheelEvent *e )
+void karamba::wheelEvent( TQWheelEvent *e )
{
//qDebug("karamba::wheelEvent");
passWheelClick( e );
}
-void karamba::mouseReleaseEvent( QMouseEvent *e )
+void karamba::mouseReleaseEvent( TQMouseEvent *e )
{
//qDebug("karamba::mouseReleaseEvent");
clickPos = e->pos();
}
-void karamba::mouseDoubleClickEvent( QMouseEvent *e )
+void karamba::mouseDoubleClickEvent( TQMouseEvent *e )
{
//qDebug("karamba::mouseDoubleClickEvent");
if( !toggleLocked -> isChecked() )
@@ -1451,19 +1451,19 @@ void karamba::mouseDoubleClickEvent( QMouseEvent *e )
}
}
-void karamba::keyPressEvent(QKeyEvent *e)
+void karamba::keyPressEvent(TQKeyEvent *e)
{
//qDebug("karamba::keyPressEvent");
keyPressed(e->text(), 0);
}
-void karamba::keyPressed(const QString& s, const Meter* meter)
+void karamba::keyPressed(const TQString& s, const Meter* meter)
{
if (pythonIface && pythonIface->isExtensionLoaded())
pythonIface->keyPressed(this, meter, s);
}
-void karamba::mouseMoveEvent( QMouseEvent *e )
+void karamba::mouseMoveEvent( TQMouseEvent *e )
{
//qDebug("karamba::mouseMoveEvent");
if( e->state() != 0 && e->state() < 16 && !toggleLocked -> isChecked() )
@@ -1473,7 +1473,7 @@ void karamba::mouseMoveEvent( QMouseEvent *e )
else
{
// Change cursor over ClickArea
- QObjectListIt it(*clickList);
+ TQObjectListIt it(*clickList);
bool insideArea = false;
while (it != 0)
@@ -1497,7 +1497,7 @@ void karamba::mouseMoveEvent( QMouseEvent *e )
setCursor( ArrowCursor );
}
- QObjectListIt image_it( *imageList); // iterate over image sensors
+ TQObjectListIt image_it( *imageList); // iterate over image sensors
while ( image_it != 0 )
{
((ImageLabel*) *image_it)->rolloverImage(e);
@@ -1526,7 +1526,7 @@ void karamba::mouseMoveEvent( QMouseEvent *e )
}
}
-void karamba::closeEvent ( QCloseEvent * qc)
+void karamba::closeEvent ( TQCloseEvent * qc)
{
//qDebug("karamba::closeEvent");
qc->accept();
@@ -1534,7 +1534,7 @@ void karamba::closeEvent ( QCloseEvent * qc)
// delete this;
}
-void karamba::paintEvent ( QPaintEvent *e)
+void karamba::paintEvent ( TQPaintEvent *e)
{
//kdDebug() << k_funcinfo << pm.size() << endl;
if(pm.width() == 0)
@@ -1547,20 +1547,20 @@ void karamba::paintEvent ( QPaintEvent *e)
lowerTimer.restart();
}
}
- QRect rect = e->rect();
+ TQRect rect = e->rect();
bitBlt(this,rect.topLeft(),&pm,rect,Qt::CopyROP);
}
void karamba::updateSensors()
{
//qDebug("karamba::updateSensors");
- QObjectListIt it( *sensorList ); // iterate over meters
+ TQObjectListIt it( *sensorList ); // iterate over meters
while ( it != 0 )
{
((Sensor*) *it)->update();
++it;
}
- QTimer::singleShot( 500, this, SLOT(step()) );
+ TQTimer::singleShot( 500, this, TQT_SLOT(step()) );
}
void karamba::updateBackground(KSharedPixmap* kpm)
@@ -1574,14 +1574,14 @@ void karamba::updateBackground(KSharedPixmap* kpm)
themeStarted = true;
start();
}
- background = QPixmap(*kpm);
+ background = TQPixmap(*kpm);
- QPixmap buffer = QPixmap(size());
+ TQPixmap buffer = TQPixmap(size());
- pm = QPixmap(size());
+ pm = TQPixmap(size());
buffer.fill(Qt::black);
- QObjectListIt it( *imageList ); // iterate over meters
+ TQObjectListIt it( *imageList ); // iterate over meters
p.begin(&buffer);
bitBlt(&buffer,0,0,&background,0,Qt::CopyROP);
@@ -1598,12 +1598,12 @@ void karamba::updateBackground(KSharedPixmap* kpm)
bitBlt(&pm,0,0,&buffer,0,Qt::CopyROP);
background = pm;
- QPixmap buffer2 = QPixmap(size());
+ TQPixmap buffer2 = TQPixmap(size());
- pm = QPixmap(size());
+ pm = TQPixmap(size());
buffer2.fill(Qt::black);
- QObjectListIt it2( *meterList ); // iterate over meters
+ TQObjectListIt it2( *meterList ); // iterate over meters
p.begin(&buffer2);
bitBlt(&buffer2,0,0,&background,0,Qt::CopyROP);
@@ -1643,12 +1643,12 @@ void karamba::externalStep()
//kdDebug() << k_funcinfo << pm.size() << endl;
if (widgetUpdate)
{
- QPixmap buffer = QPixmap(size());
+ TQPixmap buffer = TQPixmap(size());
- pm = QPixmap(size());
+ pm = TQPixmap(size());
buffer.fill(Qt::black);
- QObjectListIt it( *meterList ); // iterate over meters
+ TQObjectListIt it( *meterList ); // iterate over meters
p.begin(&buffer);
bitBlt(&buffer,0,0,&background,0,Qt::CopyROP);
@@ -1669,11 +1669,11 @@ void karamba::step()
//kdDebug() << k_funcinfo << pm.size() << endl;
if (widgetUpdate && haveUpdated)
{
- pm = QPixmap(size());
- QPixmap buffer = QPixmap(size());
+ pm = TQPixmap(size());
+ TQPixmap buffer = TQPixmap(size());
buffer.fill(Qt::black);
- QObjectListIt it( *meterList ); // iterate over meters
+ TQObjectListIt it( *meterList ); // iterate over meters
p.begin(&buffer);
bitBlt(&buffer,0,0,&background,0,Qt::CopyROP);
@@ -1731,7 +1731,7 @@ void karamba::slotToggleFastTransforms()
// }
// else
// {
- // QPixmap ok_disabled;
+ // TQPixmap ok_disabled;
// toggleFastTransforms -> setIconSet(ok_disabled);
// }
//config.setGroup("internal");
@@ -1766,7 +1766,7 @@ void karamba::writeConfigData()
// m_theme.name().ascii());
}
-void karamba::slotToggleConfigOption(QString key, bool value)
+void karamba::slotToggleConfigOption(TQString key, bool value)
{
//qDebug("karamba::slotToggleConfigOption");
config -> setGroup("config menu");
@@ -1774,21 +1774,21 @@ void karamba::slotToggleConfigOption(QString key, bool value)
passMenuOptionChanged(key, value);
}
-void karamba::addMenuConfigOption(QString key, QString name)
+void karamba::addMenuConfigOption(TQString key, TQString name)
{
//qDebug("karamba::addMenuConfigOption");
kpop -> setItemEnabled(THEMECONF, true);
SignalBridge* action = new SignalBridge(this, key, menuAccColl);
KToggleAction* confItem = new KToggleAction (name, KShortcut::null(),
- action, SLOT(receive()),
+ action, TQT_SLOT(receive()),
menuAccColl, key.ascii());
confItem -> setName(key.ascii());
menuAccColl -> insert(confItem);
- connect(action, SIGNAL( enabled(QString, bool) ),
- this, SLOT( slotToggleConfigOption(QString, bool) ));
+ connect(action, TQT_SIGNAL( enabled(TQString, bool) ),
+ this, TQT_SLOT( slotToggleConfigOption(TQString, bool) ));
config -> setGroup("config menu");
confItem -> setChecked(config -> readBoolEntry(key));
@@ -1798,7 +1798,7 @@ void karamba::addMenuConfigOption(QString key, QString name)
numberOfConfMenuItems++;
}
-bool karamba::setMenuConfigOption(QString key, bool value)
+bool karamba::setMenuConfigOption(TQString key, bool value)
{
//qDebug("karamba::setMenuConfigOption");
KToggleAction* menuAction = ((KToggleAction*)menuAccColl -> action(key.ascii()));
@@ -1814,7 +1814,7 @@ bool karamba::setMenuConfigOption(QString key, bool value)
}
}
-bool karamba::readMenuConfigOption(QString key)
+bool karamba::readMenuConfigOption(TQString key)
{
//qDebug("karamba::readMenuConfigOption");
KToggleAction* menuAction = ((KToggleAction*)menuAccColl -> action(key.ascii()));
@@ -1929,28 +1929,28 @@ void karamba::readProperties(KConfig* config)
{
//qDebug("karamba::readProperties");
config->setGroup("session");
- QString atheme = config->readEntry("theme");
+ TQString atheme = config->readEntry("theme");
}
//Register types of events that can be dragged on our widget
-void karamba::dragEnterEvent(QDragEnterEvent* event)
+void karamba::dragEnterEvent(TQDragEnterEvent* event)
{
//qDebug("karamba::dragEnterEvent");
- event->accept(QTextDrag::canDecode(event));
+ event->accept(TQTextDrag::canDecode(event));
}
//Handle the drop part of a drag and drop event.
-void karamba::dropEvent(QDropEvent* event)
+void karamba::dropEvent(TQDropEvent* event)
{
//qDebug("karamba::dropEvent");
- QString text;
+ TQString text;
- if ( QTextDrag::decode(event, text) )
+ if ( TQTextDrag::decode(event, text) )
{
//Everything below is to call the python callback function
if (pythonIface && pythonIface->isExtensionLoaded())
{
- const QPoint &p = event->pos();
+ const TQPoint &p = event->pos();
pythonIface->itemDropped(this, text, p.x(), p.y());
}
}
@@ -1992,8 +1992,8 @@ void karamba::toggleWidgetUpdate( bool b)
widgetUpdate = b;
}
-SignalBridge::SignalBridge(QObject* parent, QString name, KActionCollection* ac)
- : QObject(parent, name.ascii()), collection(ac)
+SignalBridge::SignalBridge(TQObject* parent, TQString name, KActionCollection* ac)
+ : TQObject(parent, name.ascii()), collection(ac)
{
setName(name.ascii());
}
@@ -2004,8 +2004,8 @@ void SignalBridge::receive()
isChecked());
}
-DesktopChangeSlot::DesktopChangeSlot(QObject *parent, int id)
- : QObject(parent, "")
+DesktopChangeSlot::DesktopChangeSlot(TQObject *parent, int id)
+ : TQObject(parent, "")
{
desktopid = id;
}
@@ -2035,16 +2035,16 @@ void karamba::showMenuExtension()
trayMenuToggleId = kglobal->insertItem(SmallIconSet("superkaramba"),
i18n("Show System Tray Icon"), this,
- SLOT(slotToggleSystemTray()),
+ TQT_SLOT(slotToggleSystemTray()),
CTRL+Key_S);
trayMenuThemeId = kglobal->insertItem(SmallIconSet("knewstuff"),
i18n("&Manage Themes..."), this,
- SLOT(slotShowTheme()), CTRL+Key_M);
+ TQT_SLOT(slotShowTheme()), CTRL+Key_M);
trayMenuQuitId = kglobal->insertItem(SmallIconSet("exit"),
i18n("&Quit SuperKaramba"), this,
- SLOT(slotQuit()), CTRL+Key_Q);
+ TQT_SLOT(slotQuit()), CTRL+Key_Q);
kglobal->polish();
diff --git a/superkaramba/src/karamba.h b/superkaramba/src/karamba.h
index a81b11b..d3e6e4a 100644
--- a/superkaramba/src/karamba.h
+++ b/superkaramba/src/karamba.h
@@ -28,43 +28,43 @@
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kwinmodule.h>
#include <kwin.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kfile.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kaction.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qpainter.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
//#include <krootpixmap.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qobjectlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqobjectlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <ksharedpixmap.h>
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <dcopclient.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <netwm.h>
#include <kiconloader.h>
#include <kfiledialog.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kurl.h>
#include <krun.h>
-#include <qdatetime.h>
-#include <qbitmap.h>
+#include <tqdatetime.h>
+#include <tqbitmap.h>
#include <kconfig.h>
#include <kprocess.h>
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include "karambarootpixmap.h"
@@ -114,24 +114,24 @@ class karamba : public QWidget
Q_OBJECT
public:
- karamba(QString fn, QString name, bool reloading = false,
+ karamba(TQString fn, TQString name, bool reloading = false,
int instance = -1, bool sub_theme = false);
- QObjectList *menuList;
+ TQObjectList *menuList;
virtual ~karamba();
const ThemeFile& theme() const { return m_theme; };
- QObjectList *meterList;
- QObjectList *imageList;
- QObjectList *clickList;
+ TQObjectList *meterList;
+ TQObjectList *imageList;
+ TQObjectList *clickList;
void setSensor(const LineParser& lineParser, Meter* meter);
- QString getSensor(Meter* meter);
- QString findSensorFromMap(Sensor* sensor);
+ TQString getSensor(Meter* meter);
+ TQString findSensorFromMap(Sensor* sensor);
void deleteMeterFromSensors(Meter* meter);
Sensor* findSensorFromList(Meter* meter);
KPopupMenu* keditpop;
KPopupMenu *kpop;
- QBitmap* widgetMask;
+ TQBitmap* widgetMask;
KarambaRootPixmap *kroot;
TaskManager taskManager;
Systemtray* systray;
@@ -143,19 +143,19 @@ public:
bool getWidgetUpdate() { return widgetUpdate; };
bool hasMeter(Meter* meter) { return meterList->containsRef(meter) > 0; };
char getTempUnit() { return tempUnit; };
- void addMenuConfigOption(QString key, QString name);
- bool setMenuConfigOption(QString key, bool value);
- bool readMenuConfigOption(QString key);
+ void addMenuConfigOption(TQString key, TQString name);
+ bool setMenuConfigOption(TQString key, bool value);
+ bool readMenuConfigOption(TQString key);
void writeConfigData();
TextField* getDefaultTextProps() { return defaultTextField; };
int instance() const { return m_instance; };
void setInstance(int instance) { m_instance = instance; };
void closeTheme(bool reloading = false);
- void keyPressed(const QString& s, const Meter* meter);
+ void keyPressed(const TQString& s, const Meter* meter);
int numberOfConfMenuItems;
KConfig* config;
- QString prettyName;
+ TQString prettyName;
bool m_sub_theme;
bool isSubTheme() { return m_sub_theme; }
@@ -163,13 +163,13 @@ public:
KWinModule* kWinModule;
- QString incomingData;
- QString getIncomingData() { return incomingData; }
- void _setIncomingData(QString data) { incomingData = data; }
- void setIncomingData(QString theme, QString data);
+ TQString incomingData;
+ TQString getIncomingData() { return incomingData; }
+ void _setIncomingData(TQString data) { incomingData = data; }
+ void setIncomingData(TQString theme, TQString data);
- void themeNotify(QString theme, QString txt);
- void callTheme(QString theme, QString txt);
+ void themeNotify(TQString theme, TQString txt);
+ void callTheme(TQString theme, TQString txt);
double getUpdateTime() { return update_time; }
void setUpdateTime(double time) { update_time = time; }
@@ -181,18 +181,18 @@ public:
void hideMenuExtension();
protected:
- void mousePressEvent( QMouseEvent *);
- void wheelEvent( QWheelEvent *);
- void mouseReleaseEvent( QMouseEvent *);
- void mouseDoubleClickEvent( QMouseEvent *);
- void mouseMoveEvent( QMouseEvent *);
- void keyPressEvent ( QKeyEvent * e );
- void closeEvent ( QCloseEvent *);
- void paintEvent ( QPaintEvent *);
+ void mousePressEvent( TQMouseEvent *);
+ void wheelEvent( TQWheelEvent *);
+ void mouseReleaseEvent( TQMouseEvent *);
+ void mouseDoubleClickEvent( TQMouseEvent *);
+ void mouseMoveEvent( TQMouseEvent *);
+ void keyPressEvent ( TQKeyEvent * e );
+ void closeEvent ( TQCloseEvent *);
+ void paintEvent ( TQPaintEvent *);
void saveProperties(KConfig *);
void readProperties(KConfig *);
- void dragEnterEvent(QDragEnterEvent* event);
- void dropEvent(QDropEvent* event);
+ void dragEnterEvent(TQDragEnterEvent* event);
+ void dropEvent(TQDropEvent* event);
private:
bool widgetUpdate;
@@ -212,15 +212,15 @@ private:
bool parseConfig();
- void passClick( QMouseEvent* );
- void passWheelClick( QWheelEvent* );
- void meterClicked(QMouseEvent*, Meter*);
+ void passClick( TQMouseEvent* );
+ void passWheelClick( TQWheelEvent* );
+ void meterClicked(TQMouseEvent*, Meter*);
- QMap<QString, Sensor*> sensorMap;
- QObjectList *sensorList;
- QObjectList *timeList;
+ TQMap<TQString, Sensor*> sensorMap;
+ TQObjectList *sensorList;
+ TQObjectList *timeList;
- QTime lowerTimer;
+ TQTime lowerTimer;
// use only the first occurance of KARAMBA in a config file
bool foundKaramba;
@@ -229,13 +229,13 @@ private:
KPopupMenu* kglobal;
DCOPClient *client;
- QCString appId;
+ TQCString appId;
- QPixmap pm;
- QPixmap background;
- QPainter p;
+ TQPixmap pm;
+ TQPixmap background;
+ TQPainter p;
- QPoint clickPos;
+ TQPoint clickPos;
KActionCollection* accColl;
KActionCollection* menuAccColl;
KToggleAction *toggleLocked;
@@ -262,9 +262,9 @@ public slots:
void updateSensors();
void currentDesktopChanged(int);
void currentWallpaperChanged(int);
- void slotToggleConfigOption(QString key, bool);
+ void slotToggleConfigOption(TQString key, bool);
void updateBackground(KSharedPixmap*);
- void passMenuOptionChanged(QString key, bool);
+ void passMenuOptionChanged(TQString key, bool);
void passMenuItemClicked(int);
void processExited (KProcess *proc);
void receivedStdout (KProcess *proc, char *buffer, int buflen);
@@ -301,7 +301,7 @@ public slots:
private:
bool m_reloading;
bool themeStarted;
- QTimer *m_sysTimer;
+ TQTimer *m_sysTimer;
int m_interval;
private slots:
@@ -312,7 +312,7 @@ private slots:
void slotToggleLocked();
void slotToggleFastTransforms();
void popupNotify(int);
- void slotFileChanged( const QString & );
+ void slotFileChanged( const TQString & );
void slotToggleSystemTray();
void slotQuit();
@@ -328,7 +328,7 @@ class DesktopChangeSlot : public QObject
Q_OBJECT
public:
- DesktopChangeSlot(QObject *parent, int desktop_id);
+ DesktopChangeSlot(TQObject *parent, int desktop_id);
/* Parent should be the karamba object
* desktop id of 0 indicates all desktops */
void setMenuId(int id);
@@ -348,10 +348,10 @@ class SignalBridge : public QObject
Q_OBJECT
public:
- SignalBridge(QObject* parent, QString, KActionCollection*);
+ SignalBridge(TQObject* parent, TQString, KActionCollection*);
signals:
- void enabled(QString, bool);
+ void enabled(TQString, bool);
public slots:
void receive();
diff --git a/superkaramba/src/karamba_python.cpp b/superkaramba/src/karamba_python.cpp
index ab0034a..746c890 100644
--- a/superkaramba/src/karamba_python.cpp
+++ b/superkaramba/src/karamba_python.cpp
@@ -514,7 +514,7 @@ bool KarambaPython::widgetClosed(karamba* k)
return callObject("widgetClosed", pArgs);
}
-bool KarambaPython::menuOptionChanged(karamba* k, QString key, bool value)
+bool KarambaPython::menuOptionChanged(karamba* k, TQString key, bool value)
{
PyObject* pArgs = Py_BuildValue((char*)"(lsi)", k, key.ascii(), (int)value);
return callObject("menuOptionChanged", pArgs);
@@ -532,7 +532,7 @@ bool KarambaPython::meterClicked(karamba* k, Meter* meter, int button)
return callObject("meterClicked", pArgs);
}
-bool KarambaPython::meterClicked(karamba* k, QString anchor, int button)
+bool KarambaPython::meterClicked(karamba* k, TQString anchor, int button)
{
PyObject* pArgs = Py_BuildValue((char*)"(lsi)", k, anchor.ascii(), button);
return callObject("meterClicked", pArgs);
@@ -545,7 +545,7 @@ bool KarambaPython::widgetClicked(karamba* k, int x, int y, int button)
}
bool KarambaPython::keyPressed(karamba* k, const Meter* meter,
- const QString& text)
+ const TQString& text)
{
PyObject* pArgs = Py_BuildValue((char*)"(lls)", k, meter, text.ucs2());
return callObject("keyPressed", pArgs);
@@ -599,7 +599,7 @@ bool KarambaPython::commandFinished(karamba* k, int pid)
return callObject("commandFinished", pArgs);
}
-bool KarambaPython::itemDropped(karamba* k, QString text, int x, int y)
+bool KarambaPython::itemDropped(karamba* k, TQString text, int x, int y)
{
PyObject* pArgs = Py_BuildValue((char*)"(lOii)", k, QString2PyString(text), x, y);
return callObject("itemDropped", pArgs);
diff --git a/superkaramba/src/karamba_python.h b/superkaramba/src/karamba_python.h
index 5f2032e..c494353 100644
--- a/superkaramba/src/karamba_python.h
+++ b/superkaramba/src/karamba_python.h
@@ -61,11 +61,11 @@ public:
bool initWidget(karamba* k);
bool widgetUpdated(karamba* k);
bool widgetClosed(karamba* k);
- bool menuOptionChanged(karamba* k, QString key, bool value);
+ bool menuOptionChanged(karamba* k, TQString key, bool value);
bool meterClicked(karamba* k, Meter* meter, int button);
- bool meterClicked(karamba* k, QString anchor, int button);
+ bool meterClicked(karamba* k, TQString anchor, int button);
bool widgetClicked(karamba* k, int x, int y, int button);
- bool keyPressed(karamba* k, const Meter* meter, const QString& text);
+ bool keyPressed(karamba* k, const Meter* meter, const TQString& text);
bool widgetMouseMoved(karamba* k, int x, int y, int button);
bool menuItemClicked(karamba* k, KPopupMenu* menu, long id);
bool activeTaskChanged(karamba* k, Task* t);
@@ -75,7 +75,7 @@ public:
bool startupRemoved(karamba* k, Startup* t);
bool commandOutput(karamba* k, int pid, char *buffer);
bool commandFinished(karamba* k, int pid);
- bool itemDropped(karamba* k, QString text, int x, int y);
+ bool itemDropped(karamba* k, TQString text, int x, int y);
bool themeNotify(karamba* k, const char *from, const char *txt);
bool systrayUpdated(karamba* k);
bool desktopChanged(karamba* k, int desktop);
diff --git a/superkaramba/src/karambaapp.cpp b/superkaramba/src/karambaapp.cpp
index 5357b01..141b2e9 100644
--- a/superkaramba/src/karambaapp.cpp
+++ b/superkaramba/src/karambaapp.cpp
@@ -8,9 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include <kfiledialog.h>
#include <kcmdlineargs.h>
#include <fcntl.h>
@@ -19,7 +19,7 @@
#include <kdebug.h>
#include <khelpmenu.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include "themesdlg.h"
#include "karambainterface.h"
@@ -27,7 +27,7 @@
#include "dcopinterface_stub.h"
#include "karamba.h"
#include "superkarambasettings.h"
-#include "qwidgetlist.h"
+#include "tqwidgetlist.h"
int KarambaApplication::fd = -1;
@@ -36,7 +36,7 @@ KarambaApplication::KarambaApplication() :
karambaList(0), sysTrayIcon(0)
{
iface = new KarambaIface();
- karambaList = new QObjectList();
+ karambaList = new TQObjectList();
// register ourselves as a dcop client
dcopClient()->registerAs(name());
dcopClient()->setDefaultObject(dcopIface()->objId());
@@ -51,17 +51,17 @@ KarambaApplication::~KarambaApplication()
//delete m_helpMenu;
}
-void KarambaApplication::initDcopStub(QCString app)
+void KarambaApplication::initDcopStub(TQCString app)
{
if(app.isEmpty())
app = dcopClient()->appId();
dcopIfaceStub = new dcopIface_stub(app, iface->objId());
}
-QString KarambaApplication::getMainKaramba()
+TQString KarambaApplication::getMainKaramba()
{
- QStringList karambas = getKarambas();
- QStringList::Iterator it;
+ TQStringList karambas = getKarambas();
+ TQStringList::Iterator it;
for (it = karambas.begin(); it != karambas.end(); ++it)
{
@@ -71,18 +71,18 @@ QString KarambaApplication::getMainKaramba()
if (dcop.isMainKaramba())
return *it;
}
- return QString::null;
+ return TQString::null;
}
-bool KarambaApplication::themeExists(QString pretty_name)
+bool KarambaApplication::themeExists(TQString pretty_name)
{
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list ); // iterate over the widgets
- QWidget * w;
+ TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetListIt it( *list ); // iterate over the widgets
+ TQWidget * w;
while ( (w=it.current()) != 0 ) // for each widget...
{
++it;
- if (QString(w->name()).startsWith("karamba"))
+ if (TQString(w->name()).startsWith("karamba"))
{
karamba* k = (karamba*) w;
if (k->getPrettyName() == pretty_name)
@@ -93,12 +93,12 @@ bool KarambaApplication::themeExists(QString pretty_name)
return false;
}
-QStringList KarambaApplication::getKarambas()
+TQStringList KarambaApplication::getKarambas()
{
QCStringList applst = dcopClient()->registeredApplications();
QCStringList::Iterator it;
- QCString s;
- QStringList result;
+ TQCString s;
+ TQStringList result;
for (it = applst.begin(); (s = *it) != 0; ++it)
{
@@ -111,11 +111,11 @@ QStringList KarambaApplication::getKarambas()
void KarambaApplication::checkSuperKarambaDir()
{
// Create ~/.superkaramba if necessary
- QDir configDir(QDir::home().absPath() + "/.superkaramba");
+ TQDir configDir(TQDir::home().absPath() + "/.superkaramba");
if (!configDir.exists())
{
qWarning("~/.superkaramba doesn't exist");
- if(!configDir.mkdir(QDir::home().absPath() + "/.superkaramba"))
+ if(!configDir.mkdir(TQDir::home().absPath() + "/.superkaramba"))
{
qWarning("Couldn't create Directory ~/.superkaramba");
}
@@ -141,17 +141,17 @@ void KarambaApplication::setUpSysTray(KAboutData* about)
KPopupMenu *menu = sysTrayIcon->contextMenu();
menu->insertItem(SmallIconSet("superkaramba"),
i18n("Hide System Tray Icon"), this,
- SLOT(globalHideSysTray()));
+ TQT_SLOT(globalHideSysTray()));
menu->insertSeparator();
m_helpMenu = new KHelpMenu(themeListWindow, about);
- action = KStdAction::help(m_helpMenu, SLOT(appHelpActivated()),
+ action = KStdAction::help(m_helpMenu, TQT_SLOT(appHelpActivated()),
sysTrayIcon->actionCollection());
action->plug(menu);
- action = KStdAction::aboutApp(m_helpMenu, SLOT(aboutApplication()),
+ action = KStdAction::aboutApp(m_helpMenu, TQT_SLOT(aboutApplication()),
sysTrayIcon->actionCollection());
action->plug(menu);
- action = KStdAction::aboutKDE(m_helpMenu, SLOT(aboutKDE()),
+ action = KStdAction::aboutKDE(m_helpMenu, TQT_SLOT(aboutKDE()),
sysTrayIcon->actionCollection());
action->plug(menu);
@@ -164,13 +164,13 @@ void KarambaApplication::setUpSysTray(KAboutData* about)
sysTrayIcon->hide();
//Connect Systray icon's quit event
- QObject::connect(sysTrayIcon, SIGNAL(quitSelected()),
- this, SLOT(globalQuitSuperKaramba()));
+ TQObject::connect(sysTrayIcon, TQT_SIGNAL(quitSelected()),
+ this, TQT_SLOT(globalQuitSuperKaramba()));
}
void KarambaApplication::showKarambaMenuExtension(bool show)
{
- QObject *k;
+ TQObject *k;
if(show)
{
@@ -188,13 +188,13 @@ void KarambaApplication::showKarambaMenuExtension(bool show)
}
}
-void KarambaApplication::setToolTip(const QString &tip)
+void KarambaApplication::setToolTip(const TQString &tip)
{
- QToolTip::remove(sysTrayIcon);
+ TQToolTip::remove(sysTrayIcon);
if(tip.isNull())
- QToolTip::add(sysTrayIcon, i18n("SuperKaramba"));
+ TQToolTip::add(sysTrayIcon, i18n("SuperKaramba"));
else
- QToolTip::add(sysTrayIcon, tip);
+ TQToolTip::add(sysTrayIcon, tip);
}
void KarambaApplication::buildToolTip()
@@ -202,7 +202,7 @@ void KarambaApplication::buildToolTip()
if(!sysTrayIcon || !themeListWindow)
return;
- QStringList list = themeListWindow->runningThemes();
+ TQStringList list = themeListWindow->runningThemes();
if(list.isEmpty())
{
@@ -210,11 +210,11 @@ void KarambaApplication::buildToolTip()
return;
}
- QString toolTip("<b><center>" + i18n("SuperKaramba") + "</center></b>");
+ TQString toolTip("<b><center>" + i18n("SuperKaramba") + "</center></b>");
toolTip += "<table width=300>";
bool firstRun = true;
- for(QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
if(firstRun)
{
@@ -236,7 +236,7 @@ void KarambaApplication::buildToolTip()
}
void KarambaApplication::checkPreviousSession(KApplication &app,
- QStringList &lst)
+ TQStringList &lst)
{
/******
Try to restore a previous session if applicable.
@@ -245,14 +245,14 @@ void KarambaApplication::checkPreviousSession(KApplication &app,
{
KConfig* config = app.sessionConfig();
config->setGroup("General Options");
- QString restartThemes = config->readEntry("OpenThemes");
+ TQString restartThemes = config->readEntry("OpenThemes");
//Get themes that were running
- lst = QStringList::split(QString(";"), restartThemes);
+ lst = TQStringList::split(TQString(";"), restartThemes);
}
}
-void KarambaApplication::checkCommandLine(KCmdLineArgs *args, QStringList &lst)
+void KarambaApplication::checkCommandLine(KCmdLineArgs *args, TQStringList &lst)
{
/******
Not a saved session - check for themes given on command line
@@ -271,15 +271,15 @@ void KarambaApplication::checkCommandLine(KCmdLineArgs *args, QStringList &lst)
}
}
-bool KarambaApplication::startThemes(QStringList &lst)
+bool KarambaApplication::startThemes(TQStringList &lst)
{
bool result = false;
- for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for(TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
karamba *mainWin = 0;
- mainWin = new karamba(*it , QString());
+ mainWin = new karamba(*it , TQString());
mainWin->show();
result = true;
}
@@ -317,7 +317,7 @@ bool KarambaApplication::hasKaramba(karamba* k)
bool KarambaApplication::lockKaramba()
{
- QString file = QDir::home().absPath() + "/.superkaramba/.lock";
+ TQString file = TQDir::home().absPath() + "/.superkaramba/.lock";
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
fd = open(file.ascii(), O_CREAT | O_RDWR | O_TRUNC, mode);
@@ -386,8 +386,8 @@ void KarambaApplication::quitSuperKaramba()
void KarambaApplication::globalQuitSuperKaramba()
{
- QStringList apps = getKarambas();
- QStringList::Iterator it;
+ TQStringList apps = getKarambas();
+ TQStringList::Iterator it;
for (it = apps.begin(); it != apps.end(); ++it)
{
@@ -398,8 +398,8 @@ void KarambaApplication::globalQuitSuperKaramba()
void KarambaApplication::globalShowThemeDialog()
{
- QStringList apps = getKarambas();
- QStringList::Iterator it;
+ TQStringList apps = getKarambas();
+ TQStringList::Iterator it;
for (it = apps.begin(); it != apps.end(); ++it)
{
@@ -411,8 +411,8 @@ void KarambaApplication::globalShowThemeDialog()
void KarambaApplication::globalHideSysTray(bool hide)
{
//kdDebug() << k_funcinfo << endl;
- QStringList apps = getKarambas();
- QStringList::Iterator it;
+ TQStringList apps = getKarambas();
+ TQStringList::Iterator it;
SuperKarambaSettings::setShowSysTray(!hide);
SuperKarambaSettings::writeConfig();
diff --git a/superkaramba/src/karambaapp.h b/superkaramba/src/karambaapp.h
index ef92244..9a22adc 100644
--- a/superkaramba/src/karambaapp.h
+++ b/superkaramba/src/karambaapp.h
@@ -47,30 +47,30 @@ class KarambaApplication : public KApplication
KHelpMenu* m_helpMenu;
void showKarambaMenuExtension(bool show = true);
- void setToolTip(const QString &tip = QString::null);
+ void setToolTip(const TQString &tip = TQString::null);
protected:
KarambaIface* iface;
ThemesDlg* themeListWindow;
dcopIface_stub* dcopIfaceStub;
- QObjectList *karambaList;
+ TQObjectList *karambaList;
KSystemTray* sysTrayIcon;
public:
KarambaApplication();
~KarambaApplication();
- QString getMainKaramba();
- QStringList getKarambas();
- bool themeExists(QString pretty_name);
- void initDcopStub(QCString app = "");
+ TQString getMainKaramba();
+ TQStringList getKarambas();
+ bool themeExists(TQString pretty_name);
+ void initDcopStub(TQCString app = "");
void setUpSysTray(KAboutData* about);
- void checkPreviousSession(KApplication &app, QStringList &lst);
- void checkCommandLine(KCmdLineArgs *args, QStringList &lst);
- bool startThemes(QStringList &lst);
+ void checkPreviousSession(KApplication &app, TQStringList &lst);
+ void checkCommandLine(KCmdLineArgs *args, TQStringList &lst);
+ bool startThemes(TQStringList &lst);
KarambaIface* dcopIface() { return iface; };
dcopIface_stub* dcopStub() { return dcopIfaceStub; };
- QWidget* parentWindow() { return (QWidget*)themeListWindow; };
+ TQWidget* parentWindow() { return (TQWidget*)themeListWindow; };
void addKaramba(karamba* k, bool reloading = false);
void deleteKaramba(karamba* k, bool reloading = false);
diff --git a/superkaramba/src/karambainterface.cpp b/superkaramba/src/karambainterface.cpp
index 7a201d8..5d33f68 100644
--- a/superkaramba/src/karambainterface.cpp
+++ b/superkaramba/src/karambainterface.cpp
@@ -11,7 +11,7 @@
#include "karamba.h"
#include "karambainterface.h"
#include <kdebug.h>
-#include "qwidgetlist.h"
+#include "tqwidgetlist.h"
#include "themesdlg.h"
KarambaIface::KarambaIface(): DCOPObject("KarambaIface")
@@ -22,17 +22,17 @@ KarambaIface::~KarambaIface()
{
}
-karamba* KarambaIface::getKaramba(QString name)
+karamba* KarambaIface::getKaramba(TQString name)
{
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it(*list); // iterate over the widgets
- QWidget* w;
+ TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetListIt it(*list); // iterate over the widgets
+ TQWidget* w;
karamba* result = 0;
while ( (w=it.current()) != 0 ) // for each widget...
{
++it;
- if (QString(w->name()).startsWith("karamba"))
+ if (TQString(w->name()).startsWith("karamba"))
{
karamba* k = (karamba*) w;
//if(k->prettyName == name)
@@ -49,15 +49,15 @@ karamba* KarambaIface::getKaramba(QString name)
ThemesDlg* KarambaIface::getThemeWnd()
{
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list ); // iterate over the widgets
- QWidget* w;
+ TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetListIt it( *list ); // iterate over the widgets
+ TQWidget* w;
ThemesDlg* result = 0;
while ( (w=it.current()) != 0 ) // for each widget...
{
++it;
- if (QString(w->name()) == "ThemesLayout")
+ if (TQString(w->name()) == "ThemesLayout")
{
result = (ThemesDlg*) w;
break;
@@ -67,25 +67,25 @@ ThemesDlg* KarambaIface::getThemeWnd()
return result;
}
-void KarambaIface::openTheme(QString filename)
+void KarambaIface::openTheme(TQString filename)
{
- QFileInfo file(filename);
+ TQFileInfo file(filename);
if(file.exists())
{
- (new karamba(filename, QString()))->show();
+ (new karamba(filename, TQString()))->show();
}
}
-void KarambaIface::openNamedTheme(QString filename, QString name, bool is_sub_theme)
+void KarambaIface::openNamedTheme(TQString filename, TQString name, bool is_sub_theme)
{
- QFileInfo file(filename);
+ TQFileInfo file(filename);
if(file.exists())
{
(new karamba(filename, name, false, -1, is_sub_theme))->show();
}
}
-void KarambaIface::closeTheme(QString name)
+void KarambaIface::closeTheme(TQString name)
{
kdDebug() << "KarambaIface::closeTheme: " << name << endl;
karamba* k;
@@ -97,7 +97,7 @@ void KarambaIface::closeTheme(QString name)
}
}
-int KarambaIface::themeAdded(QString appId, QString file)
+int KarambaIface::themeAdded(TQString appId, TQString file)
{
ThemesDlg* tw = getThemeWnd();
if(tw)
@@ -105,7 +105,7 @@ int KarambaIface::themeAdded(QString appId, QString file)
return -1;
}
-void KarambaIface::themeNotify(QString name, QString text)
+void KarambaIface::themeNotify(TQString name, TQString text)
{
karamba* k = getKaramba(name);
if(k)
@@ -114,7 +114,7 @@ void KarambaIface::themeNotify(QString name, QString text)
}
}
-void KarambaIface::setIncomingData(QString name, QString text)
+void KarambaIface::setIncomingData(TQString name, TQString text)
{
karamba* k = getKaramba(name);
if(k)
@@ -123,7 +123,7 @@ void KarambaIface::setIncomingData(QString name, QString text)
}
}
-void KarambaIface::themeClosed(QString appId, QString file, int instance)
+void KarambaIface::themeClosed(TQString appId, TQString file, int instance)
{
ThemesDlg* tw = getThemeWnd();
if(tw)
diff --git a/superkaramba/src/karambainterface.h b/superkaramba/src/karambainterface.h
index 1202cc5..8f4b2ae 100644
--- a/superkaramba/src/karambainterface.h
+++ b/superkaramba/src/karambainterface.h
@@ -21,21 +21,21 @@ class KarambaIface: virtual public dcopIface
public:
KarambaIface();
~KarambaIface();
- karamba* getKaramba(QString name);
+ karamba* getKaramba(TQString name);
ThemesDlg* getThemeWnd();
public slots:
- virtual void openTheme(QString filename);
- virtual void openNamedTheme(QString filename, QString name, bool is_sub_theme);
- virtual void closeTheme(QString name);
+ virtual void openTheme(TQString filename);
+ virtual void openNamedTheme(TQString filename, TQString name, bool is_sub_theme);
+ virtual void closeTheme(TQString name);
virtual void quit();
virtual void hideSystemTray(bool show);
virtual void showThemeDialog();
- virtual int themeAdded(QString appId, QString file);
- virtual void themeClosed(QString appId, QString file, int instance);
- virtual void themeNotify(QString name, QString text);
- virtual void setIncomingData(QString name, QString text);
+ virtual int themeAdded(TQString appId, TQString file);
+ virtual void themeClosed(TQString appId, TQString file, int instance);
+ virtual void themeNotify(TQString name, TQString text);
+ virtual void setIncomingData(TQString name, TQString text);
virtual bool isMainKaramba();
};
diff --git a/superkaramba/src/karambalistboxitem.cpp b/superkaramba/src/karambalistboxitem.cpp
index 703e3ef..e41b831 100644
--- a/superkaramba/src/karambalistboxitem.cpp
+++ b/superkaramba/src/karambalistboxitem.cpp
@@ -20,6 +20,6 @@
****************************************************************************/
#include "karambalistboxitem.h"
-KarambaListBoxItem::KarambaListBoxItem( QListBox* listbox, const QString & text ) : QListBoxText(listbox, text) {
+KarambaListBoxItem::KarambaListBoxItem( TQListBox* listbox, const TQString & text ) : TQListBoxText(listbox, text) {
}
diff --git a/superkaramba/src/karambalistboxitem.h b/superkaramba/src/karambalistboxitem.h
index 76427c2..782daea 100644
--- a/superkaramba/src/karambalistboxitem.h
+++ b/superkaramba/src/karambalistboxitem.h
@@ -19,13 +19,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
****************************************************************************/
#include "karamba.h"
-#include <qlistbox.h>
+#include <tqlistbox.h>
-class KarambaListBoxItem : public QListBoxText
+class KarambaListBoxItem : public TQListBoxText
{
public:
- QString appId;
- KarambaListBoxItem( QListBox* listbox, const QString & text=QString::null );
+ TQString appId;
+ KarambaListBoxItem( TQListBox* listbox, const TQString & text=TQString::null );
};
diff --git a/superkaramba/src/karambarootpixmap.cpp b/superkaramba/src/karambarootpixmap.cpp
index b733624..c2f0038 100644
--- a/superkaramba/src/karambarootpixmap.cpp
+++ b/superkaramba/src/karambarootpixmap.cpp
@@ -11,7 +11,7 @@
#include "karambarootpixmap.h"
#include "karamba.h"
-KarambaRootPixmap::KarambaRootPixmap(QWidget *w) :
+KarambaRootPixmap::KarambaRootPixmap(TQWidget *w) :
KRootPixmap( w)
{
widget = w;
diff --git a/superkaramba/src/karambarootpixmap.h b/superkaramba/src/karambarootpixmap.h
index 9445528..bedf1b0 100644
--- a/superkaramba/src/karambarootpixmap.h
+++ b/superkaramba/src/karambarootpixmap.h
@@ -10,7 +10,7 @@
#ifndef KARAMBAROOTPIXMAP_H
#define KARAMBAROOTPIXMAP_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <krootpixmap.h>
#include <ksharedpixmap.h>
@@ -23,7 +23,7 @@ class KarambaRootPixmap : public KRootPixmap
{
public:
//KarambaRootPixmap();
- KarambaRootPixmap( QWidget *);
+ KarambaRootPixmap( TQWidget *);
~KarambaRootPixmap();
@@ -31,7 +31,7 @@ public:
void updateBackground ( KSharedPixmap * );
private:
-QWidget *widget;
+TQWidget *widget;
};
diff --git a/superkaramba/src/karambasessionmanaged.cpp b/superkaramba/src/karambasessionmanaged.cpp
index eccff7e..952fb7d 100644
--- a/superkaramba/src/karambasessionmanaged.cpp
+++ b/superkaramba/src/karambasessionmanaged.cpp
@@ -24,7 +24,7 @@
#include <kconfig.h>
#include "karambasessionmanaged.h"
#include "karamba.h"
-#include "qwidgetlist.h"
+#include "tqwidgetlist.h"
bool KarambaSessionManaged::saveState(QSessionManager&)
{
@@ -32,20 +32,20 @@ bool KarambaSessionManaged::saveState(QSessionManager&)
config->setGroup("General Options");
- QString openThemes="";
+ TQString openThemes="";
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list ); // iterate over the widgets
- QWidget * w;
+ TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetListIt it( *list ); // iterate over the widgets
+ TQWidget * w;
while ( (w=it.current()) != 0 ) // for each widget...
{
++it;
- if (QString(w->name()).startsWith("karamba"))
+ if (TQString(w->name()).startsWith("karamba"))
{
karamba* k = (karamba*) w;
if (k->isSubTheme())
continue;
- openThemes += QFileInfo(k->theme().file()).absFilePath();
+ openThemes += TQFileInfo(k->theme().file()).absFilePath();
k->writeConfigData();
openThemes += ";";
}
diff --git a/superkaramba/src/kwidgetlistbox.cpp b/superkaramba/src/kwidgetlistbox.cpp
index 4749f64..d22d3c8 100644
--- a/superkaramba/src/kwidgetlistbox.cpp
+++ b/superkaramba/src/kwidgetlistbox.cpp
@@ -21,8 +21,8 @@
#include <kdebug.h>
#include <kglobalsettings.h>
-KWidgetListbox::KWidgetListbox(QWidget *parent, const char *name)
- : QTable(parent, name)
+KWidgetListbox::KWidgetListbox(TQWidget *parent, const char *name)
+ : TQTable(parent, name)
{
setNumRows(0);
setNumCols(1);
@@ -31,12 +31,12 @@ KWidgetListbox::KWidgetListbox(QWidget *parent, const char *name)
setTopMargin(0);
horizontalHeader()->hide();
verticalHeader()->hide();
- setSelectionMode(QTable::NoSelection);
- setFocusStyle(QTable::FollowStyle);
- connect(this, SIGNAL(currentChanged(int, int)),
- this, SLOT(selectionChanged(int, int)));
- setHScrollBarMode(QScrollView::AlwaysOff);
- setVScrollBarMode(QScrollView::Auto);
+ setSelectionMode(TQTable::NoSelection);
+ setFocusStyle(TQTable::FollowStyle);
+ connect(this, TQT_SIGNAL(currentChanged(int, int)),
+ this, TQT_SLOT(selectionChanged(int, int)));
+ setHScrollBarMode(TQScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::Auto);
}
KWidgetListbox::~KWidgetListbox()
@@ -51,7 +51,7 @@ void KWidgetListbox::clear()
setNumRows(0);
}
-int KWidgetListbox::insertItem(QWidget* item, int index)
+int KWidgetListbox::insertItem(TQWidget* item, int index)
{
int row;
@@ -69,7 +69,7 @@ int KWidgetListbox::insertItem(QWidget* item, int index)
return row;
}
-void KWidgetListbox::setSelected(QWidget* item)
+void KWidgetListbox::setSelected(TQWidget* item)
{
setSelected(index(item));
}
@@ -81,7 +81,7 @@ void KWidgetListbox::selectionChanged(int row, int col)
emit selected(row);
}
-void KWidgetListbox::removeItem(QWidget* item)
+void KWidgetListbox::removeItem(TQWidget* item)
{
removeItem(index(item));
}
@@ -102,17 +102,17 @@ int KWidgetListbox::selected() const
return currentRow();
}
-QWidget* KWidgetListbox::selectedItem() const
+TQWidget* KWidgetListbox::selectedItem() const
{
return item(selected());
}
-QWidget* KWidgetListbox::item(int index) const
+TQWidget* KWidgetListbox::item(int index) const
{
return cellWidget(index, 0);
}
-int KWidgetListbox::index(QWidget* itm) const
+int KWidgetListbox::index(TQWidget* itm) const
{
for(int i = 0; i < numRows(); ++i)
if(item(i) == itm)
@@ -148,7 +148,7 @@ void KWidgetListbox::updateColors()
void KWidgetListbox::setItemColors(int index, bool even)
{
- QWidget* itm = item(index);
+ TQWidget* itm = item(index);
if(index == selected())
{
@@ -185,14 +185,14 @@ void KWidgetListbox::showItems(show_callback func, void* data)
updateColors();
}
-void KWidgetListbox::showEvent(QShowEvent*)
+void KWidgetListbox::showEvent(TQShowEvent*)
{
//kdDebug() << k_funcinfo << endl;
repaintContents(false);
}
-void KWidgetListbox::paintCell(QPainter*, int, int, const QRect&,
- bool, const QColorGroup&)
+void KWidgetListbox::paintCell(TQPainter*, int, int, const TQRect&,
+ bool, const TQColorGroup&)
{
//kdDebug() << k_funcinfo << endl;
}
diff --git a/superkaramba/src/kwidgetlistbox.h b/superkaramba/src/kwidgetlistbox.h
index 62a52a8..ead6989 100644
--- a/superkaramba/src/kwidgetlistbox.h
+++ b/superkaramba/src/kwidgetlistbox.h
@@ -20,43 +20,43 @@
#ifndef KWIDGETLISTBOX_H
#define KWIDGETLISTBOX_H
-#include <qtable.h>
+#include <tqtable.h>
/**
@author See README for the list of authors
*/
-typedef bool (*show_callback) (int index, QWidget* widget, void* data);
+typedef bool (*show_callback) (int index, TQWidget* widget, void* data);
class KWidgetListbox : public QTable
{
Q_OBJECT
public:
- KWidgetListbox(QWidget *parent = 0, const char *name = 0);
+ KWidgetListbox(TQWidget *parent = 0, const char *name = 0);
~KWidgetListbox();
- int insertItem(QWidget* item, int index = -1);
- void setSelected(QWidget* item);
+ int insertItem(TQWidget* item, int index = -1);
+ void setSelected(TQWidget* item);
void setSelected(int index);
- void removeItem(QWidget* item);
+ void removeItem(TQWidget* item);
void removeItem(int index);
void clear();
int selected() const;
- QWidget* selectedItem() const;
- QWidget* item(int index) const;
- int index(QWidget* itm) const;
+ TQWidget* selectedItem() const;
+ TQWidget* item(int index) const;
+ int index(TQWidget* itm) const;
uint count() const { return numRows(); };
void showItems(show_callback func = 0, void* data = 0);
- void paintCell(QPainter* p, int row, int col, const QRect& cr,
- bool selected, const QColorGroup& cg);
+ void paintCell(TQPainter* p, int row, int col, const TQRect& cr,
+ bool selected, const TQColorGroup& cg);
protected:
void setItemColors(int index, bool even);
void updateColors();
bool even(int index);
- virtual void showEvent(QShowEvent* e);
+ virtual void showEvent(TQShowEvent* e);
protected slots:
void selectionChanged(int row, int col);
diff --git a/superkaramba/src/lineparser.cpp b/superkaramba/src/lineparser.cpp
index d923b6c..24d5468 100644
--- a/superkaramba/src/lineparser.cpp
+++ b/superkaramba/src/lineparser.cpp
@@ -21,9 +21,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
****************************************************************************/
#include "lineparser.h"
-#include <qregexp.h>
+#include <tqregexp.h>
-LineParser::LineParser(const QString& line)
+LineParser::LineParser(const TQString& line)
{
set(line);
}
@@ -32,42 +32,42 @@ LineParser::~LineParser()
{
}
-void LineParser::set(const QString& line)
+void LineParser::set(const TQString& line)
{
- QRegExp rx("^\\s*(\\S+)");
+ TQRegExp rx("^\\s*(\\S+)");
m_line = line;
rx.search(m_line);
m_meter = rx.cap(1).upper();
}
-int LineParser::getInt(QString w, int def) const
+int LineParser::getInt(TQString w, int def) const
{
- QRegExp rx( "\\W+" + w +"=([-]?\\d+)", false );
+ TQRegExp rx( "\\W+" + w +"=([-]?\\d+)", false );
if (rx.search(m_line) != -1)
return rx.cap(1).toInt();
else
return def;
}
-QColor LineParser::getColor(QString w, QColor def) const
+TQColor LineParser::getColor(TQString w, TQColor def) const
{
- QRegExp rx( "\\W+" + w + "=([-]?\\d+),([-]?\\d+),([-]?\\d+)", false );
+ TQRegExp rx( "\\W+" + w + "=([-]?\\d+),([-]?\\d+),([-]?\\d+)", false );
if (rx.search(m_line) != -1)
- return QColor(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt());
+ return TQColor(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt());
else
return def;
}
-QString LineParser::getString(QString w, QString def) const
+TQString LineParser::getString(TQString w, TQString def) const
{
- QString result;
- QRegExp rx( "\\W+" + w + "=\"([^\"]*)\"", false );
+ TQString result;
+ TQRegExp rx( "\\W+" + w + "=\"([^\"]*)\"", false );
bool found = (rx.search(m_line)==-1)?false:true;
if (rx.cap(1).isEmpty())
{
- rx = QRegExp(w + "=(\\S+)", false);
+ rx = TQRegExp(w + "=(\\S+)", false);
found = (rx.search(m_line)==-1)?false:true;
result = rx.cap(1);
}
@@ -81,9 +81,9 @@ QString LineParser::getString(QString w, QString def) const
return def;
}
-bool LineParser::getBoolean(QString w, bool def) const
+bool LineParser::getBoolean(TQString w, bool def) const
{
- QString boolean = getString(w, "-").lower();
+ TQString boolean = getString(w, "-").lower();
if(boolean == "-")
return def;
else if (boolean == "true") // true / false
diff --git a/superkaramba/src/lineparser.h b/superkaramba/src/lineparser.h
index b877e6c..b92385d 100644
--- a/superkaramba/src/lineparser.h
+++ b/superkaramba/src/lineparser.h
@@ -27,27 +27,27 @@
@author See README for the list of authors
*/
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class LineParser
{
public:
- LineParser(const QString& line = QString::null);
+ LineParser(const TQString& line = TQString::null);
~LineParser();
- void set(const QString& line);
+ void set(const TQString& line);
- int getInt(QString w, int def = 0) const;
- QColor getColor(QString w, QColor def = QColor()) const;
- QString getString(QString w, QString def = QString()) const;
- bool getBoolean(QString w, bool def = false) const;
+ int getInt(TQString w, int def = 0) const;
+ TQColor getColor(TQString w, TQColor def = TQColor()) const;
+ TQString getString(TQString w, TQString def = TQString()) const;
+ bool getBoolean(TQString w, bool def = false) const;
- const QString& meter() const { return m_meter; };
+ const TQString& meter() const { return m_meter; };
private:
- QString m_line;
- QString m_meter;
+ TQString m_line;
+ TQString m_meter;
};
#endif
diff --git a/superkaramba/src/main.cpp b/superkaramba/src/main.cpp
index 14c651c..4b7976f 100644
--- a/superkaramba/src/main.cpp
+++ b/superkaramba/src/main.cpp
@@ -21,15 +21,15 @@
****************************************************************************/
#include <karambaapp.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
#include <kconfig.h>
#include <kmainwindow.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kstandarddirs.h>
#include <kdeversion.h>
@@ -104,7 +104,7 @@ int main(int argc, char **argv)
KarambaSessionManaged ksm;
//karamba *mainWin = 0;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QStringList lst;
+ TQStringList lst;
int ret = 0;
// Create ~/.superkaramba if necessary
@@ -114,7 +114,7 @@ int main(int argc, char **argv)
KarambaApplication app;
- QString mainAppId = app.getMainKaramba();
+ TQString mainAppId = app.getMainKaramba();
if(!mainAppId.isEmpty())
{
app.initDcopStub(mainAppId.ascii());
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
KarambaApplication::unlockKaramba();
- app.connect(qApp,SIGNAL(lastWindowClosed()),qApp,SLOT(quit()));
+ app.connect(qApp,TQT_SIGNAL(lastWindowClosed()),qApp,TQT_SLOT(quit()));
// Try to restore a previous session if applicable.
app.checkPreviousSession(app, lst);
diff --git a/superkaramba/src/memsensor.cpp b/superkaramba/src/memsensor.cpp
index 21d9f35..dda7983 100644
--- a/superkaramba/src/memsensor.cpp
+++ b/superkaramba/src/memsensor.cpp
@@ -8,11 +8,11 @@
* (at your option) any later version. *
***************************************************************************/
#include "memsensor.h"
-#include <qfile.h>
-#include <qglobal.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqglobal.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#ifdef Q_OS_FREEBSD
#include <sys/time.h>
@@ -56,10 +56,10 @@ MemSensor::MemSensor(int msec) : Sensor(msec)
# if defined(Q_OS_FREEBSD) && defined(__FreeBSD_version) && __FreeBSD_version >= 500018
kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open");
# elif defined Q_OS_FREEBSD
- connect(&ksp, SIGNAL(receivedStdout(KProcess *, char *, int )),
- this,SLOT(receivedStdout(KProcess *, char *, int )));
- connect(&ksp, SIGNAL(processExited(KProcess *)),
- this,SLOT(processExited( KProcess * )));
+ connect(&ksp, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
+ this,TQT_SLOT(receivedStdout(KProcess *, char *, int )));
+ connect(&ksp, TQT_SIGNAL(processExited(KProcess *)),
+ this,TQT_SLOT(processExited( KProcess * )));
swapTotal = swapUsed = 0;
@@ -79,7 +79,7 @@ MemSensor::~MemSensor()
void MemSensor::receivedStdout(KProcess *, char *buffer, int len )
{
buffer[len] = 0;
- sensorResult += QString( QCString(buffer) );
+ sensorResult += TQString( TQCString(buffer) );
}
#else
void MemSensor::receivedStdout(KProcess *, char *, int)
@@ -90,9 +90,9 @@ void MemSensor::receivedStdout(KProcess *, char *, int)
void MemSensor::processExited(KProcess *)
{
#ifdef Q_OS_FREEBSD
- QStringList stringList = QStringList::split('\n',sensorResult);
+ TQStringList stringList = TQStringList::split('\n',sensorResult);
sensorResult = "";
- QStringList itemsList = QStringList::split(' ', stringList[1]);
+ TQStringList itemsList = TQStringList::split(' ', stringList[1]);
swapUsed = itemsList[2].toInt();
swapTotal = itemsList[1].toInt();
@@ -108,7 +108,7 @@ int MemSensor::getMemTotal()
sysctlbyname("hw.physmem", &mem, &size, NULL, 0);
return (mem / 1024);
#else
- QRegExp rx( "MemTotal:\\s*(\\d+)" );
+ TQRegExp rx( "MemTotal:\\s*(\\d+)" );
rx.search( meminfo );
return ( rx.cap(1).toInt() );
#endif
@@ -132,7 +132,7 @@ int MemSensor::getMemFree()
sysctl(mib,2,&uvmexp,&ssize,NULL,0);
return pagetok(uvmexp.free);
#else
- QRegExp rx( "MemFree:\\s*(\\d+)" );
+ TQRegExp rx( "MemFree:\\s*(\\d+)" );
rx.search( meminfo );
return ( rx.cap(1).toInt() );
#endif
@@ -153,7 +153,7 @@ int MemSensor::getBuffers()
sysctlbyname("vm.bufmem", &buf_mem, &size, NULL, 0);
return (buf_mem / 1024);
#else
- QRegExp rx( "Buffers:\\s*(\\d+)" );
+ TQRegExp rx( "Buffers:\\s*(\\d+)" );
rx.search( meminfo );
return ( rx.cap(1).toInt() );
#endif
@@ -170,8 +170,8 @@ int MemSensor::getCached()
#elif defined(Q_OS_NETBSD)
return 0;
#else
- QRegExp rx1( "Cached:\\s*(\\d+)" );
- QRegExp rx2( "SwapCached:\\s*(\\d+)" );
+ TQRegExp rx1( "Cached:\\s*(\\d+)" );
+ TQRegExp rx2( "SwapCached:\\s*(\\d+)" );
rx1.search( meminfo );
rx2.search( meminfo );
return ( rx1.cap(1).toInt() + rx2.cap(1).toInt() );
@@ -215,7 +215,7 @@ int MemSensor::getSwapTotal()
}
return STotal;
#else
- QRegExp rx( "SwapTotal:\\s*(\\d+)" );
+ TQRegExp rx( "SwapTotal:\\s*(\\d+)" );
rx.search( meminfo );
return ( rx.cap(1).toInt() );
#endif
@@ -260,7 +260,7 @@ int MemSensor::getSwapFree()
}
return SFree;
#else
- QRegExp rx( "SwapFree:\\s*(\\d+)" );
+ TQRegExp rx( "SwapFree:\\s*(\\d+)" );
rx.search( meminfo );
return ( rx.cap(1).toInt() );
#endif
@@ -275,11 +275,11 @@ void MemSensor::readValues()
ksp.start( KProcess::NotifyOnExit,KProcIO::Stdout);
# endif
#else
- QFile file("/proc/meminfo");
- QString line;
+ TQFile file("/proc/meminfo");
+ TQString line;
if ( file.open(IO_ReadOnly | IO_Translate) )
{
- QTextStream t( &file ); // use a text stream
+ TQTextStream t( &file ); // use a text stream
meminfo = t.read();
file.close();
}
@@ -289,10 +289,10 @@ void MemSensor::readValues()
void MemSensor::update()
{
readValues();
- QString format;
+ TQString format;
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
#if defined(Q_OS_FREEBSD) && !(defined(__FreeBSD_version) && __FreeBSD_version >= 500018)
bool set = false;
#endif
@@ -318,17 +318,17 @@ void MemSensor::update()
format = "%um";
}
- format.replace( QRegExp("%fmb", false), QString::number( (int)(( totalMem - usedMemNoBuffers)/1024.0+0.5)));
- format.replace( QRegExp("%fm", false), QString::number( (int)( ( totalMem - usedMem )/1024.0+0.5) ));
+ format.replace( TQRegExp("%fmb", false), TQString::number( (int)(( totalMem - usedMemNoBuffers)/1024.0+0.5)));
+ format.replace( TQRegExp("%fm", false), TQString::number( (int)( ( totalMem - usedMem )/1024.0+0.5) ));
- format.replace( QRegExp("%umb", false), QString::number( (int)((usedMemNoBuffers)/1024.0+0.5)));
- format.replace( QRegExp("%um", false), QString::number( (int)((usedMem)/1024.0+0.5 )));
+ format.replace( TQRegExp("%umb", false), TQString::number( (int)((usedMemNoBuffers)/1024.0+0.5)));
+ format.replace( TQRegExp("%um", false), TQString::number( (int)((usedMem)/1024.0+0.5 )));
- format.replace( QRegExp("%tm", false), QString::number( (int)( (totalMem)/1024.0+0.5)));
+ format.replace( TQRegExp("%tm", false), TQString::number( (int)( (totalMem)/1024.0+0.5)));
- format.replace( QRegExp("%fs", false), QString::number( (int)((totalSwap - usedSwap)/1024.0+0.5)));
- format.replace( QRegExp("%us", false), QString::number( (int)(usedSwap/1024.0+0.5)));
- format.replace( QRegExp("%ts", false), QString::number( (int)(totalSwap/1024.0+0.5)));
+ format.replace( TQRegExp("%fs", false), TQString::number( (int)((totalSwap - usedSwap)/1024.0+0.5)));
+ format.replace( TQRegExp("%us", false), TQString::number( (int)(usedSwap/1024.0+0.5)));
+ format.replace( TQRegExp("%ts", false), TQString::number( (int)(totalSwap/1024.0+0.5)));
meter->setValue(format);
++it;
@@ -343,7 +343,7 @@ void MemSensor::setMaxValue( SensorParams *sp )
{
Meter *meter;
meter = sp->getMeter();
- QString f;
+ TQString f;
f = sp->getParam("FORMAT");
if (f.length() == 0 )
diff --git a/superkaramba/src/memsensor.h b/superkaramba/src/memsensor.h
index a9e425e..4a1f0e0 100644
--- a/superkaramba/src/memsensor.h
+++ b/superkaramba/src/memsensor.h
@@ -10,9 +10,9 @@
#ifndef MEMSENSOR_H
#define MEMSENSOR_H
#include "sensor.h"
-#include <qglobal.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <kprocess.h>
#ifdef __FreeBSD__
@@ -39,14 +39,14 @@ public:
void update();
void setMaxValue( SensorParams *sp );
- QString getMemLine();
+ TQString getMemLine();
private:
- QString meminfo;
+ TQString meminfo;
void readValues();
#if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
int pageshift; /* log base 2 of the pagesize */
- QString sensorResult;
+ TQString sensorResult;
int swapTotal;
int swapUsed;
# if defined(Q_OS_FREEBSD) && defined(__FreeBSD_version) && __FreeBSD_version >= 500018
diff --git a/superkaramba/src/menu_python.cpp b/superkaramba/src/menu_python.cpp
index 0a85836..11e5a15 100644
--- a/superkaramba/src/menu_python.cpp
+++ b/superkaramba/src/menu_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
@@ -40,8 +40,8 @@ long createMenu(long widget)
KPopupMenu* tmp = new KPopupMenu(currTheme);
currTheme->menuList->append (tmp );
- currTheme->connect(tmp, SIGNAL(activated(int)), currTheme,
- SLOT(passMenuItemClicked(int)));
+ currTheme->connect(tmp, TQT_SIGNAL(activated(int)), currTheme,
+ TQT_SLOT(passMenuItemClicked(int)));
return (long)tmp;
}
@@ -99,7 +99,7 @@ PyObject* py_delete_menu(PyObject *, PyObject *args)
return Py_BuildValue((char*)"l", deleteMenu(widget, menu));
}
-long addMenuItem(long widget, long menu, QString text, QString icon)
+long addMenuItem(long widget, long menu, TQString text, TQString icon)
{
karamba* currTheme = (karamba*)widget;
KPopupMenu* tmp = (KPopupMenu*)menu;
@@ -119,10 +119,10 @@ PyObject* py_add_menu_item(PyObject *, PyObject *args)
PyObject* t;
if (!PyArg_ParseTuple(args, (char*)"llOs:addMenuItem", &widget, &menu, &t, &i))
return NULL;
- QString icon;
- QString text;
+ TQString icon;
+ TQString text;
icon.setAscii(i);
- text = PyString2QString(t);
+ text = PyString2TQString(t);
return Py_BuildValue((char*)"l", addMenuItem(widget, menu, text, icon));
}
@@ -181,7 +181,7 @@ long popupMenu(long widget, long menu, long x, long y)
if(menuExists(currTheme,tmp))
{
- tmp->popup(currTheme->mapToGlobal( QPoint(x,y) ));
+ tmp->popup(currTheme->mapToGlobal( TQPoint(x,y) ));
return 1;
}
else
diff --git a/superkaramba/src/meter.cpp b/superkaramba/src/meter.cpp
index efc8a13..e9030e6 100644
--- a/superkaramba/src/meter.cpp
+++ b/superkaramba/src/meter.cpp
@@ -27,7 +27,7 @@ Meter::~Meter()
{
}
-bool Meter::click(QMouseEvent*)
+bool Meter::click(TQMouseEvent*)
{
return false;
}
@@ -38,7 +38,7 @@ void Meter::setSize(int ix, int iy, int iw, int ih)
recalculateValue();
}
-void Meter::setThemePath( QString path )
+void Meter::setThemePath( TQString path )
{
themePath = path;
}
@@ -88,7 +88,7 @@ void Meter::setHeight(int height)
recalculateValue();
}
-QRect Meter::getBoundingBox()
+TQRect Meter::getBoundingBox()
{
return boundingBox;
}
diff --git a/superkaramba/src/meter.h b/superkaramba/src/meter.h
index 8d1aeaf..ecd84e6 100644
--- a/superkaramba/src/meter.h
+++ b/superkaramba/src/meter.h
@@ -10,13 +10,13 @@
#ifndef METER_H
#define METER_H
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
class karamba;
@@ -44,55 +44,55 @@ public:
virtual long getMax() { return minValue; };
virtual long getMin() { return maxValue; };
- void setThemePath( QString );
+ void setThemePath( TQString );
- virtual void mUpdate(QPainter *)=0 ;
+ virtual void mUpdate(TQPainter *)=0 ;
virtual void setValue(long) {};
virtual long getValue() { return -1; };
- virtual void setValue(QString) {};
- virtual QString getStringValue() const { return QString::null; };
+ virtual void setValue(TQString) {};
+ virtual TQString getStringValue() const { return TQString::null; };
virtual void recalculateValue() {};
- virtual void setColor(QColor clr) { color = clr; };
- virtual QColor getColor() { return color; };
+ virtual void setColor(TQColor clr) { color = clr; };
+ virtual TQColor getColor() { return color; };
virtual void show() { hidden = 0; };
virtual void hide() { hidden = 1; };
- QRect getBoundingBox();
+ TQRect getBoundingBox();
// true when given coordinate point is inside the meters
// active reagion and meter is enabled
virtual bool insideActiveArea(int, int);
// returns true when callback meterClicked should be called.
- virtual bool click( QMouseEvent* );
+ virtual bool click( TQMouseEvent* );
void setEnabled(bool);
bool isEnabled();
/*
- void setOnClick( QString );
- void setOnMiddleClick( QString );
+ void setOnClick( TQString );
+ void setOnMiddleClick( TQString );
*/
protected: // Protected attributes
- QString themePath;
+ TQString themePath;
- QRect boundingBox;
+ TQRect boundingBox;
// Actions to execute when clicked on meter
- QString leftButtonAction;
- QString middleButtonAction;
- QString rightButtonAction;
+ TQString leftButtonAction;
+ TQString middleButtonAction;
+ TQString rightButtonAction;
bool clickable;
int hidden;
long minValue;
long maxValue;
- QColor color;
+ TQColor color;
karamba* m_karamba;
};
diff --git a/superkaramba/src/meter_python.cpp b/superkaramba/src/meter_python.cpp
index 029820d..b8e1153 100644
--- a/superkaramba/src/meter_python.cpp
+++ b/superkaramba/src/meter_python.cpp
@@ -13,7 +13,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "karambaapp.h"
#include "meter.h"
@@ -36,7 +36,7 @@ bool checkKaramba(long widget)
}
if (!karambaApp->hasKaramba((karamba*)widget))
{
- QString tmp;
+ TQString tmp;
tmp.sprintf("no %x widget found.", (unsigned int)widget);
PyErr_SetString(PyExc_ValueError, tmp.ascii());
@@ -54,15 +54,15 @@ bool checkMeter(long widget, long meter, const char* type)
}
if (!((karamba*)widget)->hasMeter((Meter*)meter))
{
- QString tmp;
+ TQString tmp;
tmp.sprintf("widget does not have meter %x.", (unsigned int)meter);
PyErr_SetString(PyExc_ValueError, tmp.ascii());
return false;
}
- if (!((QObject*)meter)->isA(type))
+ if (!((TQObject*)meter)->isA(type))
{
- QString tmp;
+ TQString tmp;
tmp.sprintf("meter is not type of %s.", type);
PyErr_SetString(PyExc_TypeError, tmp.ascii());
@@ -78,21 +78,21 @@ bool checkKarambaAndMeter(long widget, long meter, const char* type)
// This just throws awya extra bytes.
// I guess there is a better way to do this...
-QString fromUcs4(Q_UINT32* ucs4)
+TQString fromUcs4(Q_UINT32* ucs4)
{
- QString result = "";
+ TQString result = "";
while(*ucs4 != 0)
{
- result += QChar((Q_UINT16)*ucs4);
+ result += TQChar((Q_UINT16)*ucs4);
++ucs4;
}
return result;
}
-// Converts a Python String to a QString with Unicode support
-QString PyString2QString(PyObject* text)
+// Converts a Python String to a TQString with Unicode support
+TQString PyString2TQString(PyObject* text)
{
- QString qtext;
+ TQString qtext;
if (PyString_CheckExact(text))
{
char* t = PyString_AsString(text);
@@ -104,7 +104,7 @@ QString PyString2QString(PyObject* text)
if(sizeof(Py_UNICODE) == 4)
qtext = fromUcs4((Q_UINT32*)t);
else
- qtext = QString::fromUcs2((Q_UINT16*)t);
+ qtext = TQString::fromUcs2((Q_UINT16*)t);
}
else
{
@@ -113,8 +113,8 @@ QString PyString2QString(PyObject* text)
return qtext;
}
-// Converts a QString to a Python String with Unicode support
-PyObject* QString2PyString(QString string)
+// Converts a TQString to a Python String with Unicode support
+PyObject* QString2PyString(TQString string)
{
PyObject *pyString;
@@ -157,7 +157,7 @@ PyObject* QString2PyString(QString string)
long getMeter(long widget, char* name)
{
karamba* theme = (karamba*)widget;
- QObjectListIt it( *theme->meterList ); // iterate over meters
+ TQObjectListIt it( *theme->meterList ); // iterate over meters
while ( it != 0 )
{
@@ -168,7 +168,7 @@ long getMeter(long widget, char* name)
return 0;
}
-PyObject* py_getThemeMeter(PyObject *, PyObject *args, QString type)
+PyObject* py_getThemeMeter(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
char* name;
@@ -184,7 +184,7 @@ PyObject* py_getThemeMeter(PyObject *, PyObject *args, QString type)
return (Py_BuildValue((char*)"l", meter));
}
-PyObject* py_getSize(PyObject *, PyObject *args, QString type)
+PyObject* py_getSize(PyObject *, PyObject *args, TQString type)
{
long widget;
long meter;
@@ -196,7 +196,7 @@ PyObject* py_getSize(PyObject *, PyObject *args, QString type)
((Meter*)meter)->getHeight());
}
-PyObject* py_resize(PyObject *, PyObject *args, QString type)
+PyObject* py_resize(PyObject *, PyObject *args, TQString type)
{
long widget, meter, x, y;
if (!PyArg_ParseTuple(args, (char*)"llll", &widget, &meter, &x, &y))
@@ -208,7 +208,7 @@ PyObject* py_resize(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_getPos(PyObject *, PyObject *args, QString type)
+PyObject* py_getPos(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
@@ -219,7 +219,7 @@ PyObject* py_getPos(PyObject *, PyObject *args, QString type)
((Meter*)meter)->getY());
}
-PyObject* py_move(PyObject *, PyObject *args, QString type)
+PyObject* py_move(PyObject *, PyObject *args, TQString type)
{
long widget, meter, x, y;
if (!PyArg_ParseTuple(args, (char*)"llll", &widget, &meter, &x, &y))
@@ -232,7 +232,7 @@ PyObject* py_move(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_hide(PyObject *, PyObject *args, QString type)
+PyObject* py_hide(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
@@ -243,7 +243,7 @@ PyObject* py_hide(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_show(PyObject *, PyObject *args, QString type)
+PyObject* py_show(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
@@ -254,7 +254,7 @@ PyObject* py_show(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_getValue(PyObject *, PyObject *args, QString type)
+PyObject* py_getValue(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
@@ -264,7 +264,7 @@ PyObject* py_getValue(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", ((Meter*)meter)->getValue());
}
-PyObject* py_setValue(PyObject *, PyObject *args, QString type)
+PyObject* py_setValue(PyObject *, PyObject *args, TQString type)
{
long widget, meter, l;
if (!PyArg_ParseTuple(args, (char*)"lll", &widget, &meter, &l))
@@ -275,7 +275,7 @@ PyObject* py_setValue(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", ((long)meter));
}
-PyObject* py_getStringValue(PyObject *, PyObject *args, QString type)
+PyObject* py_getStringValue(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
@@ -286,7 +286,7 @@ PyObject* py_getStringValue(PyObject *, PyObject *args, QString type)
QString2PyString(((Meter*)meter)->getStringValue()));
}
-PyObject* py_setStringValue(PyObject *, PyObject *args, QString type)
+PyObject* py_setStringValue(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
PyObject* s;
@@ -296,11 +296,11 @@ PyObject* py_setStringValue(PyObject *, PyObject *args, QString type)
return NULL;
if (!checkKarambaAndMeter(widget, meter, type.ascii()))
return NULL;
- ((Meter*)meter)->setValue(PyString2QString(s));
+ ((Meter*)meter)->setValue(PyString2TQString(s));
return Py_BuildValue((char*)"l", ((long)meter));
}
-PyObject* py_getMinMax(PyObject *, PyObject *args, QString type)
+PyObject* py_getMinMax(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
@@ -311,7 +311,7 @@ PyObject* py_getMinMax(PyObject *, PyObject *args, QString type)
((Meter*)meter)->getMax());
}
-PyObject* py_setMinMax(PyObject *, PyObject *args, QString type)
+PyObject* py_setMinMax(PyObject *, PyObject *args, TQString type)
{
long widget, meter, x, y;
if (!PyArg_ParseTuple(args, (char*)"llll", &widget, &meter, &x, &y))
@@ -323,10 +323,10 @@ PyObject* py_setMinMax(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_getSensor(PyObject *, PyObject *args, QString type)
+PyObject* py_getSensor(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
- QString s;
+ TQString s;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
return NULL;
if (!checkKarambaAndMeter(widget, meter, type.ascii()))
@@ -335,7 +335,7 @@ PyObject* py_getSensor(PyObject *, PyObject *args, QString type)
((karamba*)widget)->getSensor((Meter*)meter).ascii());
}
-PyObject* py_setSensor(PyObject *, PyObject *args, QString type)
+PyObject* py_setSensor(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
char* s;
@@ -348,7 +348,7 @@ PyObject* py_setSensor(PyObject *, PyObject *args, QString type)
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_setColor(PyObject *, PyObject *args, QString type)
+PyObject* py_setColor(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
long r, g, b;
@@ -356,18 +356,18 @@ PyObject* py_setColor(PyObject *, PyObject *args, QString type)
return NULL;
if (!checkKarambaAndMeter(widget, meter, type.ascii()))
return NULL;
- ((Meter*)meter)->setColor(QColor(r, g, b));
+ ((Meter*)meter)->setColor(TQColor(r, g, b));
return Py_BuildValue((char*)"l", 1);
}
-PyObject* py_getColor(PyObject *, PyObject *args, QString type)
+PyObject* py_getColor(PyObject *, PyObject *args, TQString type)
{
long widget, meter;
if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
return NULL;
if (!checkKarambaAndMeter(widget, meter, type.ascii()))
return NULL;
- QColor color = ((Meter*)meter)->getColor();
+ TQColor color = ((Meter*)meter)->getColor();
return Py_BuildValue((char*)"(i,i,i)", color.red(), color.green(), color.blue());
}
diff --git a/superkaramba/src/meter_python.h b/superkaramba/src/meter_python.h
index f064977..0773ee3 100644
--- a/superkaramba/src/meter_python.h
+++ b/superkaramba/src/meter_python.h
@@ -19,26 +19,26 @@ bool checkKaramba(long widget);
bool checkMeter(long widget, long meter, const char* type);
bool checkKarambaAndMeter(long widget, long meter, const char* type);
-QString PyString2QString(PyObject* text);
-PyObject* QString2PyString(QString string);
+TQString PyString2TQString(PyObject* text);
+PyObject* QString2PyString(TQString string);
-PyObject* py_getThemeMeter(PyObject *self, PyObject *args, QString type);
-PyObject* py_getSize(PyObject *self, PyObject *args, QString type);
-PyObject* py_resize(PyObject *self, PyObject *args, QString type);
-PyObject* py_getPos(PyObject *self, PyObject *args, QString type);
-PyObject* py_move(PyObject *self, PyObject *args, QString type);
-PyObject* py_hide(PyObject *self, PyObject *args, QString type);
-PyObject* py_show(PyObject *self, PyObject *args, QString type);
-PyObject* py_getValue(PyObject *self, PyObject *args, QString type);
-PyObject* py_setValue(PyObject *self, PyObject *args, QString type);
-PyObject* py_getStringValue(PyObject *self, PyObject *args, QString type);
-PyObject* py_setStringValue(PyObject *self, PyObject *args, QString type);
-PyObject* py_getMinMax(PyObject *self, PyObject *args, QString type);
-PyObject* py_setMinMax(PyObject *self, PyObject *args, QString type);
-PyObject* py_getSensor(PyObject *self, PyObject *args, QString type);
-PyObject* py_setSensor(PyObject *self, PyObject *args, QString type);
-PyObject* py_getColor(PyObject *self, PyObject *args, QString type);
-PyObject* py_setColor(PyObject *self, PyObject *args, QString type);
+PyObject* py_getThemeMeter(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getSize(PyObject *self, PyObject *args, TQString type);
+PyObject* py_resize(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getPos(PyObject *self, PyObject *args, TQString type);
+PyObject* py_move(PyObject *self, PyObject *args, TQString type);
+PyObject* py_hide(PyObject *self, PyObject *args, TQString type);
+PyObject* py_show(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getValue(PyObject *self, PyObject *args, TQString type);
+PyObject* py_setValue(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getStringValue(PyObject *self, PyObject *args, TQString type);
+PyObject* py_setStringValue(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getMinMax(PyObject *self, PyObject *args, TQString type);
+PyObject* py_setMinMax(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getSensor(PyObject *self, PyObject *args, TQString type);
+PyObject* py_setSensor(PyObject *self, PyObject *args, TQString type);
+PyObject* py_getColor(PyObject *self, PyObject *args, TQString type);
+PyObject* py_setColor(PyObject *self, PyObject *args, TQString type);
#endif // METER_PYTHON_H
diff --git a/superkaramba/src/misc_python.cpp b/superkaramba/src/misc_python.cpp
index ba67573..891d53f 100644
--- a/superkaramba/src/misc_python.cpp
+++ b/superkaramba/src/misc_python.cpp
@@ -28,8 +28,8 @@
#endif
#include <Python.h>
-#include <qglobal.h>
-#include <qobject.h>
+#include <tqglobal.h>
+#include <tqobject.h>
#include <kglobal.h>
#include <klocale.h>
@@ -75,9 +75,9 @@ PyObject* py_run_command(PyObject*, PyObject* args)
lst == NULL || !PyList_Check(lst))
return NULL;
- QString n;
- QString c;
- QString i;
+ TQString n;
+ TQString c;
+ TQString i;
n.setAscii(name);
c.setAscii(command);
@@ -88,7 +88,7 @@ PyObject* py_run_command(PyObject*, PyObject* args)
for (int i = 0; i < PyList_Size(lst); i++)
{
- l.append(PyString2QString(PyList_GetItem(lst, i)));
+ l.append(PyString2TQString(PyList_GetItem(lst, i)));
}
KRun::run(svc, l);
return Py_BuildValue("l", 1);
@@ -101,7 +101,7 @@ PyObject* py_execute_command(PyObject *, PyObject* args)
if (!PyArg_ParseTuple(args, (char*)"O:execute", &s))
return NULL;
- return Py_BuildValue((char*)"l", KRun::runCommand(PyString2QString(s)));
+ return Py_BuildValue((char*)"l", KRun::runCommand(PyString2TQString(s)));
}
// Runs a command, returns 0 if it could not start command
@@ -112,7 +112,7 @@ PyObject* py_execute_command_interactive(PyObject *, PyObject* args)
// return NULL;
int numLines; /* how many lines we passed for parsing */
- QString line; /* pointer to the line as a string */
+ TQString line; /* pointer to the line as a string */
PyObject * listObj; /* the list of strings */
PyObject * strObj; /* one string in the list */
@@ -142,26 +142,26 @@ PyObject* py_execute_command_interactive(PyObject *, PyObject* args)
strObj = PyList_GetItem(listObj, i); /* Can't fail */
/* make it a string */
- line = PyString2QString(strObj);
+ line = PyString2TQString(strObj);
/* now do the parsing */
*(currTheme->currProcess) << line;
}
- QApplication::connect(currTheme->currProcess,
- SIGNAL(processExited(KProcess *)),
+ TQApplication::connect(currTheme->currProcess,
+ TQT_SIGNAL(processExited(KProcess *)),
currTheme,
- SLOT(processExited(KProcess *)));
- QApplication::connect(currTheme->currProcess,
- SIGNAL(receivedStdout(KProcess *, char *, int)),
+ TQT_SLOT(processExited(KProcess *)));
+ TQApplication::connect(currTheme->currProcess,
+ TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
currTheme,
- SLOT(receivedStdout(KProcess *, char *, int)));
+ TQT_SLOT(receivedStdout(KProcess *, char *, int)));
currTheme->currProcess->start(KProcess::NotifyOnExit, KProcess::Stdout);
return Py_BuildValue((char*)"l", (int)(currTheme->currProcess->pid()));
}
-long attachClickArea(long widget, long meter, QString LeftButton, QString MiddleButton, QString RightButton)
+long attachClickArea(long widget, long meter, TQString LeftButton, TQString MiddleButton, TQString RightButton)
{
karamba* currTheme = (karamba*) widget;
Meter* currMeter = (Meter*) meter;
@@ -212,7 +212,7 @@ PyObject* py_attach_clickArea(PyObject*, PyObject* args, PyObject* dict)
return NULL;
if (!checkKaramba(widget))
return NULL;
- QString lB, mB, rB;
+ TQString lB, mB, rB;
if (LeftButton != NULL)
{
lB.setAscii(LeftButton);
@@ -342,7 +342,7 @@ PyObject* py_read_theme_file(PyObject *, PyObject *args)
if (!checkKaramba(widget))
return NULL;
karamba* k = (karamba*)widget;
- QByteArray ba = k->theme().readThemeFile(file);
+ TQByteArray ba = k->theme().readThemeFile(file);
return PyString_FromStringAndSize(ba.data(), ba.size());
}
@@ -363,9 +363,9 @@ long createServiceClickArea(long widget, long x, long y, long w, long h, char *n
karamba* currTheme = (karamba*)widget;
ClickArea *tmp = new ClickArea( currTheme, x, y, w, h );
- QString n;
- QString e;
- QString i;
+ TQString n;
+ TQString e;
+ TQString i;
n.setAscii(name);
e.setAscii(exec);
@@ -381,7 +381,7 @@ long createClickArea(long widget, long x, long y, long w, long h, char* text) {
karamba* currTheme = (karamba*)widget;
ClickArea *tmp = new ClickArea(currTheme, x, y, w, h );
- QString onclick;
+ TQString onclick;
onclick.setAscii(text);
@@ -428,7 +428,7 @@ static long callTheme(long widget, char* path, char *str)
karamba* currTheme = (karamba*) widget;
if (currTheme)
- currTheme->callTheme(QString(path), QString(str));
+ currTheme->callTheme(TQString(path), TQString(str));
return (long)currTheme;
}
@@ -438,19 +438,19 @@ static long setIncomingData(long widget, char* path, char *obj)
karamba* currTheme = (karamba*) widget;
if (currTheme)
- currTheme->setIncomingData(QString(path), QString(obj));
+ currTheme->setIncomingData(TQString(path), TQString(obj));
return (long)currTheme;
}
-static QString getIncomingData(long widget)
+static TQString getIncomingData(long widget)
{
karamba* currTheme = (karamba*) widget;
if (currTheme)
return currTheme->getIncomingData();
- return QString("");
+ return TQString("");
}
/*
@@ -461,16 +461,16 @@ static QString getIncomingData(long widget)
*/
long openNamedTheme(char* path, char *name, bool is_sub_theme) {
- QString filename;
+ TQString filename;
karamba* currTheme = 0;
filename.setAscii(path);
- QFileInfo file( filename );
+ TQFileInfo file( filename );
if( file.exists() )
{
- QCString prettyName(name);
+ TQCString prettyName(name);
KarambaApplication* app = (KarambaApplication*)qApp;
if (!app->themeExists(prettyName))
{
@@ -486,16 +486,16 @@ long openNamedTheme(char* path, char *name, bool is_sub_theme) {
long openTheme(char* path)
{
- QString filename;
+ TQString filename;
karamba* currTheme = 0;
filename.setAscii(path);
- QFileInfo file( filename );
+ TQFileInfo file( filename );
if( file.exists() )
{
- currTheme = new karamba( filename, QString() );
+ currTheme = new karamba( filename, TQString() );
currTheme->show();
}
@@ -582,7 +582,7 @@ int translateAll(long widget, int x, int y)
{
karamba* currTheme = (karamba*)widget;
- QObjectListIt it2( *currTheme->meterList ); // iterate over meters
+ TQObjectListIt it2( *currTheme->meterList ); // iterate over meters
while ( it2 != 0 )
{
@@ -660,7 +660,7 @@ PyObject* py_hide(PyObject *, PyObject *args)
#include <sys/sockio.h>
#endif
/* now a method we need to expose to Python */
-QString getIp(char *device_name)
+TQString getIp(char *device_name)
{
int i, sd, numdevs;
struct ifconf ifc_conf;
@@ -668,7 +668,7 @@ QString getIp(char *device_name)
struct ifreq *devptr;
int ifc_conf_buf_size;
static struct in_addr host;
- QString retval;
+ TQString retval;
retval = "Disconnected";
diff --git a/superkaramba/src/networksensor.cpp b/superkaramba/src/networksensor.cpp
index 30f9612..09de816 100644
--- a/superkaramba/src/networksensor.cpp
+++ b/superkaramba/src/networksensor.cpp
@@ -16,7 +16,7 @@
#include "networksensor.h"
-NetworkSensor::NetworkSensor( QString dev, int interval ):Sensor( interval )
+NetworkSensor::NetworkSensor( TQString dev, int interval ):Sensor( interval )
{
device = dev.lower();
@@ -50,7 +50,7 @@ NetworkSensor::NetworkSensor( QString dev, int interval ):Sensor( interval )
sysctl(name, 6, (void*)&if_mib, (size_t*)&if_miblen, (void*)NULL, (size_t)0);
/* We found the right interface? */
- if (QString(if_mib.ifmd_name) == device) {
+ if (TQString(if_mib.ifmd_name) == device) {
if_number = i;
break;
}
@@ -96,11 +96,11 @@ void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const
out = 0;
}
#else
- QFile file("/proc/net/dev");
- QString line;
+ TQFile file("/proc/net/dev");
+ TQString line;
if ( file.open(IO_ReadOnly | IO_Translate) )
{
- QTextStream t( &file ); // use a text stream
+ TQTextStream t( &file ); // use a text stream
line = t.readLine();
while(line !=0 && !line.contains(device))
{
@@ -108,7 +108,7 @@ void NetworkSensor::getInOutBytes ( unsigned long &in,unsigned long &out) const
}
if ( line.contains( device ) )
{
- QRegExp rx( "\\W+"+device+":\\D*(\\d+)(?:\\D+\\d+){7}\\D+(\\d+)", false);
+ TQRegExp rx( "\\W+"+device+":\\D*(\\d+)(?:\\D+\\d+){7}\\D+(\\d+)", false);
rx.search(line);
in = rx.cap(1).toULong();
out = rx.cap(2).toULong();
@@ -128,8 +128,8 @@ void NetworkSensor::update()
{
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
- QString format;
+ TQObjectListIt it( *objList );
+ TQString format;
int decimals;
unsigned long inB, outB;
@@ -148,11 +148,11 @@ void NetworkSensor::update()
format = "%in";
}
- format.replace( QRegExp("%inkb", false), QString::number( ((inB - receivedBytes)*8)/delay, 'f', decimals ) );
- format.replace( QRegExp("%in", false), QString::number( (inB - receivedBytes)/delay, 'f', decimals ) );
+ format.replace( TQRegExp("%inkb", false), TQString::number( ((inB - receivedBytes)*8)/delay, 'f', decimals ) );
+ format.replace( TQRegExp("%in", false), TQString::number( (inB - receivedBytes)/delay, 'f', decimals ) );
- format.replace( QRegExp("%outkb", false), QString::number( ((outB - transmittedBytes)*8)/delay, 'f', decimals ) );
- format.replace( QRegExp("%out", false), QString::number( (outB - transmittedBytes)/delay, 'f', decimals ) );
+ format.replace( TQRegExp("%outkb", false), TQString::number( ((outB - transmittedBytes)*8)/delay, 'f', decimals ) );
+ format.replace( TQRegExp("%out", false), TQString::number( (outB - transmittedBytes)/delay, 'f', decimals ) );
meter->setValue( format );
++it;
diff --git a/superkaramba/src/networksensor.h b/superkaramba/src/networksensor.h
index bbdbd13..90878a8 100644
--- a/superkaramba/src/networksensor.h
+++ b/superkaramba/src/networksensor.h
@@ -12,9 +12,9 @@
#include "sensor.h"
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#ifdef __FreeBSD__
#include <sys/types.h>
#include <sys/socket.h>
@@ -26,7 +26,7 @@ class NetworkSensor : public Sensor
{
Q_OBJECT
public:
- NetworkSensor( QString device, int interval );
+ NetworkSensor( TQString device, int interval );
~NetworkSensor();
void update();
@@ -34,8 +34,8 @@ public:
private:
unsigned long receivedBytes;
unsigned long transmittedBytes;
- QTime netTimer;
- QString device;
+ TQTime netTimer;
+ TQString device;
#ifdef __FreeBSD__
int if_number;
ifmibdata if_mib;
diff --git a/superkaramba/src/noatunsensor.cpp b/superkaramba/src/noatunsensor.cpp
index 607da9e..57f25f1 100644
--- a/superkaramba/src/noatunsensor.cpp
+++ b/superkaramba/src/noatunsensor.cpp
@@ -23,12 +23,12 @@ NoatunSensor::~NoatunSensor()
void NoatunSensor::update()
{
- QString format;
+ TQString format;
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
- QString title;
+ TQString title;
int songLength = 0;
int currentTime = 0;
@@ -77,17 +77,17 @@ void NoatunSensor::update()
else
{
- format.replace( QRegExp("%title", false), title );
- format.replace( QRegExp("%id", false), noatunID );
+ format.replace( TQRegExp("%title", false), title );
+ format.replace( TQRegExp("%id", false), noatunID );
- format.replace( QRegExp("%length", false), QTime( 0,0,0 ).
+ format.replace( TQRegExp("%length", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.toString( "h:mm:ss" ) );
- format.replace( QRegExp("%time", false), QTime( 0,0,0 ).
+ format.replace( TQRegExp("%time", false), TQTime( 0,0,0 ).
addMSecs( currentTime )
.toString( "h:mm:ss" ) );
- format.replace( QRegExp("%remain", false), QTime( 0,0,0 ).
+ format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.addMSecs(-currentTime )
.toString( "h:mm:ss" ) );
@@ -109,9 +109,9 @@ void NoatunSensor::update()
bool NoatunSensor::isRunning()
{
- QRegExp rx("(noatun)|(noatun-\\d+)");
+ TQRegExp rx("(noatun)|(noatun-\\d+)");
QCStringList list = client->registeredApplications();
- QValueList<QCString>::iterator it;
+ TQValueList<TQCString>::iterator it;
it = list.begin();
bool foundNoatun = false;
noatunID = "noatun";
@@ -128,12 +128,12 @@ bool NoatunSensor::isRunning()
}
-QString NoatunSensor::getTitle()
+TQString NoatunSensor::getTitle()
{
- QByteArray data, replyData;
- QCString replyType;
- QString result;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQString result;
+ TQDataStream arg(data, IO_WriteOnly);
arg << 5;
if (!client->call( noatunID, "Noatun", "title()",
data, replyType, replyData))
@@ -143,12 +143,12 @@ QString NoatunSensor::getTitle()
}
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QString")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQString")
{
reply >> result;
- result.replace( QRegExp("_")," " );
- result.replace( QRegExp(".mp3$"),"" );
+ result.replace( TQRegExp("_")," " );
+ result.replace( TQRegExp(".mp3$"),"" );
}
else
@@ -163,10 +163,10 @@ QString NoatunSensor::getTitle()
int NoatunSensor::getTime()
{
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
int result;
- QDataStream arg(data, IO_WriteOnly);
+ TQDataStream arg(data, IO_WriteOnly);
arg << 5;
if (!client->call( noatunID, "Noatun", "position()",
data, replyType, replyData))
@@ -176,7 +176,7 @@ int NoatunSensor::getTime()
}
else
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "int")
{
reply >> result;
@@ -193,10 +193,10 @@ int NoatunSensor::getTime()
int NoatunSensor::getLength()
{
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
int result;
- QDataStream arg(data, IO_WriteOnly);
+ TQDataStream arg(data, IO_WriteOnly);
arg << 5;
if (!client->call( noatunID, "Noatun", "length()",
data, replyType, replyData))
@@ -206,7 +206,7 @@ int NoatunSensor::getLength()
}
else
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "int")
{
reply >> result;
@@ -225,7 +225,7 @@ void NoatunSensor::setMaxValue( SensorParams *sp)
{
Meter *meter;
meter = sp->getMeter();
- QString f;
+ TQString f;
f = sp->getParam("FORMAT");
if ( f == "%full" )
diff --git a/superkaramba/src/noatunsensor.h b/superkaramba/src/noatunsensor.h
index 7d43b96..e605024 100644
--- a/superkaramba/src/noatunsensor.h
+++ b/superkaramba/src/noatunsensor.h
@@ -12,10 +12,10 @@
#include "sensor.h"
#include <dcopclient.h>
-#include <qregexp.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqstringlist.h>
/**
@author Hans Karlsson
@@ -33,16 +33,16 @@ public:
private:
- QCString noatunID;
+ TQCString noatunID;
bool isRunning();
- QString getTitle();
+ TQString getTitle();
int getTime();
int getLength();
DCOPClient *client;
- QCString appId;
+ TQCString appId;
};
#endif
diff --git a/superkaramba/src/programsensor.cpp b/superkaramba/src/programsensor.cpp
index a3bddc5..1118d2d 100644
--- a/superkaramba/src/programsensor.cpp
+++ b/superkaramba/src/programsensor.cpp
@@ -9,26 +9,26 @@
***************************************************************************/
#include "programsensor.h"
-#include <qstringlist.h>
-ProgramSensor::ProgramSensor(const QString &progName, int interval, QString encoding )
+#include <tqstringlist.h>
+ProgramSensor::ProgramSensor(const TQString &progName, int interval, TQString encoding )
: Sensor( interval )
{
if( !encoding.isEmpty())
{
- codec = QTextCodec::codecForName( encoding.ascii() );
+ codec = TQTextCodec::codecForName( encoding.ascii() );
if ( codec == 0)
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
}
else
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
programName = progName;
//update();
- connect(&ksp, SIGNAL(receivedStdout(KProcess *, char *, int )),
- this,SLOT(receivedStdout(KProcess *, char *, int )));
- connect(&ksp, SIGNAL(processExited(KProcess *)),
- this,SLOT(processExited( KProcess * )));
+ connect(&ksp, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
+ this,TQT_SLOT(receivedStdout(KProcess *, char *, int )));
+ connect(&ksp, TQT_SIGNAL(processExited(KProcess *)),
+ this,TQT_SLOT(processExited( KProcess * )));
}
ProgramSensor::~ProgramSensor()
@@ -37,7 +37,7 @@ ProgramSensor::~ProgramSensor()
void ProgramSensor::receivedStdout(KProcess *, char *buffer, int len)
{
buffer[len] = 0;
- sensorResult += codec->toUnicode( QCString(buffer) );
+ sensorResult += codec->toUnicode( TQCString(buffer) );
}
void ProgramSensor::processExited(KProcess *)
@@ -45,16 +45,16 @@ void ProgramSensor::processExited(KProcess *)
int lineNbr;
SensorParams *sp;
Meter *meter;
- QValueVector<QString> lines;
- QStringList stringList = QStringList::split('\n',sensorResult,true);
- QStringList::ConstIterator end( stringList.end() );
- for ( QStringList::ConstIterator it = stringList.begin(); it != end; ++it )
+ TQValueVector<TQString> lines;
+ TQStringList stringList = TQStringList::split('\n',sensorResult,true);
+ TQStringList::ConstIterator end( stringList.end() );
+ for ( TQStringList::ConstIterator it = stringList.begin(); it != end; ++it )
{
lines.push_back(*it);
}
int count = (int) lines.size();
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while (it != 0)
{
sp = (SensorParams*)(*it);
diff --git a/superkaramba/src/programsensor.h b/superkaramba/src/programsensor.h
index 1ee7407..d016a81 100644
--- a/superkaramba/src/programsensor.h
+++ b/superkaramba/src/programsensor.h
@@ -12,23 +12,23 @@
#include "sensor.h"
#include <kprocess.h>
#include <kprocio.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
+#include <tqtextcodec.h>
class ProgramSensor : public Sensor
{
Q_OBJECT
public:
- ProgramSensor(const QString &programName, int msec=1000, QString encoding="" );
+ ProgramSensor(const TQString &programName, int msec=1000, TQString encoding="" );
~ProgramSensor();
void update();
private:
- QTextCodec *codec;
+ TQTextCodec *codec;
KShellProcess ksp;
- QString programName;
- QString sensorResult;
+ TQString programName;
+ TQString sensorResult;
public slots:
void receivedStdout(KProcess *proc, char *buffer, int buflen);
diff --git a/superkaramba/src/richtextlabel.cpp b/superkaramba/src/richtextlabel.cpp
index 9a8fee0..ba7ab11 100644
--- a/superkaramba/src/richtextlabel.cpp
+++ b/superkaramba/src/richtextlabel.cpp
@@ -20,7 +20,7 @@ RichTextLabel::RichTextLabel(karamba* k) :
colorGrp(k->colorGroup()),
underlineLinks(false)
{
- originalSize = QSize(0, 0);
+ originalSize = TQSize(0, 0);
}
RichTextLabel::RichTextLabel(karamba* k, int x, int y, int w, int h) :
@@ -31,7 +31,7 @@ RichTextLabel::RichTextLabel(karamba* k, int x, int y, int w, int h) :
underlineLinks(false)
{
kdDebug() << k_funcinfo << x << ", " << y << ", " << w << ", " << h << endl;
- originalSize = QSize(w, h);
+ originalSize = TQSize(w, h);
}
RichTextLabel::~RichTextLabel()
@@ -43,7 +43,7 @@ RichTextLabel::~RichTextLabel()
}
}
-void RichTextLabel::setText(QString t, bool linkUnderline)
+void RichTextLabel::setText(TQString t, bool linkUnderline)
{
source = t;
if (text != 0)
@@ -58,8 +58,8 @@ void RichTextLabel::setText(QString t, bool linkUnderline)
underlineLinks = linkUnderline;
}
- text = new QSimpleRichText(t, font, m_karamba->theme().path(),
- 0, // default QStyleSheet*
+ text = new TQSimpleRichText(t, font, m_karamba->theme().path(),
+ 0, // default TQStyleSheet*
0, // default QMimeSourceFactory
-1, // no pageBreak
Qt::blue, // (has no effect) link Color
@@ -75,24 +75,24 @@ void RichTextLabel::setText(QString t, bool linkUnderline)
setHeight(text->height());
}
-void RichTextLabel::setValue(QString text)
+void RichTextLabel::setValue(TQString text)
{
setText(text);
}
void RichTextLabel::setValue(long v)
{
- setText(QString::number(v));
+ setText(TQString::number(v));
}
-void RichTextLabel::setFont(QString f)
+void RichTextLabel::setFont(TQString f)
{
font.setFamily(f);
if(text != 0)
text->setDefaultFont(font);
}
-QString RichTextLabel::getFont() const
+TQString RichTextLabel::getFont() const
{
return font.family();
}
@@ -127,7 +127,7 @@ void RichTextLabel::setTextProps(TextField* t)
{
setFontSize(t->getFontSize());
setFont(t->getFont());
- colorGrp.setColor(QColorGroup::Text, t->getColor());
+ colorGrp.setColor(TQColorGroup::Text, t->getColor());
}
}
@@ -140,7 +140,7 @@ void RichTextLabel::setWidth(int width)
setHeight(text->height());
}
-void RichTextLabel::mUpdate(QPainter* p)
+void RichTextLabel::mUpdate(TQPainter* p)
{
if (hidden || text == 0)
{
@@ -151,18 +151,18 @@ void RichTextLabel::mUpdate(QPainter* p)
int y = getY();
int w = getWidth();
int h = getHeight();
- QRect clipRect(x, y, w, h);
+ TQRect clipRect(x, y, w, h);
text->draw(p, x, y, clipRect, colorGrp, 0 /* no background */);
}
-bool RichTextLabel::click(QMouseEvent* e)
+bool RichTextLabel::click(TQMouseEvent* e)
{
if (hidden)
{
return false;
}
- QPoint point(e->x() - getX(), e->y() - getY());
- QString anchor = text->anchorAt(point);
+ TQPoint point(e->x() - getX(), e->y() - getY());
+ TQString anchor = text->anchorAt(point);
if (anchor[0] != '#')
{
if (e->button() == Qt::LeftButton)
@@ -178,10 +178,10 @@ bool RichTextLabel::click(QMouseEvent* e)
}
}
-QString RichTextLabel::anchorAt(int x, int y)
+TQString RichTextLabel::anchorAt(int x, int y)
{
- QPoint point(x - getX(), y - getY());
- QString anchor = text->anchorAt(point);
+ TQPoint point(x - getX(), y - getY());
+ TQString anchor = text->anchorAt(point);
if (anchor[0] == '#')
{
return anchor.remove(0, 1);
@@ -195,16 +195,16 @@ QString RichTextLabel::anchorAt(int x, int y)
bool RichTextLabel::insideActiveArea(int x, int y)
{
- QPoint point(x - getX(), y - getY());
+ TQPoint point(x - getX(), y - getY());
return text->anchorAt(point) != ""; // && text -> inText(point);
}
-void RichTextLabel::setColorGroup(const QColorGroup &colorg)
+void RichTextLabel::setColorGroup(const TQColorGroup &colorg)
{
colorGrp = colorg;
}
-const QColorGroup & RichTextLabel::getColorGroup() const
+const TQColorGroup & RichTextLabel::getColorGroup() const
{
return colorGrp;
}
diff --git a/superkaramba/src/richtextlabel.h b/superkaramba/src/richtextlabel.h
index 810b129..4a6eb69 100644
--- a/superkaramba/src/richtextlabel.h
+++ b/superkaramba/src/richtextlabel.h
@@ -12,13 +12,13 @@
#define RICHTEXTLABEL_H
#include "meter.h"
-#include <qstring.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qrect.h>
-#include <qsize.h>
+#include <tqstring.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqrect.h>
+#include <tqsize.h>
#include "karamba.h"
class RichTextLabel : public Meter
@@ -29,36 +29,36 @@ class RichTextLabel : public Meter
RichTextLabel(karamba* k, int x, int y, int w, int h);
~RichTextLabel();
- void setText(QString text, bool linkUnderline = false);
- void setValue(QString text);
+ void setText(TQString text, bool linkUnderline = false);
+ void setValue(TQString text);
void setValue(long v);
- QString getStringValue() { return source; };
+ TQString getStringValue() { return source; };
- void setFont(QString font);
- QString getFont() const;
+ void setFont(TQString font);
+ TQString getFont() const;
void setFontSize(int);
int getFontSize() const;
void setFixedPitch(bool);
bool getFixedPitch() const;
void setTextProps( TextField* t );
- void setColorGroup(const QColorGroup &colorg);
- const QColorGroup &getColorGroup() const;
+ void setColorGroup(const TQColorGroup &colorg);
+ const TQColorGroup &getColorGroup() const;
void setWidth(int width);
virtual bool insideActiveArea(int, int);
- virtual bool click(QMouseEvent*);
- virtual void mUpdate(QPainter*);
+ virtual bool click(TQMouseEvent*);
+ virtual void mUpdate(TQPainter*);
- QString anchorAt(int, int);
+ TQString anchorAt(int, int);
private:
- QSimpleRichText* text;
- QString source;
- QFont font;
- QColorGroup colorGrp;
+ TQSimpleRichText* text;
+ TQString source;
+ TQFont font;
+ TQColorGroup colorGrp;
bool underlineLinks;
- QSize originalSize;
+ TQSize originalSize;
};
#endif
diff --git a/superkaramba/src/richtextlabel_python.cpp b/superkaramba/src/richtextlabel_python.cpp
index 7ac14cd..beadc81 100644
--- a/superkaramba/src/richtextlabel_python.cpp
+++ b/superkaramba/src/richtextlabel_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "richtextlabel.h"
#include "meter_python.h"
@@ -43,7 +43,7 @@ PyObject* py_createRichText(PyObject *, PyObject *args)
if (!checkKaramba(widget))
return NULL;
RichTextLabel *tmp = new RichTextLabel((karamba*)widget);
- tmp->setText(PyString2QString(text), underline);
+ tmp->setText(PyString2TQString(text), underline);
tmp->setTextProps(((karamba*)widget)->getDefaultTextProps());
((karamba*)widget)->meterList->append(tmp);
((karamba*)widget)->clickList->append(tmp);
diff --git a/superkaramba/src/rsssensor.cpp b/superkaramba/src/rsssensor.cpp
index 1477062..5a999ec 100644
--- a/superkaramba/src/rsssensor.cpp
+++ b/superkaramba/src/rsssensor.cpp
@@ -10,12 +10,12 @@
#include "karambaapp.h"
#include "rsssensor.h"
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#include <kurl.h>
#include <kio/netaccess.h>
-RssSensor::RssSensor( const QString &src, int interval, const QString &form, const QString &enc)
+RssSensor::RssSensor( const TQString &src, int interval, const TQString &form, const TQString &enc)
: Sensor(interval),
source(src),
format(form),
@@ -28,12 +28,12 @@ RssSensor::RssSensor( const QString &src, int interval, const QString &form, con
if( !encoding.isEmpty() )
{
- codec = QTextCodec::codecForName( encoding.ascii() );
+ codec = TQTextCodec::codecForName( encoding.ascii() );
if ( codec == 0)
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
}
else
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
}
RssSensor::~RssSensor()
@@ -42,9 +42,9 @@ RssSensor::~RssSensor()
void RssSensor::update()
{
- QDomDocument doc;
- QFile file;
- QString tmpFile;
+ TQDomDocument doc;
+ TQFile file;
+ TQString tmpFile;
bool OK = false;
#if defined(KDE_3_3)
@@ -79,7 +79,7 @@ void RssSensor::update()
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while (it != 0)
{
sp = (SensorParams*)(*it);
@@ -89,12 +89,12 @@ void RssSensor::update()
// clickmap to reset its data lists
meter->setValue(0);
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
if (!n.isNull())
{
- QDomNodeList links = docElem.elementsByTagName( "link" );
- QDomNodeList displays;
+ TQDomNodeList links = docElem.elementsByTagName( "link" );
+ TQDomNodeList displays;
if ( format.contains( "%d", false ) > 0 )
{
displays = docElem.elementsByTagName( "description" );
@@ -104,11 +104,11 @@ void RssSensor::update()
displays = docElem.elementsByTagName( "title" );
}
- QRegExp rx("^http://", false );
+ TQRegExp rx("^http://", false );
for (uint i=1; i < displays.count(); ++i )
{
- QString dispTxt = displays.item( i ).toElement().text();
- QString linkTxt = links.item( i ).toElement().text();
+ TQString dispTxt = displays.item( i ).toElement().text();
+ TQString linkTxt = links.item( i ).toElement().text();
if( (rx.search(dispTxt) == -1) && (rx.search(linkTxt) != -1) )
{
meter->setValue( dispTxt );
diff --git a/superkaramba/src/rsssensor.h b/superkaramba/src/rsssensor.h
index d896d04..f567c0d 100644
--- a/superkaramba/src/rsssensor.h
+++ b/superkaramba/src/rsssensor.h
@@ -12,8 +12,8 @@
#define RSSSENSOR_H
#include <sensor.h>
-#include <qstring.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
/**
*
@@ -23,16 +23,16 @@ class RssSensor : public Sensor
{
Q_OBJECT
public:
- RssSensor( const QString &source, int interval, const QString &format, const QString &encoding=QString::null );
+ RssSensor( const TQString &source, int interval, const TQString &format, const TQString &encoding=TQString::null );
~RssSensor();
void update();
private:
- QTextCodec *codec;
- QString source;
- QString format;
- QString encoding;
+ TQTextCodec *codec;
+ TQString source;
+ TQString format;
+ TQString encoding;
};
diff --git a/superkaramba/src/sensor.cpp b/superkaramba/src/sensor.cpp
index 6aba5d2..378cb1d 100644
--- a/superkaramba/src/sensor.cpp
+++ b/superkaramba/src/sensor.cpp
@@ -10,7 +10,7 @@
#include "sensor.h"
Sensor::Sensor(int iMsec)
{
- objList = new QObjectList();
+ objList = new TQObjectList();
objList->setAutoDelete( true );
msec = iMsec;
}
@@ -19,7 +19,7 @@ void Sensor::start()
{
if (!timer.isActive())
{
- connect (&timer,SIGNAL(timeout()),this,SLOT(update()));
+ connect (&timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(update()));
timer.start( (msec == 0)?1000:msec);
}
}
@@ -37,7 +37,7 @@ void Sensor::addMeter( SensorParams *sp )
SensorParams* Sensor::hasMeter( Meter *meter )
{
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while ( it != 0 )
{
if (((SensorParams*) *it)->getMeter() == meter)
diff --git a/superkaramba/src/sensor.h b/superkaramba/src/sensor.h
index d7368b0..ee48c98 100644
--- a/superkaramba/src/sensor.h
+++ b/superkaramba/src/sensor.h
@@ -9,12 +9,12 @@
***************************************************************************/
#ifndef SENSOR_H
#define SENSOR_H
-#include <qstring.h>
-#include <qobject.h>
-#include <qobjectlist.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqobjectlist.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include "sensorparams.h"
@@ -34,10 +34,10 @@ public:
private:
int msec;
- QTimer timer;
+ TQTimer timer;
protected:
- QObjectList *objList;
+ TQObjectList *objList;
public slots:
virtual void update()=0;
diff --git a/superkaramba/src/sensorparams.cpp b/superkaramba/src/sensorparams.cpp
index 954b2d5..bcccc20 100644
--- a/superkaramba/src/sensorparams.cpp
+++ b/superkaramba/src/sensorparams.cpp
@@ -19,11 +19,11 @@ SensorParams::~SensorParams()
{
}
-void SensorParams::addParam( const QString &name, const QString &value){
+void SensorParams::addParam( const TQString &name, const TQString &value){
params[name] = value;
}
-QString SensorParams::getParam( const QString &name ) const
+TQString SensorParams::getParam( const TQString &name ) const
{
return params[name];
}
diff --git a/superkaramba/src/sensorparams.h b/superkaramba/src/sensorparams.h
index 24f0fae..1de515a 100644
--- a/superkaramba/src/sensorparams.h
+++ b/superkaramba/src/sensorparams.h
@@ -22,8 +22,8 @@
#define SENSORPARAMS_H
#include "meter.h"
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
/**
*
* Hans Karlsson
@@ -35,13 +35,13 @@ public:
~SensorParams();
- void addParam( const QString &name, const QString &value);
- QString getParam( const QString& ) const;
+ void addParam( const TQString &name, const TQString &value);
+ TQString getParam( const TQString& ) const;
Meter* getMeter() const;
private:
Meter *meter;
-QMap<QString,QString> params;
+TQMap<TQString,TQString> params;
};
diff --git a/superkaramba/src/sensorsensor.cpp b/superkaramba/src/sensorsensor.cpp
index 9ff0d47..ed6934e 100644
--- a/superkaramba/src/sensorsensor.cpp
+++ b/superkaramba/src/sensorsensor.cpp
@@ -8,7 +8,7 @@
* (at your option) any later version. *
***************************************************************************/
#include "sensorsensor.h"
-#include <qglobal.h>
+#include <tqglobal.h>
SensorSensor::SensorSensor(int interval, char tempUnit) : Sensor( interval )
{
@@ -29,10 +29,10 @@ SensorSensor::SensorSensor(int interval, char tempUnit) : Sensor( interval )
#endif
if(tempUnit == 'F')
extraParams = " -f";
- connect(&ksp, SIGNAL(receivedStdout(KProcess *, char *, int )),
- this,SLOT(receivedStdout(KProcess *, char *, int )));
- connect(&ksp, SIGNAL(processExited(KProcess *)),
- this,SLOT(processExited( KProcess * )));
+ connect(&ksp, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
+ this,TQT_SLOT(receivedStdout(KProcess *, char *, int )));
+ connect(&ksp, TQT_SIGNAL(processExited(KProcess *)),
+ this,TQT_SLOT(processExited( KProcess * )));
// readValues();
}
@@ -45,18 +45,18 @@ SensorSensor::~SensorSensor()
void SensorSensor::receivedStdout(KProcess *, char *buffer, int len )
{
buffer[len] = 0;
- sensorResult += QString( QCString(buffer) );
+ sensorResult += TQString( TQCString(buffer) );
}
void SensorSensor::processExited(KProcess *)
{
- QStringList stringList = QStringList::split('\n',sensorResult);
+ TQStringList stringList = TQStringList::split('\n',sensorResult);
sensorResult = "";
- QStringList::Iterator it = stringList.begin();
+ TQStringList::Iterator it = stringList.begin();
#if defined __FreeBSD__ || defined(Q_OS_NETBSD)
- QRegExp rx( "^(\\S+)\\s+:\\s+[\\+\\-]?(\\d+\\.?\\d*)");
+ TQRegExp rx( "^(\\S+)\\s+:\\s+[\\+\\-]?(\\d+\\.?\\d*)");
#else
- QRegExp rx( "^(.+):\\s+[\\+\\-]?(\\d+\\.?\\d*)");
+ TQRegExp rx( "^(.+):\\s+[\\+\\-]?(\\d+\\.?\\d*)");
#endif
while( it != stringList.end())
{
@@ -69,12 +69,12 @@ void SensorSensor::processExited(KProcess *)
it++;
}
- QString format;
- QString type;
+ TQString format;
+ TQString type;
SensorParams *sp;
Meter *meter;
- QObjectListIt lit( *objList );
+ TQObjectListIt lit( *objList );
while (lit != 0)
{
sp = (SensorParams*)(*lit);
@@ -91,9 +91,9 @@ void SensorSensor::processExited(KProcess *)
}
#if defined __FreeBSD__ || defined(Q_OS_NETBSD)
- format.replace( QRegExp("%v", false), sensorMap[sensorMapBSD[type]]);
+ format.replace( TQRegExp("%v", false), sensorMap[sensorMapBSD[type]]);
#else
- format.replace( QRegExp("%v", false), sensorMap[type]);
+ format.replace( TQRegExp("%v", false), sensorMap[type]);
#endif
meter->setValue(format);
++lit;
diff --git a/superkaramba/src/sensorsensor.h b/superkaramba/src/sensorsensor.h
index 82adf10..6201660 100644
--- a/superkaramba/src/sensorsensor.h
+++ b/superkaramba/src/sensorsensor.h
@@ -2,11 +2,11 @@
#ifndef SENSORSENSOR_H
#define SENSORSENSOR_H
-#include <qstring.h>
-#include <qtextcodec.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kprocess.h>
#include <kprocio.h>
@@ -30,13 +30,13 @@ public:
private:
KShellProcess ksp;
- QString extraParams;
+ TQString extraParams;
- QMap<QString,QString> sensorMap;
+ TQMap<TQString,TQString> sensorMap;
#ifdef __FreeBSD__
- QMap<QString,QString> sensorMapBSD;
+ TQMap<TQString,TQString> sensorMapBSD;
#endif
- QString sensorResult;
+ TQString sensorResult;
private slots:
void receivedStdout(KProcess *, char *buffer, int);
diff --git a/superkaramba/src/showdesktop.cpp b/superkaramba/src/showdesktop.cpp
index 304dcb6..159ccae 100644
--- a/superkaramba/src/showdesktop.cpp
+++ b/superkaramba/src/showdesktop.cpp
@@ -33,17 +33,17 @@ ShowDesktop* ShowDesktop::the()
}
ShowDesktop::ShowDesktop()
- : QObject()
+ : TQObject()
, showingDesktop( false )
, kWinModule( 0 )
{
kWinModule = new KWinModule( this );
// on desktop changes or when a window is deiconified, we abort the show desktop mode
- connect( kWinModule, SIGNAL(currentDesktopChanged(int)),
- SLOT(slotCurrentDesktopChanged(int)));
- connect( kWinModule, SIGNAL(windowChanged(WId,unsigned int)),
- SLOT(slotWindowChanged(WId,unsigned int)));
+ connect( kWinModule, TQT_SIGNAL(currentDesktopChanged(int)),
+ TQT_SLOT(slotCurrentDesktopChanged(int)));
+ connect( kWinModule, TQT_SIGNAL(windowChanged(WId,unsigned int)),
+ TQT_SLOT(slotWindowChanged(WId,unsigned int)));
}
void ShowDesktop::slotCurrentDesktopChanged(int)
@@ -91,9 +91,9 @@ void ShowDesktop::showDesktop( bool b )
if ( b ) {
// this code should move to KWin after supporting NETWM1.2
iconifiedList.clear();
- const QValueList<WId> windows = kWinModule->windows();
- QValueList<WId>::ConstIterator it;
- QValueList<WId>::ConstIterator end( windows.end() );
+ const TQValueList<WId> windows = kWinModule->windows();
+ TQValueList<WId>::ConstIterator it;
+ TQValueList<WId>::ConstIterator end( windows.end() );
for ( it=windows.begin(); it!=end; ++it ) {
WId w = *it;
NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(),
@@ -107,13 +107,13 @@ void ShowDesktop::showDesktop( bool b )
}
// find first, hide later, otherwise transients may get minimized
// with the window they're transient for
- QValueList<WId>::ConstIterator endInconifiedList( iconifiedList.end() );
+ TQValueList<WId>::ConstIterator endInconifiedList( iconifiedList.end() );
for ( it=iconifiedList.begin(); it!=endInconifiedList; ++it ) {
KWin::iconifyWindow( *it, false );
}
} else {
- QValueList<WId>::ConstIterator it;
- QValueList<WId>::ConstIterator end( iconifiedList.end() );
+ TQValueList<WId>::ConstIterator it;
+ TQValueList<WId>::ConstIterator end( iconifiedList.end() );
for ( it=iconifiedList.begin(); it!=end; ++it ) {
KWin::deIconifyWindow( *it, false );
}
diff --git a/superkaramba/src/showdesktop.h b/superkaramba/src/showdesktop.h
index 6a980dc..6f46688 100644
--- a/superkaramba/src/showdesktop.h
+++ b/superkaramba/src/showdesktop.h
@@ -51,7 +51,7 @@ private:
bool showingDesktop;
KWinModule* kWinModule;
- QValueList<WId> iconifiedList;
+ TQValueList<WId> iconifiedList;
};
diff --git a/superkaramba/src/sklineedit.cpp b/superkaramba/src/sklineedit.cpp
index a384e44..7047dde 100644
--- a/superkaramba/src/sklineedit.cpp
+++ b/superkaramba/src/sklineedit.cpp
@@ -22,7 +22,7 @@
#include "karamba.h"
#include "kdebug.h"
-SKLineEdit::SKLineEdit(QWidget *w, Input *i) : QLineEdit(w), m_input(i)
+SKLineEdit::SKLineEdit(TQWidget *w, Input *i) : TQLineEdit(w), m_input(i)
{
frameColor = Qt::gray;
setBackgroundColor(Qt::white);
@@ -32,37 +32,37 @@ SKLineEdit::~SKLineEdit()
{
}
-void SKLineEdit::drawFrame(QPainter *p)
+void SKLineEdit::drawFrame(TQPainter *p)
{
p->setPen(frameColor);
p->drawRect(frameRect());
}
-void SKLineEdit::drawContents(QPainter *p)
+void SKLineEdit::drawContents(TQPainter *p)
{
- QLineEdit::drawContents(p);
+ TQLineEdit::drawContents(p);
}
-void SKLineEdit::setFrameColor(QColor c)
+void SKLineEdit::setFrameColor(TQColor c)
{
frameColor = c;
repaint();
}
-void SKLineEdit::setBackgroundColor(QColor c)
+void SKLineEdit::setBackgroundColor(TQColor c)
{
- QLineEdit::setBackgroundColor(c);
+ TQLineEdit::setBackgroundColor(c);
repaint();
}
-QColor SKLineEdit::getFrameColor() const
+TQColor SKLineEdit::getFrameColor() const
{
return frameColor;
}
-void SKLineEdit::keyPressEvent(QKeyEvent* e)
+void SKLineEdit::keyPressEvent(TQKeyEvent* e)
{
- QLineEdit::keyPressEvent(e);
+ TQLineEdit::keyPressEvent(e);
if(!e->text().isEmpty())
{
@@ -71,9 +71,9 @@ void SKLineEdit::keyPressEvent(QKeyEvent* e)
}
}
-void SKLineEdit::keyReleaseEvent(QKeyEvent* e)
+void SKLineEdit::keyReleaseEvent(TQKeyEvent* e)
{
- QLineEdit::keyReleaseEvent(e);
+ TQLineEdit::keyReleaseEvent(e);
}
Input* SKLineEdit::getInput()
diff --git a/superkaramba/src/sklineedit.h b/superkaramba/src/sklineedit.h
index 2afd6c5..2d56793 100644
--- a/superkaramba/src/sklineedit.h
+++ b/superkaramba/src/sklineedit.h
@@ -21,36 +21,36 @@
#ifndef SKLINEEDIT_H
#define SKLINEEDIT_H
-#include <qlineedit.h>
-#include <qwidget.h>
-#include <qevent.h>
-#include <qpainter.h>
-#include <qcolor.h>
+#include <tqlineedit.h>
+#include <tqwidget.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
class Input;
class SKLineEdit : public QLineEdit
{
public:
- SKLineEdit(QWidget *w, Input *i);
+ SKLineEdit(TQWidget *w, Input *i);
~SKLineEdit();
- void drawFrame(QPainter *p);
- void drawContents(QPainter *p);
+ void drawFrame(TQPainter *p);
+ void drawContents(TQPainter *p);
- void setFrameColor(QColor c);
- QColor getFrameColor() const;
+ void setFrameColor(TQColor c);
+ TQColor getFrameColor() const;
- void setBackgroundColor(QColor c);
+ void setBackgroundColor(TQColor c);
Input* getInput();
protected:
- virtual void keyReleaseEvent(QKeyEvent* e);
- virtual void keyPressEvent(QKeyEvent* e);
+ virtual void keyReleaseEvent(TQKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
private:
- QColor frameColor;
+ TQColor frameColor;
Input* m_input;
};
diff --git a/superkaramba/src/sknewstuff.cpp b/superkaramba/src/sknewstuff.cpp
index bf16fe6..3dd32f6 100644
--- a/superkaramba/src/sknewstuff.cpp
+++ b/superkaramba/src/sknewstuff.cpp
@@ -27,8 +27,8 @@
#include <kstandarddirs.h>
#include <ktar.h>
#include <kurl.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -45,16 +45,16 @@ SKNewStuff::SKNewStuff( ThemesDlg *dlg ) :
{
}
-bool SKNewStuff::install( const QString &fileName )
+bool SKNewStuff::install( const TQString &fileName )
{
kdDebug() << "SKNewStuff::install(): " << fileName << endl;
KMimeType::Ptr result = KMimeType::findByURL(fileName);
KStandardDirs myStdDir;
- QFileInfo fi(fileName);
- QString base = fi.baseName();
- QString baseDestDir =myStdDir.saveLocation("data", kapp->instanceName() + "/themes/", true);
- const QString destDir = baseDestDir + base + "/";
+ TQFileInfo fi(fileName);
+ TQString base = fi.baseName();
+ TQString baseDestDir =myStdDir.saveLocation("data", kapp->instanceName() + "/themes/", true);
+ const TQString destDir = baseDestDir + base + "/";
KStandardDirs::makeDir( destDir );
kdDebug() << "SKNewStuff::install() mimetype: " << result->name() << endl;
@@ -114,20 +114,20 @@ bool SKNewStuff::install( const QString &fileName )
return true;
}
-bool SKNewStuff::createUploadFile( const QString &fileName )
+bool SKNewStuff::createUploadFile( const TQString &fileName )
{
kdDebug() << "SKNewStuff::createUploadFile(): " << fileName << endl;
return true;
}
-QString SKNewStuff::downloadDestination( KNS::Entry *entry )
+TQString SKNewStuff::downloadDestination( KNS::Entry *entry )
{
KURL source = entry->payload();
m_sourceLink = source;
kdDebug() << "SKNewStuff::downloadDestination() url: "
<< source.url() << " fileName: " << source.fileName() << endl;
- QString file(source.fileName());
+ TQString file(source.fileName());
if ( file.isEmpty() )
{
kdDebug() << "The file was empty. " << source.url() <<
diff --git a/superkaramba/src/sknewstuff.h b/superkaramba/src/sknewstuff.h
index c646f36..9c10d2b 100644
--- a/superkaramba/src/sknewstuff.h
+++ b/superkaramba/src/sknewstuff.h
@@ -40,9 +40,9 @@ class SKNewStuff : public KNewStuff
public:
SKNewStuff( ThemesDlg * );
- bool install( const QString &fileName );
- bool createUploadFile( const QString &fileName );
- QString downloadDestination( KNS::Entry *entry );
+ bool install( const TQString &fileName );
+ bool createUploadFile( const TQString &fileName );
+ TQString downloadDestination( KNS::Entry *entry );
private:
ThemesDlg *mDlg;
diff --git a/superkaramba/src/svcgrp_python.cpp b/superkaramba/src/svcgrp_python.cpp
index 5a59c82..8b827ec 100644
--- a/superkaramba/src/svcgrp_python.cpp
+++ b/superkaramba/src/svcgrp_python.cpp
@@ -19,7 +19,7 @@
#include <Python.h>
#include "task_python.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kservicegroup.h>
#include "karamba.h"
#include "svcgrp_python.h"
@@ -122,7 +122,7 @@ static PyObject *getServiceGroups(const char *rel_path)
KServiceGroup::List sl = root->entries(true, excludeNoDisplay_, true, detailed_ && !detailedNamesFirst_);
- QStringList suppressGenericNames = root->suppressGenericNames();
+ TQStringList suppressGenericNames = root->suppressGenericNames();
KServiceGroup::List::ConstIterator it = sl.begin();
for (; it != sl.end(); ++it)
diff --git a/superkaramba/src/systemtray.cpp b/superkaramba/src/systemtray.cpp
index 312fe59..ed85ab8 100644
--- a/superkaramba/src/systemtray.cpp
+++ b/superkaramba/src/systemtray.cpp
@@ -19,7 +19,7 @@
#include "systemtray.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kwinmodule.h>
@@ -27,16 +27,16 @@
#include <kdebug.h>
#include <kwin.h>
-#include <qpopupmenu.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
#include <X11/Xlib.h>
-Systemtray::Systemtray(QWidget* parent)
- : QWidget(parent,0,0)
+Systemtray::Systemtray(TQWidget* parent)
+ : TQWidget(parent,0,0)
{
setBackgroundOrigin(ParentOrigin);
setBackgroundMode(FixedPixmap);
@@ -54,20 +54,20 @@ int Systemtray::getTraySize() {
return (int) kwin_module->systemTrayWindows().size();
}
-void Systemtray::updateBackgroundPixmap ( const QPixmap & pixmap) {
+void Systemtray::updateBackgroundPixmap ( const TQPixmap & pixmap) {
QXEmbed *emb;
setPaletteBackgroundPixmap (pixmap);
for (emb = m_Wins.first(); emb != 0L; emb = m_Wins.next()) {
//Stupid stupid stupid work around for annoying bug
//QXEmbed ignores setBackgroundOrigin(AncestorOrigin)....
- QPixmap bug = QPixmap(emb->size());
+ TQPixmap bug = TQPixmap(emb->size());
bitBlt(&bug, 0, 0, &pixmap, emb->parentWidget()->x()+emb->x(), emb->parentWidget()->y()+emb->y(), emb->width(), emb->height(),Qt::CopyROP, false);
emb->setPaletteBackgroundPixmap (bug);
}
- QPoint topPoint = mapToGlobal(QPoint(0,0));
+ TQPoint topPoint = mapToGlobal(TQPoint(0,0));
Window hack = XCreateSimpleWindow(qt_xdisplay(), winId(), 0,0, width(), height(), 0, 0, 0);
XRaiseWindow(qt_xdisplay(), hack);
XMapWindow(qt_xdisplay(), hack);
@@ -84,8 +84,8 @@ void Systemtray::initSystray( void )
kwin_module = new KWinModule();
systemTrayWindows = kwin_module->systemTrayWindows();
- QValueList<WId>::ConstIterator end(systemTrayWindows.end());
- for (QValueList<WId>::ConstIterator it = systemTrayWindows.begin(); it!=end; ++it)
+ TQValueList<WId>::ConstIterator end(systemTrayWindows.end());
+ for (TQValueList<WId>::ConstIterator it = systemTrayWindows.begin(); it!=end; ++it)
{
no_of_systray_windows++;
QXEmbed *emb;
@@ -95,7 +95,7 @@ void Systemtray::initSystray( void )
emb->setAutoDelete(false);
- connect(emb, SIGNAL(embeddedWindowDestroyed()), SLOT(updateTrayWindows()));
+ connect(emb, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(updateTrayWindows()));
m_Wins.append(emb);
@@ -107,12 +107,12 @@ void Systemtray::initSystray( void )
updateTrayWindows();
- connect(kwin_module, SIGNAL(systemTrayWindowAdded(WId)), SLOT(systemTrayWindowAdded(WId)));
- connect(kwin_module, SIGNAL(systemTrayWindowRemoved(WId)), SLOT(systemTrayWindowRemoved(WId)));
+ connect(kwin_module, TQT_SIGNAL(systemTrayWindowAdded(WId)), TQT_SLOT(systemTrayWindowAdded(WId)));
+ connect(kwin_module, TQT_SIGNAL(systemTrayWindowRemoved(WId)), TQT_SLOT(systemTrayWindowRemoved(WId)));
- QCString screenstr;
+ TQCString screenstr;
screenstr.setNum(qt_xscreen());
- QCString trayatom = "_NET_SYSTEM_TRAY_S" + screenstr;
+ TQCString trayatom = "_NET_SYSTEM_TRAY_S" + screenstr;
net_system_tray_selection = XInternAtom( display, trayatom, false );
net_system_tray_opcode = XInternAtom( display, "_NET_SYSTEM_TRAY_OPCODE", false );
@@ -206,7 +206,7 @@ void Systemtray::systemTrayWindowAdded( WId w )
emb->setAutoDelete(false);
//emb->setBackgroundMode(X11ParentRelative);
emb->setBackgroundMode(FixedPixmap);
- connect(emb, SIGNAL(embeddedWindowDestroyed()), SLOT(updateTrayWindows()));
+ connect(emb, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(updateTrayWindows()));
m_Wins.append(emb);
emb->embed(w);
diff --git a/superkaramba/src/systemtray.h b/superkaramba/src/systemtray.h
index 768e00c..51f1d56 100644
--- a/superkaramba/src/systemtray.h
+++ b/superkaramba/src/systemtray.h
@@ -21,9 +21,9 @@
#ifndef TESTCARDAPPLET_H
#define TESTCARDAPPLET_H
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
#include <qxembed.h>
class KWinModule;
@@ -35,10 +35,10 @@ class Systemtray : public QWidget
{
Q_OBJECT
public:
- Systemtray(QWidget* parent);
+ Systemtray(TQWidget* parent);
~Systemtray();
- void updateBackgroundPixmap ( const QPixmap & );
+ void updateBackgroundPixmap ( const TQPixmap & );
int getCurrentWindowCount();
@@ -56,9 +56,9 @@ signals:
private:
KWinModule *kwin_module;
- QValueList<WId> systemTrayWindows;
+ TQValueList<WId> systemTrayWindows;
- QPtrList<QXEmbed> m_Wins;
+ TQPtrList<QXEmbed> m_Wins;
Atom net_system_tray_selection;
Atom net_system_tray_opcode;
diff --git a/superkaramba/src/systray_python.cpp b/superkaramba/src/systray_python.cpp
index cb8909a..c953fdb 100644
--- a/superkaramba/src/systray_python.cpp
+++ b/superkaramba/src/systray_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
@@ -111,8 +111,8 @@ long createSystray(long widget, long x, long y, long w, long h)
currTheme->systray->move((int)x,(int)y);
currTheme->systray->setMinimumSize((int)w,(int)h);
currTheme->systray->initSystray();
- QObject::connect(currTheme->systray,SIGNAL(updated()),
- currTheme,SLOT(systrayUpdated()));
+ TQObject::connect(currTheme->systray,TQT_SIGNAL(updated()),
+ currTheme,TQT_SLOT(systrayUpdated()));
currTheme->systray->show();
}
diff --git a/superkaramba/src/task_python.cpp b/superkaramba/src/task_python.cpp
index 7a74559..0b3f876 100644
--- a/superkaramba/src/task_python.cpp
+++ b/superkaramba/src/task_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
diff --git a/superkaramba/src/taskbartest.cpp b/superkaramba/src/taskbartest.cpp
index 3ad6922..95b66a2 100644
--- a/superkaramba/src/taskbartest.cpp
+++ b/superkaramba/src/taskbartest.cpp
@@ -27,8 +27,8 @@
#include <klocale.h>
#include <kconfig.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <iostream.h>
@@ -95,7 +95,7 @@ int main(int argc, char **argv)
// {
// if( args->arg(i) != "" )
// {
-// QFileInfo file( args->arg(i) );
+// TQFileInfo file( args->arg(i) );
// //qDebug( file.dirPath(true) );
// if( file.exists() && !file.isDir() )
// {
@@ -125,11 +125,11 @@ int main(int argc, char **argv)
// }
// else
// {
-// QStringList fileNames;
-// fileNames = KFileDialog::getOpenFileNames(QString::null, "*.theme", 0, "Open configurations");
-// for ( QStringList::Iterator it = fileNames.begin(); it != fileNames.end(); ++it )
+// TQStringList fileNames;
+// fileNames = KFileDialog::getOpenFileNames(TQString::null, "*.theme", 0, "Open configurations");
+// for ( TQStringList::Iterator it = fileNames.begin(); it != fileNames.end(); ++it )
// {
-// QFileInfo file( *it );
+// TQFileInfo file( *it );
// if( file.exists() && !file.isDir() )
// {
// mainWin = new karamba( *it );
diff --git a/superkaramba/src/taskmanager.cpp b/superkaramba/src/taskmanager.cpp
index c1f2568..e12fc6a 100644
--- a/superkaramba/src/taskmanager.cpp
+++ b/superkaramba/src/taskmanager.cpp
@@ -28,8 +28,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kiconloader.h>
#include <kwinmodule.h>
#include <netwm.h>
-#include <qtimer.h>
-#include <qimage.h>
+#include <tqtimer.h>
+#include <tqimage.h>
#include <X11/X.h>
#include <X11/Xlib.h>
@@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "taskmanager.h"
#include "taskmanager.moc"
-template class QPtrList<Task>;
+template class TQPtrList<Task>;
// Hack: create a global KWinModule without a parent. We
// can't make it a child of TaskManager because more than one
@@ -48,23 +48,23 @@ template class QPtrList<Task>;
// The real problem is that KWinModule should be a singleton.
KWinModule* kwin_module = 0;
-TaskManager::TaskManager(QObject *parent, const char *name)
- : QObject(parent, name), _active(0), _startup_info( NULL )
+TaskManager::TaskManager(TQObject *parent, const char *name)
+ : TQObject(parent, name), _active(0), _startup_info( NULL )
{
kwin_module = new KWinModule();
// KGlobal::locale()->insertCatalogue("libtaskmanager");
- connect(kwin_module, SIGNAL(windowAdded(WId)), SLOT(windowAdded(WId)));
- connect(kwin_module, SIGNAL(windowRemoved(WId)), SLOT(windowRemoved(WId)));
- connect(kwin_module, SIGNAL(activeWindowChanged(WId)), SLOT(activeWindowChanged(WId)));
- connect(kwin_module, SIGNAL(currentDesktopChanged(int)), SLOT(currentDesktopChanged(int)));
- connect(kwin_module, SIGNAL(windowChanged(WId,unsigned int)), SLOT(windowChanged(WId,unsigned int)));
+ connect(kwin_module, TQT_SIGNAL(windowAdded(WId)), TQT_SLOT(windowAdded(WId)));
+ connect(kwin_module, TQT_SIGNAL(windowRemoved(WId)), TQT_SLOT(windowRemoved(WId)));
+ connect(kwin_module, TQT_SIGNAL(activeWindowChanged(WId)), TQT_SLOT(activeWindowChanged(WId)));
+ connect(kwin_module, TQT_SIGNAL(currentDesktopChanged(int)), TQT_SLOT(currentDesktopChanged(int)));
+ connect(kwin_module, TQT_SIGNAL(windowChanged(WId,unsigned int)), TQT_SLOT(windowChanged(WId,unsigned int)));
// register existing windows
- const QValueList<WId> windows = kwin_module->windows();
- QValueList<WId>::ConstIterator end( windows.end() );
- for (QValueList<WId>::ConstIterator it = windows.begin(); it != end; ++it )
+ const TQValueList<WId> windows = kwin_module->windows();
+ TQValueList<WId>::ConstIterator end( windows.end() );
+ for (TQValueList<WId>::ConstIterator it = windows.begin(); it != end; ++it )
windowAdded(*it);
// set active window
@@ -86,14 +86,14 @@ void TaskManager::configure_startup()
return;
_startup_info = new KStartupInfo( true, this );
connect( _startup_info,
- SIGNAL( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )),
- SLOT( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )));
+ TQT_SIGNAL( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )),
+ TQT_SLOT( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )));
connect( _startup_info,
- SIGNAL( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )),
- SLOT( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )));
+ TQT_SIGNAL( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )),
+ TQT_SLOT( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )));
connect( _startup_info,
- SIGNAL( gotRemoveStartup( const KStartupInfoId&, const KStartupInfoData& )),
- SLOT( gotRemoveStartup( const KStartupInfoId& )));
+ TQT_SIGNAL( gotRemoveStartup( const KStartupInfoId&, const KStartupInfoData& )),
+ TQT_SLOT( gotRemoveStartup( const KStartupInfoId& )));
c.setGroup( "TaskbarButtonSettings" );
_startup_info->setTimeout( c.readUnsignedNumEntry( "Timeout", 30 ));
}
@@ -298,7 +298,7 @@ void TaskManager::killStartup(Startup* s)
delete s;
}
-QString TaskManager::desktopName(int desk) const
+TQString TaskManager::desktopName(int desk) const
{
return kwin_module->desktopName(desk);
}
@@ -312,7 +312,7 @@ bool TaskManager::isOnTop(const Task* task)
{
if(!task) return false;
- for (QValueList<WId>::ConstIterator it = kwin_module->stackingOrder().fromLast();
+ for (TQValueList<WId>::ConstIterator it = kwin_module->stackingOrder().fromLast();
it != kwin_module->stackingOrder().end(); --it ) {
for (Task* t = _tasks.first(); t != 0; t = _tasks.next() ) {
if ( (*it) == t->window() ) {
@@ -329,7 +329,7 @@ bool TaskManager::isOnTop(const Task* task)
Task::Task(WId win, TaskManager * parent, const char *name) :
- QObject(parent, name),
+ TQObject(parent, name),
_active(false), _win(win),
_lastWidth(0), _lastHeight(0), _lastResize(false), _lastIcon(),
_thumbSize(0.2), _thumb(), _grab()
@@ -462,7 +462,7 @@ bool Task::isOnTop() const
bool Task::isModified() const
{
- static QString modStr = QString::fromUtf8("[") + i18n("modified") + QString::fromUtf8("]");
+ static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
#ifdef KDE_3_2
int modStrPos = _info.visibleName().find(modStr);
#else
@@ -472,42 +472,42 @@ bool Task::isModified() const
return ( modStrPos != -1 );
}
-QString Task::iconName() const
+TQString Task::iconName() const
{
NETWinInfo ni( qt_xdisplay(), _win, qt_xrootwin(), NET::WMIconName);
- return QString::fromUtf8(ni.iconName());
+ return TQString::fromUtf8(ni.iconName());
}
-QString Task::visibleIconName() const
+TQString Task::visibleIconName() const
{
NETWinInfo ni( qt_xdisplay(), _win, qt_xrootwin(), NET::WMVisibleIconName);
- return QString::fromUtf8(ni.visibleIconName());
+ return TQString::fromUtf8(ni.visibleIconName());
}
-QString Task::className()
+TQString Task::className()
{
XClassHint hint;
if(XGetClassHint(qt_xdisplay(), _win, &hint)) {
- QString nh( hint.res_name );
+ TQString nh( hint.res_name );
XFree( hint.res_name );
XFree( hint.res_class );
return nh;
}
- return QString::null;
+ return TQString::null;
}
-QString Task::classClass()
+TQString Task::classClass()
{
XClassHint hint;
if(XGetClassHint(qt_xdisplay(), _win, &hint)) {
- QString ch( hint.res_class );
+ TQString ch( hint.res_class );
XFree( hint.res_name );
XFree( hint.res_class );
return ch;
}
- return QString::null;
+ return TQString::null;
}
-QPixmap Task::icon( int width, int height, bool allowResize )
+TQPixmap Task::icon( int width, int height, bool allowResize )
{
if ( (width == _lastWidth)
&& (height == _lastHeight)
@@ -515,7 +515,7 @@ QPixmap Task::icon( int width, int height, bool allowResize )
&& (!_lastIcon.isNull()) )
return _lastIcon;
- QPixmap newIcon = KWin::icon( _win, width, height, allowResize );
+ TQPixmap newIcon = KWin::icon( _win, width, height, allowResize );
if ( !newIcon.isNull() ) {
_lastIcon = newIcon;
_lastWidth = width;
@@ -526,9 +526,9 @@ QPixmap Task::icon( int width, int height, bool allowResize )
return newIcon;
}
-QPixmap Task::bestIcon( int size, bool &isStaticIcon )
+TQPixmap Task::bestIcon( int size, bool &isStaticIcon )
{
- QPixmap pixmap;
+ TQPixmap pixmap;
isStaticIcon = false;
switch( size ) {
@@ -603,7 +603,7 @@ QPixmap Task::bestIcon( int size, bool &isStaticIcon )
return pixmap;
}
-bool Task::idMatch( const QString& id1, const QString& id2 )
+bool Task::idMatch( const TQString& id1, const TQString& id2 )
{
if ( id1.isEmpty() || id2.isEmpty() )
return false;
@@ -748,7 +748,7 @@ void Task::toggleShaded()
setShaded( !isShaded() );
}
-void Task::publishIconGeometry(QRect rect)
+void Task::publishIconGeometry(TQRect rect)
{
NETWinInfo ni( qt_xdisplay(), _win, qt_xrootwin(), NET::WMIconGeometry);
NETRect r;
@@ -773,18 +773,18 @@ void Task::updateThumbnail()
// by the thumbnail generation. This makes things much smoother
// on slower machines.
//
- QWidget *rootWin = qApp->desktop();
+ TQWidget *rootWin = qApp->desktop();
#ifdef KDE_3_2
- QRect geom = _info.geometry();
+ TQRect geom = _info.geometry();
#else
- QRect geom = _info.geometry;
+ TQRect geom = _info.geometry;
#endif
- _grab = QPixmap::grabWindow( rootWin->winId(),
+ _grab = TQPixmap::grabWindow( rootWin->winId(),
geom.x(), geom.y(),
geom.width(), geom.height() );
if ( !_grab.isNull() )
- QTimer::singleShot( 200, this, SLOT( generateThumbnail() ) );
+ TQTimer::singleShot( 200, this, TQT_SLOT( generateThumbnail() ) );
}
void Task::generateThumbnail()
@@ -792,7 +792,7 @@ void Task::generateThumbnail()
if ( _grab.isNull() )
return;
- QImage img = _grab.convertToImage();
+ TQImage img = _grab.convertToImage();
double width = img.width();
double height = img.height();
@@ -807,8 +807,8 @@ void Task::generateThumbnail()
}
Startup::Startup( const KStartupInfoId& id, const KStartupInfoData& data,
- QObject * parent, const char *name)
- : QObject(parent, name), _id( id ), _data( data )
+ TQObject * parent, const char *name)
+ : TQObject(parent, name), _id( id ), _data( data )
{
}
diff --git a/superkaramba/src/taskmanager.h b/superkaramba/src/taskmanager.h
index 86e4a74..be05cb7 100644
--- a/superkaramba/src/taskmanager.h
+++ b/superkaramba/src/taskmanager.h
@@ -27,11 +27,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/types.h>
-#include <qpoint.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
+#include <tqpoint.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
#include <kwin.h>
@@ -49,12 +49,12 @@ class TaskManager;
class Task: public QObject
{
Q_OBJECT
- Q_PROPERTY( QString name READ name )
- Q_PROPERTY( QString visibleName READ visibleName )
- Q_PROPERTY( QString visibleNameWithState READ visibleNameWithState )
- Q_PROPERTY( QString iconName READ iconName )
- Q_PROPERTY( QString visibleIconName READ visibleIconName )
- Q_PROPERTY( QPixmap pixmap READ pixmap )
+ Q_PROPERTY( TQString name READ name )
+ Q_PROPERTY( TQString visibleName READ visibleName )
+ Q_PROPERTY( TQString visibleNameWithState READ visibleNameWithState )
+ Q_PROPERTY( TQString iconName READ iconName )
+ Q_PROPERTY( TQString visibleIconName READ visibleIconName )
+ Q_PROPERTY( TQPixmap pixmap READ pixmap )
Q_PROPERTY( bool maximized READ isMaximized )
Q_PROPERTY( bool iconified READ isIconified )
Q_PROPERTY( bool shaded READ isShaded WRITE setShaded )
@@ -66,7 +66,7 @@ class Task: public QObject
Q_PROPERTY( int desktop READ desktop )
Q_PROPERTY( double thumbnailSize READ thumbnailSize WRITE setThumbnailSize )
Q_PROPERTY( bool hasThumbnail READ hasThumbnail )
- Q_PROPERTY( QPixmap thumbnail READ thumbnail )
+ Q_PROPERTY( TQPixmap thumbnail READ thumbnail )
public:
Task( WId win, TaskManager * parent, const char *name = 0 );
@@ -76,38 +76,38 @@ public:
WId window() const { return _win; }
#ifdef KDE_3_2
- QString name() const { return _info.name(); }
- QString visibleName() const { return _info.visibleName(); }
+ TQString name() const { return _info.name(); }
+ TQString visibleName() const { return _info.visibleName(); }
/**
* Returns the desktop on which this task's window resides.
*/
int desktop() const { return _info.desktop(); }
#else
- QString name() const { return _info.name; }
- QString visibleName() const { return _info.visibleName; }
+ TQString name() const { return _info.name; }
+ TQString visibleName() const { return _info.visibleName; }
/**
* Returns the desktop on which this task's window resides.
*/
int desktop() const { return _info.desktop; }
#endif
- QString visibleNameWithState() const { return _info.visibleNameWithState(); }
- QString iconName() const;
- QString visibleIconName() const;
- QString className();
- QString classClass();
+ TQString visibleNameWithState() const { return _info.visibleNameWithState(); }
+ TQString iconName() const;
+ TQString visibleIconName() const;
+ TQString className();
+ TQString classClass();
/**
* A list of the window ids of all transient windows (dialogs) associated
* with this task.
*/
- QValueList<WId> transients() const { return _transients; }
+ TQValueList<WId> transients() const { return _transients; }
/**
* Returns a 16x16 (KIcon::Small) icon for the task. This method will
* only fall back to a static icon if there is no icon of any size in
* the WM hints.
*/
- QPixmap pixmap() const { return _pixmap; }
+ TQPixmap pixmap() const { return _pixmap; }
/**
* Returns the best icon for any of the KIcon::StdSizes. If there is no
@@ -116,14 +116,14 @@ public:
*
* <pre>
* bool gotStaticIcon;
- * QPixmap icon = myTask->icon( KIcon::SizeMedium, gotStaticIcon );
+ * TQPixmap icon = myTask->icon( KIcon::SizeMedium, gotStaticIcon );
* </pre>
*
* @param size Any of the constants in KIcon::StdSizes.
* @param isStaticIcon Set to true if KIconLoader was used, false otherwise.
* @see KIcon
*/
- QPixmap bestIcon( int size, bool &isStaticIcon );
+ TQPixmap bestIcon( int size, bool &isStaticIcon );
/**
* Tries to find an icon for the task with the specified size. If there
@@ -134,13 +134,13 @@ public:
* parameters will only query the NET properties if the icon has changed or
* none was found.
*/
- QPixmap icon( int width, int height, bool allowResize = false );
+ TQPixmap icon( int width, int height, bool allowResize = false );
/**
* Returns true iff the windows with the specified ids should be grouped
* together in the task list.
*/
- static bool idMatch(const QString &, const QString &);
+ static bool idMatch(const TQString &, const TQString &);
// state
@@ -231,7 +231,7 @@ public:
* Returns the thumbnail for this task (or a null image if there is
* none).
*/
- const QPixmap &thumbnail() const { return _thumb; }
+ const TQPixmap &thumbnail() const { return _thumb; }
public slots:
// actions
@@ -306,7 +306,7 @@ public slots:
* task will be displayed when iconised. It is used, for example by the
* KWin inconify animation.
*/
- void publishIconGeometry(QRect);
+ void publishIconGeometry(TQRect);
/**
* Tells the task to generate a new thumbnail. When the thumbnail is
@@ -347,22 +347,22 @@ protected slots:
private:
bool _active;
WId _win;
- QPixmap _pixmap;
+ TQPixmap _pixmap;
#ifdef KDE_3_2
KWin::WindowInfo _info;
#else
KWin::Info _info;
#endif
- QValueList<WId> _transients;
+ TQValueList<WId> _transients;
int _lastWidth;
int _lastHeight;
bool _lastResize;
- QPixmap _lastIcon;
+ TQPixmap _lastIcon;
double _thumbSize;
- QPixmap _thumb;
- QPixmap _grab;
+ TQPixmap _thumb;
+ TQPixmap _grab;
class TaskPrivate *d;
};
@@ -375,29 +375,29 @@ private:
class Startup: public QObject
{
Q_OBJECT
- Q_PROPERTY( QString text READ text )
- Q_PROPERTY( QString bin READ bin )
- Q_PROPERTY( QString icon READ icon )
+ Q_PROPERTY( TQString text READ text )
+ Q_PROPERTY( TQString bin READ bin )
+ Q_PROPERTY( TQString icon READ icon )
public:
- Startup( const KStartupInfoId& id, const KStartupInfoData& data, QObject * parent,
+ Startup( const KStartupInfoId& id, const KStartupInfoData& data, TQObject * parent,
const char *name = 0);
virtual ~Startup();
/**
* The name of the starting task (if known).
*/
- QString text() const { return _data.findName(); }
+ TQString text() const { return _data.findName(); }
/**
* The name of the executable of the starting task.
*/
- QString bin() const { return _data.bin(); }
+ TQString bin() const { return _data.bin(); }
/**
* The name of the icon to be used for the starting task.
*/
- QString icon() const { return _data.findIcon(); }
+ TQString icon() const { return _data.findIcon(); }
void update( const KStartupInfoData& data );
const KStartupInfoId& id() const { return _id; }
@@ -413,8 +413,8 @@ private:
class StartupPrivate *d;
};
-typedef QPtrList<Task> TaskList;
-typedef QPtrList<Startup> StartupList;
+typedef TQPtrList<Task> TaskList;
+typedef TQPtrList<Startup> StartupList;
/**
@@ -434,25 +434,25 @@ class TaskManager : public QObject
Q_PROPERTY( int numberOfDesktops READ numberOfDesktops )
public:
- TaskManager( QObject *parent = 0, const char *name = 0 );
+ TaskManager( TQObject *parent = 0, const char *name = 0 );
virtual ~TaskManager();
/**
* Returns a list of all current tasks. Return type changed to
- * QPtrList in KDE 3.
+ * TQPtrList in KDE 3.
*/
TaskList tasks() const { return _tasks; }
/**
* Returns a list of all current startups. Return type changed to
- * QPtrList in KDE 3.
+ * TQPtrList in KDE 3.
*/
StartupList startups() const { return _startups; }
/**
* Returns the name of the nth desktop.
*/
- QString desktopName(int n) const;
+ TQString desktopName(int n) const;
/**
* Returns the number of virtual desktops.
@@ -540,7 +540,7 @@ protected:
private:
Task* _active;
TaskList _tasks;
- QValueList< WId > _skiptaskbar_windows;
+ TQValueList< WId > _skiptaskbar_windows;
StartupList _startups;
KStartupInfo* _startup_info;
diff --git a/superkaramba/src/textfield.cpp b/superkaramba/src/textfield.cpp
index 6578466..d2d0c6b 100644
--- a/superkaramba/src/textfield.cpp
+++ b/superkaramba/src/textfield.cpp
@@ -9,14 +9,14 @@
***************************************************************************/
#include "textfield.h"
-#include <qfontmetrics.h>
+#include <tqfontmetrics.h>
#include <kdebug.h>
TextField::TextField( )
{
setFontSize(12);
- setColor(QColor(192, 192, 192));
- setBGColor(QColor(0, 0, 0));
+ setColor(TQColor(192, 192, 192));
+ setBGColor(TQColor(0, 0, 0));
setFont("Helvetica");
setAlignment(Qt::AlignLeft);
setFixedPitch(false);
@@ -58,35 +58,35 @@ TextField& TextField::operator=(const TextField& rhs)
return *this;
}
-void TextField::setColor(QColor clr)
+void TextField::setColor(TQColor clr)
{
color = clr;
}
-QColor TextField::getColor() const
+TQColor TextField::getColor() const
{
return color;
}
-void TextField::setBGColor(QColor clr)
+void TextField::setBGColor(TQColor clr)
{
bgColor = clr;
}
-QColor TextField::getBGColor() const
+TQColor TextField::getBGColor() const
{
return bgColor;
}
-void TextField::setFont(const QString &f)
+void TextField::setFont(const TQString &f)
{
font.setFamily(f);
- lineHeight = QFontMetrics(font).height();
+ lineHeight = TQFontMetrics(font).height();
}
-QString TextField::getFont() const
+TQString TextField::getFont() const
{
return font.family();
}
@@ -94,7 +94,7 @@ QString TextField::getFont() const
void TextField::setFontSize(int size)
{
font.setPointSize(size);
- lineHeight = QFontMetrics(font).height();
+ lineHeight = TQFontMetrics(font).height();
}
int TextField::getFontSize() const
@@ -102,9 +102,9 @@ int TextField::getFontSize() const
return font.pointSize();
}
-void TextField::setAlignment( const QString &align )
+void TextField::setAlignment( const TQString &align )
{
- QString a = align.upper();
+ TQString a = align.upper();
if( a == "LEFT" || a.isEmpty() )
alignment = Qt::AlignLeft;
if( a == "RIGHT" )
@@ -123,7 +123,7 @@ int TextField::getAlignment() const
return alignment;
}
-QString TextField::getAlignmentAsString() const
+TQString TextField::getAlignmentAsString() const
{
if( alignment == Qt::AlignHCenter )
return "CENTER";
diff --git a/superkaramba/src/textfield.h b/superkaramba/src/textfield.h
index b24fff3..13177b7 100644
--- a/superkaramba/src/textfield.h
+++ b/superkaramba/src/textfield.h
@@ -10,9 +10,9 @@
#ifndef TEXTFIELD_H
#define TEXTFIELD_H
-#include <qstring.h>
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqfont.h>
/**
*
@@ -28,29 +28,29 @@ public:
TextField& operator=(const TextField& );
void setFontSize( int );
- void setColor(QColor clr);
- void setBGColor(QColor clr);
- void setFont( const QString& );
+ void setColor(TQColor clr);
+ void setBGColor(TQColor clr);
+ void setFont( const TQString& );
void setAlignment( int );
- void setAlignment( const QString& );
+ void setAlignment( const TQString& );
void setFixedPitch( bool );
void setShadow( int );
int getFontSize() const;
- QColor getColor() const;
- QColor getBGColor() const;
- QString getFont() const;
+ TQColor getColor() const;
+ TQColor getBGColor() const;
+ TQString getFont() const;
int getAlignment() const;
- QString getAlignmentAsString() const;
+ TQString getAlignmentAsString() const;
bool getFixedPitch() const;
int getShadow() const;
int getLineHeight() const;
protected:
int alignment;
- QFont font;
- QColor color;
- QColor bgColor;
+ TQFont font;
+ TQColor color;
+ TQColor bgColor;
int shadow;
int lineHeight;
diff --git a/superkaramba/src/textfilesensor.cpp b/superkaramba/src/textfilesensor.cpp
index cad696f..7956112 100644
--- a/superkaramba/src/textfilesensor.cpp
+++ b/superkaramba/src/textfilesensor.cpp
@@ -8,9 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
#include "textfilesensor.h"
-#include "qdom.h"
+#include "tqdom.h"
-TextFileSensor::TextFileSensor( const QString &fn, bool iRdf, int interval, const QString &encoding )
+TextFileSensor::TextFileSensor( const TQString &fn, bool iRdf, int interval, const TQString &encoding )
: Sensor( interval )
{
fileName = fn;
@@ -18,12 +18,12 @@ TextFileSensor::TextFileSensor( const QString &fn, bool iRdf, int interval, cons
if( !encoding.isEmpty() )
{
- codec = QTextCodec::codecForName( encoding.ascii() );
+ codec = TQTextCodec::codecForName( encoding.ascii() );
if ( codec == 0)
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
}
else
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
}
TextFileSensor::~TextFileSensor()
@@ -31,30 +31,30 @@ TextFileSensor::~TextFileSensor()
void TextFileSensor::update()
{
- QValueVector<QString> lines;
- QFile file(fileName);
- QString line;
+ TQValueVector<TQString> lines;
+ TQFile file(fileName);
+ TQString line;
if ( file.open(IO_ReadOnly | IO_Translate) )
{
if (rdf)
{
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file ) )
{
file.close();
return;
}
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
if (!n.isNull())
{
- QDomNodeList titles = docElem.elementsByTagName( "title" );
- QDomNodeList links = docElem.elementsByTagName( "link" );
+ TQDomNodeList titles = docElem.elementsByTagName( "title" );
+ TQDomNodeList links = docElem.elementsByTagName( "link" );
uint i;
for ( i = 0; i < titles.count(); ++i )
{
- QDomElement element = titles.item( i ).toElement();
+ TQDomElement element = titles.item( i ).toElement();
lines.push_back(element.text());
element = links.item( i ).toElement();
@@ -64,7 +64,7 @@ void TextFileSensor::update()
}
else
{
- QTextStream t( &file ); // use a text stream
+ TQTextStream t( &file ); // use a text stream
while( (line = t.readLine()) !=0 )
{
lines.push_back(line);
@@ -78,7 +78,7 @@ void TextFileSensor::update()
Meter *meter;
int count = (int) lines.size();
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while (it != 0)
{
sp = (SensorParams*)(*it);
@@ -95,7 +95,7 @@ void TextFileSensor::update()
if ( lineNbr == 0 )
{
- QString text;
+ TQString text;
for( int i=0; i < count; i++ )
{
text += lines[i] + "\n";
diff --git a/superkaramba/src/textfilesensor.h b/superkaramba/src/textfilesensor.h
index 1d5951b..39a464d 100644
--- a/superkaramba/src/textfilesensor.h
+++ b/superkaramba/src/textfilesensor.h
@@ -24,11 +24,11 @@
#include <sensor.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qtextcodec.h>
-#include <qvaluevector.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
+#include <tqvaluevector.h>
/**
*
* Hans Karlsson
@@ -38,15 +38,15 @@ class TextFileSensor : public Sensor
Q_OBJECT
public:
- TextFileSensor( const QString &fileName, bool rdf, int interval, const QString &encoding=QString::null );
+ TextFileSensor( const TQString &fileName, bool rdf, int interval, const TQString &encoding=TQString::null );
~TextFileSensor();
void update();
private:
-QTextCodec *codec;
-QString fileName;
+TQTextCodec *codec;
+TQString fileName;
bool rdf;
};
diff --git a/superkaramba/src/textlabel.cpp b/superkaramba/src/textlabel.cpp
index 69fb841..509aea8 100644
--- a/superkaramba/src/textlabel.cpp
+++ b/superkaramba/src/textlabel.cpp
@@ -73,11 +73,11 @@ void TextLabel::setTextProps( TextField* t )
void TextLabel::calculateTextSize()
{
int tmp;
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
lineHeight = fm.height();
textSize.setWidth(0);
textSize.setHeight(lineHeight * value.count());
- QStringList::Iterator it = value.begin();
+ TQStringList::Iterator it = value.begin();
while(it != value.end())
{
tmp = fm.width(*it);
@@ -87,35 +87,35 @@ void TextLabel::calculateTextSize()
}
}
-void TextLabel::setValue( QString text)
+void TextLabel::setValue( TQString text)
{
- value = QStringList::split('\n',text);
+ value = TQStringList::split('\n',text);
calculateTextSize();
}
void TextLabel::setValue( long v)
{
- value = QStringList( QString::number( v ) );
+ value = TQStringList( TQString::number( v ) );
calculateTextSize();
}
-void TextLabel::setBGColor(QColor clr)
+void TextLabel::setBGColor(TQColor clr)
{
bgColor = clr;
}
-QColor TextLabel::getBGColor() const
+TQColor TextLabel::getBGColor() const
{
return bgColor;
}
-void TextLabel::setFont(QString f)
+void TextLabel::setFont(TQString f)
{
font.setFamily(f);
calculateTextSize();
}
-QString TextLabel::getFont() const
+TQString TextLabel::getFont() const
{
return font.family();
}
@@ -131,9 +131,9 @@ int TextLabel::getFontSize() const
return font.pixelSize();
}
-void TextLabel::setAlignment( QString align )
+void TextLabel::setAlignment( TQString align )
{
- QString a = align.upper();
+ TQString a = align.upper();
if( a == "LEFT" || a.isEmpty() )
alignment = Qt::AlignLeft;
if( a == "RIGHT" )
@@ -142,7 +142,7 @@ void TextLabel::setAlignment( QString align )
alignment = Qt::AlignHCenter;
}
-QString TextLabel::getAlignment() const
+TQString TextLabel::getAlignment() const
{
if( alignment == Qt::AlignHCenter )
return "CENTER";
@@ -172,10 +172,10 @@ int TextLabel::getShadow() const
return shadow;
}
-void TextLabel::setScroll(char* type, QPoint speed, int gap, int pause)
+void TextLabel::setScroll(char* type, TQPoint speed, int gap, int pause)
{
ScrollType t = TextLabel::ScrollNone;
- QString a = type;
+ TQString a = type;
a = a.upper();
if(a == "NONE")
t = TextLabel::ScrollNone;
@@ -188,7 +188,7 @@ void TextLabel::setScroll(char* type, QPoint speed, int gap, int pause)
setScroll(t, speed, gap, pause);
}
-void TextLabel::setScroll(ScrollType type, QPoint speed, int gap, int pause)
+void TextLabel::setScroll(ScrollType type, TQPoint speed, int gap, int pause)
{
scrollType = type;
scrollSpeed = speed;
@@ -207,13 +207,13 @@ void TextLabel::setScroll(ScrollType type, QPoint speed, int gap, int pause)
x = -1 * textSize.height();
else if(speed.y() < 0)
x = getHeight()-1;
- scrollPos = QPoint(x,y);
+ scrollPos = TQPoint(x,y);
break;
}
case ScrollNone:
case ScrollBackAndForth:
default:
- scrollPos = QPoint(0,0);
+ scrollPos = TQPoint(0,0);
break;
}
scrollGap = gap;
@@ -221,8 +221,8 @@ void TextLabel::setScroll(ScrollType type, QPoint speed, int gap, int pause)
pauseCounter = 1;
}
-int TextLabel::drawText(QPainter *p, int x, int y, int width, int height,
- QString text)
+int TextLabel::drawText(TQPainter *p, int x, int y, int width, int height,
+ TQString text)
{
if( shadow != 0)
{
@@ -235,8 +235,8 @@ int TextLabel::drawText(QPainter *p, int x, int y, int width, int height,
return 0;
}
-bool TextLabel::calculateScrollCoords(QRect meterRect, QRect &textRect,
- QPoint &next, int &x, int &y)
+bool TextLabel::calculateScrollCoords(TQRect meterRect, TQRect &textRect,
+ TQPoint &next, int &x, int &y)
{
if(scrollType == ScrollBackAndForth &&
(scrollSpeed.x() != 0 && textSize.width() < getWidth() ||
@@ -251,11 +251,11 @@ bool TextLabel::calculateScrollCoords(QRect meterRect, QRect &textRect,
scrollPos += scrollSpeed;
// -1 | 0 | 1
- QPoint direction(scrollSpeed.x()/abs((scrollSpeed.x() == 0)?
+ TQPoint direction(scrollSpeed.x()/abs((scrollSpeed.x() == 0)?
1:scrollSpeed.x()),
scrollSpeed.y()/abs((scrollSpeed.y() == 0)?
1:scrollSpeed.y()));
- next = QPoint(-1 * direction.x() * (scrollGap + textSize.width()),
+ next = TQPoint(-1 * direction.x() * (scrollGap + textSize.width()),
-1 * direction.y() * (scrollGap + textSize.height()));
textRect.setCoords(x, y, x + textSize.width(), y + textSize.height());
@@ -287,7 +287,7 @@ bool TextLabel::calculateScrollCoords(QRect meterRect, QRect &textRect,
return true;
}
-void TextLabel::mUpdate(QPainter *p)
+void TextLabel::mUpdate(TQPainter *p)
{
if (hidden != 1)
{
@@ -297,9 +297,9 @@ void TextLabel::mUpdate(QPainter *p)
int y = getY();
int width = getWidth();
int height = getHeight();
- QRect meterRect(x, y, width, height);
- QRect textRect;
- QPoint next;
+ TQRect meterRect(x, y, width, height);
+ TQRect textRect;
+ TQPoint next;
p->setFont(font);
if(scrollType != ScrollNone)
@@ -313,7 +313,7 @@ void TextLabel::mUpdate(QPainter *p)
width = textSize.width();
height = textSize.height();
}
- QStringList::Iterator it = value.begin();
+ TQStringList::Iterator it = value.begin();
while(it != value.end() && (row <= height || height == -1 ))
{
drawText(p, x, y + i, width, height, *it);
@@ -337,11 +337,11 @@ void TextLabel::mUpdate(QPainter *p)
}
}
-bool TextLabel::click(QMouseEvent* e)
+bool TextLabel::click(TQMouseEvent* e)
{
if (getBoundingBox().contains(e -> x(), e -> y()) && isEnabled())
{
- QString program;
+ TQString program;
if (e -> button() == Qt::LeftButton)
{
program = leftButtonAction;
@@ -367,9 +367,9 @@ bool TextLabel::click(QMouseEvent* e)
return false;
}
-void TextLabel::attachClickArea(QString leftMouseButton,
- QString middleMouseButton,
- QString rightMouseButton)
+void TextLabel::attachClickArea(TQString leftMouseButton,
+ TQString middleMouseButton,
+ TQString rightMouseButton)
{
leftButtonAction = leftMouseButton;
middleButtonAction = middleMouseButton;
diff --git a/superkaramba/src/textlabel.h b/superkaramba/src/textlabel.h
index e8fc9e4..f3774e6 100644
--- a/superkaramba/src/textlabel.h
+++ b/superkaramba/src/textlabel.h
@@ -10,13 +10,13 @@
#ifndef TEXTLABEL_H
#define TEXTLABEL_H
#include "meter.h"
-#include <qstring.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qstringlist.h>
-#include <qrect.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
#include "textfield.h"
@@ -32,55 +32,55 @@ public:
~TextLabel();
void setTextProps( TextField* );
- void setValue( QString );
+ void setValue( TQString );
void setValue( long );
- //virtual QString getStringValue() const { return value.join("\n"); };
- QString getStringValue() const { return value.join("\n"); };
+ //virtual TQString getStringValue() const { return value.join("\n"); };
+ TQString getStringValue() const { return value.join("\n"); };
void setFontSize( int );
- void setBGColor(QColor clr);
- void setFont( QString );
- void setAlignment( QString );
+ void setBGColor(TQColor clr);
+ void setFont( TQString );
+ void setAlignment( TQString );
void setFixedPitch( bool );
void setShadow( int );
- void mUpdate( QPainter * );
+ void mUpdate( TQPainter * );
virtual void show();
virtual void hide();
int getFontSize() const;
- QColor getBGColor() const;
- QString getFont() const;
- QString getAlignment() const;
+ TQColor getBGColor() const;
+ TQString getFont() const;
+ TQString getAlignment() const;
bool getFixedPitch() const;
int getShadow() const;
- void setScroll(ScrollType type, QPoint speed, int gap, int pause);
- void setScroll(char* type, QPoint speed, int gap, int pause);
+ void setScroll(ScrollType type, TQPoint speed, int gap, int pause);
+ void setScroll(char* type, TQPoint speed, int gap, int pause);
- void attachClickArea(QString leftMouseButton, QString middleMouseButton,
- QString rightMouseButton);
+ void attachClickArea(TQString leftMouseButton, TQString middleMouseButton,
+ TQString rightMouseButton);
- virtual bool click(QMouseEvent*);
+ virtual bool click(TQMouseEvent*);
private:
int alignment;
int clip;
- QStringList value;
- QFont font;
- QColor bgColor;
+ TQStringList value;
+ TQFont font;
+ TQColor bgColor;
int lineHeight;
- QSize textSize;
+ TQSize textSize;
int shadow;
TextField text;
- QPoint scrollSpeed;
- QPoint scrollPos;
+ TQPoint scrollSpeed;
+ TQPoint scrollPos;
int scrollGap;
int scrollPause;
int pauseCounter;
ScrollType scrollType;
- int drawText(QPainter *p, int x, int y, int width, int height,
- QString text);
- bool calculateScrollCoords(QRect meterRect, QRect &textRect,
- QPoint &next, int &x, int &y);
+ int drawText(TQPainter *p, int x, int y, int width, int height,
+ TQString text);
+ bool calculateScrollCoords(TQRect meterRect, TQRect &textRect,
+ TQPoint &next, int &x, int &y);
void calculateTextSize();
};
diff --git a/superkaramba/src/textlabel_python.cpp b/superkaramba/src/textlabel_python.cpp
index 0802be9..3cf6e3e 100644
--- a/superkaramba/src/textlabel_python.cpp
+++ b/superkaramba/src/textlabel_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "textlabel.h"
#include "meter_python.h"
@@ -43,7 +43,7 @@ PyObject* py_createText(PyObject *, PyObject *args)
return NULL;
TextLabel *tmp =
new TextLabel((karamba*)widget, (int)x, (int)y, (int)w, (int)h);
- tmp->setValue(PyString2QString(text));
+ tmp->setValue(PyString2TQString(text));
tmp->setTextProps(((karamba*)widget)->getDefaultTextProps());
((karamba*)widget)->meterList->append(tmp);
return (Py_BuildValue((char*)"l", (long)tmp));
@@ -230,6 +230,6 @@ PyObject* py_setTextScroll(PyObject *, PyObject *args)
return NULL;
if (!checkKarambaAndMeter(widget, textSensor, "TextLabel"))
return NULL;
- ((TextLabel*)textSensor)->setScroll(type, QPoint(x,y), gap, pause);
+ ((TextLabel*)textSensor)->setScroll(type, TQPoint(x,y), gap, pause);
return Py_BuildValue((char*)"l", 1);
}
diff --git a/superkaramba/src/themefile.cpp b/superkaramba/src/themefile.cpp
index ac02e2f..1147357 100644
--- a/superkaramba/src/themefile.cpp
+++ b/superkaramba/src/themefile.cpp
@@ -32,10 +32,10 @@
#include <kstandarddirs.h>
#include <klocale.h>
#include <kio/netaccess.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
-#include <qdom.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
+#include <tqdom.h>
+#include <tqdir.h>
class ZipFile
{
@@ -44,7 +44,7 @@ class ZipFile
m_zip(0), m_file(0)
{
}
- void setFile(const QString& filename)
+ void setFile(const TQString& filename)
{
m_filename = filename;
if(filename.isEmpty())
@@ -60,7 +60,7 @@ class ZipFile
}
m_file = static_cast<const KArchiveFile*>(entry);
}
- void setZip(const QString& zipfile)
+ void setZip(const TQString& zipfile)
{
closeZip();
@@ -93,7 +93,7 @@ class ZipFile
}
}
- QByteArray data()
+ TQByteArray data()
{
if(m_file)
return m_file->data();
@@ -101,7 +101,7 @@ class ZipFile
{
if(!m_filename.isEmpty())
qDebug("Error reading file %s from zip", m_filename.ascii());
- return QByteArray();
+ return TQByteArray();
}
}
@@ -113,7 +113,7 @@ class ZipFile
private:
KZip* m_zip;
const KArchiveFile* m_file;
- QString m_filename;
+ TQString m_filename;
const KArchiveDirectory* m_dir;
};
@@ -143,7 +143,7 @@ bool ThemeFile::open()
m_ba = m_zip->data();
if(m_ba.size() > 0)
{
- m_stream = new QTextStream(m_ba, IO_ReadOnly);
+ m_stream = new TQTextStream(m_ba, IO_ReadOnly);
result = true;
}
}
@@ -153,7 +153,7 @@ bool ThemeFile::open()
if(m_fl.open(IO_ReadOnly|IO_Translate))
{
- m_stream = new QTextStream(&m_fl); // use a text stream
+ m_stream = new TQTextStream(&m_fl); // use a text stream
result = true;
}
}
@@ -166,7 +166,7 @@ bool ThemeFile::nextLine(LineParser& parser)
if(m_stream)
{
- QString result = m_stream->readLine();
+ TQString result = m_stream->readLine();
if(result.isNull())
return false;
@@ -196,13 +196,13 @@ bool ThemeFile::isValid() const
bool ThemeFile::exists() const
{
- QFileInfo file(m_file);
+ TQFileInfo file(m_file);
return file.exists();
}
-QPixmap ThemeFile::icon() const
+TQPixmap ThemeFile::icon() const
{
- return QPixmap(readThemeFile(m_icon));
+ return TQPixmap(readThemeFile(m_icon));
}
bool ThemeFile::set(const KURL &url)
@@ -219,8 +219,8 @@ bool ThemeFile::set(const KURL &url)
return false;
}
- QDir themeDir(locateLocal("appdata", "themes/", true));
- QFileInfo localFile = themeDir.filePath(url.fileName());
+ TQDir themeDir(locateLocal("appdata", "themes/", true));
+ TQFileInfo localFile = themeDir.filePath(url.fileName());
if(localFile.exists())
{
@@ -242,14 +242,14 @@ bool ThemeFile::set(const KURL &url)
else
{
if(url.directory().isEmpty() || url.directory() == "/")
- m_file = canonicalFile(QDir::current().filePath(url.fileName()));
+ m_file = canonicalFile(TQDir::current().filePath(url.fileName()));
else
m_file = canonicalFile(url.path());
if(!exists())
return false;
}
- QFileInfo fi(m_file);
+ TQFileInfo fi(m_file);
m_name = fi.baseName( TRUE );
m_theme = m_name + ".theme";
@@ -270,7 +270,7 @@ bool ThemeFile::set(const KURL &url)
}
parseXml();
- QFileInfo fimo(m_python);
+ TQFileInfo fimo(m_python);
if(m_python.isEmpty())
fimo.setFile(m_theme);
else
@@ -285,15 +285,15 @@ void ThemeFile::parseXml()
{
if(!fileExists("maindata.xml"))
return;
- QByteArray ba = readThemeFile("maindata.xml");
- QDomDocument doc("superkaramba_theme");
+ TQByteArray ba = readThemeFile("maindata.xml");
+ TQDomDocument doc("superkaramba_theme");
doc.setContent(ba);
- QDomElement element = doc.documentElement();
+ TQDomElement element = doc.documentElement();
- QDomNode n = element.firstChild();
+ TQDomNode n = element.firstChild();
while(!n.isNull())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if(!e.isNull())
{
if(e.tagName() == "name")
@@ -327,22 +327,22 @@ void ThemeFile::parseXml()
bool ThemeFile::canUninstall() const
{
- QFileInfo fi(file());
- if(fi.permission(QFileInfo::WriteUser) ||
- fi.permission(QFileInfo::WriteGroup) ||
- fi.permission(QFileInfo::WriteOther))
+ TQFileInfo fi(file());
+ if(fi.permission(TQFileInfo::WriteUser) ||
+ fi.permission(TQFileInfo::WriteGroup) ||
+ fi.permission(TQFileInfo::WriteOther))
return true;
return false;
}
-bool ThemeFile::isThemeFile(const QString& filename) const
+bool ThemeFile::isThemeFile(const TQString& filename) const
{
- QFileInfo fileInfo(filename);
+ TQFileInfo fileInfo(filename);
return fileInfo.isRelative();
}
-bool ThemeFile::fileExists(const QString& filename) const
+bool ThemeFile::fileExists(const TQString& filename) const
{
if(isThemeFile(filename))
{
@@ -352,17 +352,17 @@ bool ThemeFile::fileExists(const QString& filename) const
return m_zip->exists();
}
else
- return QFileInfo(path() + "/" + filename).exists();
+ return TQFileInfo(path() + "/" + filename).exists();
}
else
- return QFileInfo(filename).exists();
+ return TQFileInfo(filename).exists();
}
-QByteArray ThemeFile::readThemeFile(const QString& filename) const
+TQByteArray ThemeFile::readThemeFile(const TQString& filename) const
{
- //QTime time;
+ //TQTime time;
//time.start();
- QByteArray ba;
+ TQByteArray ba;
if(isZipTheme())
{
@@ -371,7 +371,7 @@ QByteArray ThemeFile::readThemeFile(const QString& filename) const
}
else
{
- QFile file(path() + "/" + filename);
+ TQFile file(path() + "/" + filename);
if(file.open(IO_ReadOnly))
{
@@ -384,9 +384,9 @@ QByteArray ThemeFile::readThemeFile(const QString& filename) const
return ba;
}
-bool ThemeFile::isZipFile(const QString& filename)
+bool ThemeFile::isZipFile(const TQString& filename)
{
- QFile file(filename);
+ TQFile file(filename);
if(file.open(IO_ReadOnly))
{
@@ -406,9 +406,9 @@ bool ThemeFile::pythonModuleExists() const
return (!m_python.isEmpty() && fileExists(m_python + ".py"));
}
-QString ThemeFile::canonicalFile(const QString& file)
+TQString ThemeFile::canonicalFile(const TQString& file)
{
// Get absolute path with NO symlinks
- QFileInfo fi(file);
- return QDir(fi.dir().canonicalPath()).filePath(fi.fileName());
+ TQFileInfo fi(file);
+ return TQDir(fi.dir().canonicalPath()).filePath(fi.fileName());
}
diff --git a/superkaramba/src/themefile.h b/superkaramba/src/themefile.h
index c8259d6..3a34cac 100644
--- a/superkaramba/src/themefile.h
+++ b/superkaramba/src/themefile.h
@@ -25,11 +25,11 @@
#define THEMEFILE_H
#include <kurl.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qpixmap.h>
-#include <qfile.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqpixmap.h>
+#include <tqfile.h>
+#include <tqvaluevector.h>
class LineParser;
class QTextStream;
@@ -42,31 +42,31 @@ class ZipFile;
class ThemeFile
{
public:
- typedef QValueVector<ThemeFile> List;
+ typedef TQValueVector<ThemeFile> List;
ThemeFile(const KURL& url = KURL());
~ThemeFile();
bool isZipTheme() const { return m_zipTheme; };
- const QString& name() const { return m_name; };
- const QString& version() const { return m_version; };
- const QString& license() const { return m_license; };
- const QString& id() const { return m_id; };
- const QString& mo() const { return m_mo; };
- const QString& file() const { return m_file; };
- const QString& pythonModule() const { return m_python; };
+ const TQString& name() const { return m_name; };
+ const TQString& version() const { return m_version; };
+ const TQString& license() const { return m_license; };
+ const TQString& id() const { return m_id; };
+ const TQString& mo() const { return m_mo; };
+ const TQString& file() const { return m_file; };
+ const TQString& pythonModule() const { return m_python; };
bool pythonModuleExists() const;
- const QString& path() const { return m_path; };
- const QString& description() const { return m_description; };
- const QString& author() const { return m_author; };
- const QString& authorEmail() const { return m_authorEmail; };
- const QString& homepage() const { return m_homepage; };
- QPixmap icon() const;
+ const TQString& path() const { return m_path; };
+ const TQString& description() const { return m_description; };
+ const TQString& author() const { return m_author; };
+ const TQString& authorEmail() const { return m_authorEmail; };
+ const TQString& homepage() const { return m_homepage; };
+ TQPixmap icon() const;
bool exists() const;
- bool isThemeFile(const QString& filename) const;
+ bool isThemeFile(const TQString& filename) const;
bool isValid() const;
- QByteArray readThemeFile(const QString& filename) const;
- bool fileExists(const QString& filename) const;
+ TQByteArray readThemeFile(const TQString& filename) const;
+ bool fileExists(const TQString& filename) const;
const ThemeLocale* locale() const { return m_locale; };
bool canUninstall() const;
@@ -75,31 +75,31 @@ class ThemeFile
bool nextLine(LineParser& parser);
bool close();
- static bool isZipFile(const QString& filename);
- static QString canonicalFile(const QString& file);
+ static bool isZipFile(const TQString& filename);
+ static TQString canonicalFile(const TQString& file);
private:
void parseXml();
- void mkdir(QDir dir);
+ void mkdir(TQDir dir);
- QString m_path;
+ TQString m_path;
bool m_zipTheme;
- QString m_file;
- QString m_id;
- QString m_mo;
- QString m_name;
- QString m_theme;
- QString m_python;
- QString m_icon;
- QString m_version;
- QString m_license;
- QTextStream* m_stream;
- QByteArray m_ba;
- QFile m_fl;
- QString m_description;
- QString m_author;
- QString m_authorEmail;
- QString m_homepage;
+ TQString m_file;
+ TQString m_id;
+ TQString m_mo;
+ TQString m_name;
+ TQString m_theme;
+ TQString m_python;
+ TQString m_icon;
+ TQString m_version;
+ TQString m_license;
+ TQTextStream* m_stream;
+ TQByteArray m_ba;
+ TQFile m_fl;
+ TQString m_description;
+ TQString m_author;
+ TQString m_authorEmail;
+ TQString m_homepage;
ThemeLocale* m_locale;
ZipFile* m_zip;
};
diff --git a/superkaramba/src/themelocale.cpp b/superkaramba/src/themelocale.cpp
index 76fa62b..32886f6 100644
--- a/superkaramba/src/themelocale.cpp
+++ b/superkaramba/src/themelocale.cpp
@@ -33,9 +33,9 @@
#include <kconfig.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qbuffer.h>
-#include <qglobal.h>
-#include <qiodevice.h>
+#include <tqbuffer.h>
+#include <tqglobal.h>
+#include <tqiodevice.h>
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
@@ -108,7 +108,7 @@ struct string_desc
nls_uint32 offset;
};
-void tl_nl_load_domain(QIODevice* device, int size,
+void tl_nl_load_domain(TQIODevice* device, int size,
struct sk_kde_loaded_l10nfile *domain_file);
char* tl_nl_find_msg(const struct sk_kde_loaded_l10nfile *domain_file,
const char *msgid);
@@ -134,13 +134,13 @@ void ThemeLocale::unload()
}
}
-QString ThemeLocale::translate(QString text) const
+TQString ThemeLocale::translate(TQString text) const
{
if(text == 0)
- return QString::null;
+ return TQString::null;
if(m_domain.data)
{
- QString result = QString::fromUtf8(tl_nl_find_msg(&m_domain, text.ascii()));
+ TQString result = TQString::fromUtf8(tl_nl_find_msg(&m_domain, text.ascii()));
if(result.isEmpty())
return text;
else
@@ -149,19 +149,19 @@ QString ThemeLocale::translate(QString text) const
return text;
}
-void ThemeLocale::setLanguage(const QStringList &languages)
+void ThemeLocale::setLanguage(const TQStringList &languages)
{
unload();
- for(QStringList::ConstIterator it = languages.begin();
+ for(TQStringList::ConstIterator it = languages.begin();
it != languages.end();
++it)
{
- QString file =
- QString("locale/%1/LC_MESSAGES/%2.mo").arg(*it).arg(m_theme->mo());
+ TQString file =
+ TQString("locale/%1/LC_MESSAGES/%2.mo").arg(*it).arg(m_theme->mo());
if(m_theme->fileExists(file))
{
- QBuffer buffer(m_theme->readThemeFile(file));
+ TQBuffer buffer(m_theme->readThemeFile(file));
tl_nl_load_domain(&buffer, buffer.size(), &m_domain);
m_language = *it;
return;
@@ -169,29 +169,29 @@ void ThemeLocale::setLanguage(const QStringList &languages)
}
}
-QStringList ThemeLocale::languageList()
+TQStringList ThemeLocale::languageList()
{
KConfig* config = KGlobal::instance()->config();
// Reset the list and add the new languages
- QStringList languageList;
+ TQStringList languageList;
languageList +=
- QStringList::split(':', QFile::decodeName(::getenv("KDE_LANG")));
+ TQStringList::split(':', TQFile::decodeName(::getenv("KDE_LANG")));
languageList += config->readListEntry("Language", ':');
// same order as setlocale use
// HPB: Only run splitLocale on the environment variables..
- QStringList langs;
+ TQStringList langs;
- langs << QFile::decodeName(::getenv("LC_ALL"));
- langs << QFile::decodeName(::getenv("LC_MESSAGES"));
- langs << QFile::decodeName(::getenv("LANG"));
+ langs << TQFile::decodeName(::getenv("LC_ALL"));
+ langs << TQFile::decodeName(::getenv("LC_MESSAGES"));
+ langs << TQFile::decodeName(::getenv("LANG"));
- for(QStringList::Iterator it = langs.begin();
+ for(TQStringList::Iterator it = langs.begin();
it != langs.end();
++it )
{
- QString ln, ct, chrset;
+ TQString ln, ct, chrset;
KLocale::splitLocale(*it, ln, ct, chrset);
/*
We don't use these in zip themes...
@@ -206,8 +206,8 @@ QStringList ThemeLocale::languageList()
}
languageList += langs;
// Remove empty strings
- QStringList::Iterator end( languageList.end() );
- for(QStringList::Iterator it=languageList.begin(); it!=end;)
+ TQStringList::Iterator end( languageList.end() );
+ for(TQStringList::Iterator it=languageList.begin(); it!=end;)
{
if((*it).isEmpty())
it = languageList.remove(it);
@@ -330,7 +330,7 @@ hash_string (const char *str_param)
/* Load the message catalogs specified by device. If it is no valid
message catalog do nothing. */
-void tl_nl_load_domain (QIODevice* device, int size,
+void tl_nl_load_domain (TQIODevice* device, int size,
struct sk_kde_loaded_l10nfile *domain_file)
{
struct mo_file_header *data = (struct mo_file_header *) -1;
diff --git a/superkaramba/src/themelocale.h b/superkaramba/src/themelocale.h
index 33b6c4e..3bb079a 100644
--- a/superkaramba/src/themelocale.h
+++ b/superkaramba/src/themelocale.h
@@ -20,8 +20,8 @@
#ifndef THEMELOCALE_H
#define THEMELOCALE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class ThemeFile;
@@ -42,16 +42,16 @@ class ThemeLocale
ThemeLocale(ThemeFile* theme);
~ThemeLocale();
- QString translate(QString text) const;
- void setLanguage(const QStringList &languages);
- QString language() const { return m_language; };
+ TQString translate(TQString text) const;
+ void setLanguage(const TQStringList &languages);
+ TQString language() const { return m_language; };
- static QStringList languageList();
+ static TQStringList languageList();
private:
sk_kde_loaded_l10nfile m_domain;
ThemeFile* m_theme;
- QString m_language;
+ TQString m_language;
void unload();
};
diff --git a/superkaramba/src/themesdlg.cpp b/superkaramba/src/themesdlg.cpp
index 655c982..f483a04 100644
--- a/superkaramba/src/themesdlg.cpp
+++ b/superkaramba/src/themesdlg.cpp
@@ -42,16 +42,16 @@
#include <kapplication.h>
#include <kiconloader.h>
#include <klocale.h>
-#include <qlineedit.h>
-#include <qtable.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qptrlist.h>
+#include <tqlineedit.h>
+#include <tqtable.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqptrlist.h>
#include <kio/job.h>
#include <kprotocolinfo.h>
-ThemesDlg::ThemesDlg(QWidget *parent, const char *name)
+ThemesDlg::ThemesDlg(TQWidget *parent, const char *name)
: ThemesLayout(parent, name)
{
populateListbox();
@@ -75,18 +75,18 @@ ThemesDlg::~ThemesDlg()
void ThemesDlg::saveUserAddedThemes()
{
KStandardDirs ksd;
- QStringList t = themes();
- QStringList dirs = ksd.findDirs("data", QString(kapp->name()) + "/themes");
- QStringList::Iterator it = t.begin();
+ TQStringList t = themes();
+ TQStringList dirs = ksd.findDirs("data", TQString(kapp->name()) + "/themes");
+ TQStringList::Iterator it = t.begin();
bool remove;
while(it != t.end())
{
remove = false;
- QStringList::Iterator jtend( dirs.end() );
- for(QStringList::Iterator jt = dirs.begin(); jt != jtend; ++jt)
+ TQStringList::Iterator jtend( dirs.end() );
+ for(TQStringList::Iterator jt = dirs.begin(); jt != jtend; ++jt)
{
- if(QFileInfo(*it).dir().path() + "/" == *jt)
+ if(TQFileInfo(*it).dir().path() + "/" == *jt)
{
remove = true;
break;
@@ -101,9 +101,9 @@ void ThemesDlg::saveUserAddedThemes()
SuperKarambaSettings::writeConfig();
}
-QStringList ThemesDlg::themes()
+TQStringList ThemesDlg::themes()
{
- QStringList result;
+ TQStringList result;
ThemeWidget* w;
for(uint i = 2; i < tableThemes->count(); ++i)
@@ -118,9 +118,9 @@ QStringList ThemesDlg::themes()
void ThemesDlg::populateListbox()
{
ThemeWidget* item;
- QDir dir;
- QStringList dirs;
- QStringList t;
+ TQDir dir;
+ TQStringList dirs;
+ TQStringList t;
KStandardDirs ksd;
tableThemes->clear();
@@ -134,8 +134,8 @@ void ThemesDlg::populateListbox()
item->buttonGo->setText(i18n("New Stuff..."));
#ifdef HAVE_KNEWSTUFF
item->buttonGo->setEnabled(true);
- connect(item->buttonGo, SIGNAL(clicked()),
- this, SLOT(getNewStuff()));
+ connect(item->buttonGo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(getNewStuff()));
#else
item->buttonGo->setEnabled(false);
#endif
@@ -148,28 +148,28 @@ void ThemesDlg::populateListbox()
item->setDescriptionText(i18n("Add local theme to the list."));
item->buttonGo->setProperty("stdItem", 18);
item->buttonGo->setText(i18n("Open..."));
- connect(item->buttonGo, SIGNAL(clicked()),
- this, SLOT(openLocalTheme()));
+ connect(item->buttonGo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(openLocalTheme()));
tableThemes->insertItem(item);
- dirs = ksd.findDirs("data", QString(kapp->name()) + "/themes");
+ dirs = ksd.findDirs("data", TQString(kapp->name()) + "/themes");
// Get custom dirs from config here?
- QStringList::Iterator itend( dirs.end() );
- for(QStringList::Iterator it = dirs.begin(); it != itend; ++it )
+ TQStringList::Iterator itend( dirs.end() );
+ for(TQStringList::Iterator it = dirs.begin(); it != itend; ++it )
{
dir.setPath(*it);
t = dir.entryList("*.skz; *.theme");
- for(QStringList::Iterator it = t.begin(); it != t.end(); ++it )
+ for(TQStringList::Iterator it = t.begin(); it != t.end(); ++it )
{
item = new ThemeWidget(new ThemeFile(dir.filePath(*it)));
tableThemes->insertItem(item);
item->buttonGo->setText(i18n("Uninstall"));
- connect(item->buttonGo, SIGNAL(clicked()),
- this, SLOT(uninstall()));
+ connect(item->buttonGo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(uninstall()));
}
}
t = SuperKarambaSettings::userAddedThemes();
- for(QStringList::Iterator it = t.begin(); it != t.end(); ++it )
+ for(TQStringList::Iterator it = t.begin(); it != t.end(); ++it )
{
ThemeFile* file = new ThemeFile(*it);
@@ -178,8 +178,8 @@ void ThemesDlg::populateListbox()
item = new ThemeWidget(file);
tableThemes->insertItem(item);
item->buttonGo->setText(i18n("Uninstall"));
- connect(item->buttonGo, SIGNAL(clicked()),
- this, SLOT(uninstall()));
+ connect(item->buttonGo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(uninstall()));
}
else
delete file;
@@ -195,22 +195,22 @@ void ThemesDlg::addToDesktop()
ThemeFile* tf = w->themeFile();
if(tf)
{
- (new karamba(tf->file(), QString()))->show();
+ (new karamba(tf->file(), TQString()))->show();
}
}
}
void ThemesDlg::openLocalTheme()
{
- QStringList fileNames;
+ TQStringList fileNames;
fileNames = KFileDialog::getOpenFileNames(":<themes>",
i18n("*.theme *.skz|Themes"),
this, i18n("Open Themes"));
- for(QStringList::Iterator it = fileNames.begin(); it != fileNames.end(); ++it)
+ for(TQStringList::Iterator it = fileNames.begin(); it != fileNames.end(); ++it)
{
ThemeFile file(*it);
if(file.isValid())
- (new karamba(*it, QString()))->show();
+ (new karamba(*it, TQString()))->show();
}
}
@@ -220,7 +220,7 @@ void ThemesDlg::getNewStuff()
KConfig* config = KGlobal::config();
config->setGroup("KNewStuff");
config->writePathEntry("ProvidersUrl",
- QString::fromLatin1("http://download.kde.org/khotnewstuff/karamba-providers.xml"));
+ TQString::fromLatin1("http://download.kde.org/khotnewstuff/karamba-providers.xml"));
config->sync();
m_newStuffStatus = config->entryMap("KNewStuffStatus").keys();
//This check is b/c KNewStuff will download, throw an error,
@@ -250,7 +250,7 @@ void ThemesDlg::selectionChanged(int index)
w->showButton(true);
}
-int ThemesDlg::themeIndex(QString file)
+int ThemesDlg::themeIndex(TQString file)
{
ThemeWidget* w;
file = ThemeFile::canonicalFile(file);
@@ -265,7 +265,7 @@ int ThemesDlg::themeIndex(QString file)
return -1;
}
-void ThemesDlg::addSkzThemeToDialog(const QString &file)
+void ThemesDlg::addSkzThemeToDialog(const TQString &file)
{
kdDebug() << "addSkzThemeToDialog(): file = " << file << endl;
addThemeToList(file);
@@ -273,13 +273,13 @@ void ThemesDlg::addSkzThemeToDialog(const QString &file)
}
void ThemesDlg::addThemeToDialog(const KArchiveDirectory *archiveDir,
- const QString& destDir)
+ const TQString& destDir)
{
kdDebug() << "addThemeToDialog(): destDir = " << destDir << endl;
- QStringList entries = archiveDir->entries();
+ TQStringList entries = archiveDir->entries();
- QStringList::Iterator end( entries.end() );
- for(QStringList::Iterator it = entries.begin(); it != end; ++it)
+ TQStringList::Iterator end( entries.end() );
+ for(TQStringList::Iterator it = entries.begin(); it != end; ++it)
{
if(archiveDir->entry(*it)->isDirectory())
{
@@ -288,7 +288,7 @@ void ThemesDlg::addThemeToDialog(const KArchiveDirectory *archiveDir,
}
else
{
- QFileInfo fi(*it);
+ TQFileInfo fi(*it);
if(fi.extension( FALSE ) == "theme")
{
addThemeToList(destDir + *it);
@@ -298,13 +298,13 @@ void ThemesDlg::addThemeToDialog(const KArchiveDirectory *archiveDir,
}
}
-void ThemesDlg::writeNewStuffConfig(const QString &file)
+void ThemesDlg::writeNewStuffConfig(const TQString &file)
{
#ifdef HAVE_KNEWSTUFF
KConfig* config = KGlobal::config();
- QStringList keys = config->entryMap("KNewStuffStatus").keys();
+ TQStringList keys = config->entryMap("KNewStuffStatus").keys();
- for(QStringList::Iterator it = m_newStuffStatus.begin();
+ for(TQStringList::Iterator it = m_newStuffStatus.begin();
it != m_newStuffStatus.end(); ++it)
{
keys.remove(*it);
@@ -322,20 +322,20 @@ void ThemesDlg::configSanityCheck()
{
#ifdef HAVE_KNEWSTUFF
KConfig* config = KGlobal::config();
- QStringList statusKeys = config->entryMap("KNewStuffStatus").keys();
- QStringList nameKeys = config->entryMap("KNewStuffNames").keys();
- QStringList removeList;
+ TQStringList statusKeys = config->entryMap("KNewStuffStatus").keys();
+ TQStringList nameKeys = config->entryMap("KNewStuffNames").keys();
+ TQStringList removeList;
- for(QStringList::Iterator it = statusKeys.begin();
+ for(TQStringList::Iterator it = statusKeys.begin();
it != statusKeys.end(); ++it)
{
- QString keyName(*it);
+ TQString keyName(*it);
bool removeKey = true;
config->setGroup("KNewStuffNames");
- for(QStringList::Iterator it2 = nameKeys.begin();
+ for(TQStringList::Iterator it2 = nameKeys.begin();
it2 != nameKeys.end(); ++it2)
{
- QString tempName(config->readEntry(*it2));
+ TQString tempName(config->readEntry(*it2));
if( tempName.compare(keyName) == 0)
{
removeKey = false;
@@ -353,7 +353,7 @@ void ThemesDlg::configSanityCheck()
#endif
}
-int ThemesDlg::addThemeToList(const QString &file)
+int ThemesDlg::addThemeToList(const TQString &file)
{
kdDebug() << "addThemeToList() file: " << file << endl;
int i = themeIndex(file);
@@ -363,14 +363,14 @@ int ThemesDlg::addThemeToList(const QString &file)
i = tableThemes->insertItem(item);
item->buttonGo->setText(i18n("Uninstall"));
- connect(item->buttonGo, SIGNAL(clicked()),
- this, SLOT(uninstall()));
+ connect(item->buttonGo, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(uninstall()));
}
tableThemes->setSelected(i);
return i;
}
-int ThemesDlg::addTheme(const QString& , const QString &file)
+int ThemesDlg::addTheme(const TQString& , const TQString &file)
{
int i = addThemeToList(file);
int result = -1;
@@ -382,7 +382,7 @@ int ThemesDlg::addTheme(const QString& , const QString &file)
return result;
}
-void ThemesDlg::removeTheme(const QString&, const QString& file, int instance)
+void ThemesDlg::removeTheme(const TQString&, const TQString& file, int instance)
{
int i = themeIndex(file);
@@ -392,12 +392,12 @@ void ThemesDlg::removeTheme(const QString&, const QString& file, int instance)
karambaApp->buildToolTip();
}
-void ThemesDlg::search(const QString&)
+void ThemesDlg::search(const TQString&)
{
tableThemes->showItems(&filter, this);
}
-bool ThemesDlg::filter(int index, QWidget* widget, void* data)
+bool ThemesDlg::filter(int index, TQWidget* widget, void* data)
{
if(index < 2)
return true;
@@ -409,7 +409,7 @@ bool ThemesDlg::filter(int index, QWidget* widget, void* data)
if(w->instances() == 0)
return false;
- QString searchText = dlg->editSearch->text().lower();
+ TQString searchText = dlg->editSearch->text().lower();
if(searchText.isEmpty())
{
return true;
@@ -424,7 +424,7 @@ bool ThemesDlg::filter(int index, QWidget* widget, void* data)
return false;
}
-bool ThemesDlg::isDownloaded( const QString& path )
+bool ThemesDlg::isDownloaded( const TQString& path )
{
kdDebug() << "isDownloaded path: " << path << endl;
KConfig* config = KGlobal::config();
@@ -438,7 +438,7 @@ void ThemesDlg::uninstall()
ThemeFile* tf = w->themeFile();
KURL trash("trash:/");
KURL theme(tf->file());
- QString tempPath(tf->path());
+ TQString tempPath(tf->path());
karambaApp->dcopIface()->closeTheme(tf->name());
if(!KProtocolInfo::isKnownProtocol(trash))
@@ -450,8 +450,8 @@ void ThemesDlg::uninstall()
//Don't move it to the trash if it is a local theme
if(isDownloaded(tempPath))
{
- QFileInfo remPath(tf->path());
- QDir remDir(remPath.dir());
+ TQFileInfo remPath(tf->path());
+ TQDir remDir(remPath.dir());
remDir.cdUp();
kdDebug() << "moving " << remDir.path() << " to the trash" << endl;
KIO::move(remDir.path(), trash);
@@ -460,7 +460,7 @@ void ThemesDlg::uninstall()
//some themes have multiple .theme files
//find all .themes that could be listed in the dialog for the directory removed
- QPtrList<ThemeWidget> list;
+ TQPtrList<ThemeWidget> list;
for(uint i = 2; i < tableThemes->count(); ++i)
{
ThemeWidget* tempW = static_cast<ThemeWidget*>(tableThemes->item(i));
@@ -480,7 +480,7 @@ void ThemesDlg::uninstall()
// Remove theme from KNewStuffStatus
KConfig* config = KGlobal::config();
config->setGroup("KNewStuffNames");
- QString name = config->readEntry(tempPath);
+ TQString name = config->readEntry(tempPath);
if(!name.isEmpty())
{
kdDebug() << "removing " << tempPath << " under KNewStuffNames from superkarambarc"
@@ -500,8 +500,8 @@ void ThemesDlg::uninstall()
kdDebug() << "encountered skz theme" << endl;
if(isDownloaded(theme.path()))
{
- QFileInfo remPath(theme.path());
- QDir remDir(remPath.dir());
+ TQFileInfo remPath(theme.path());
+ TQDir remDir(remPath.dir());
kdDebug() << "moving " << remDir.path() << " to the trash" << endl;
KIO::move(remDir.path(), trash);
}
@@ -510,7 +510,7 @@ void ThemesDlg::uninstall()
// Remove theme from KNewStuffStatus
KConfig* config = KGlobal::config();
config->setGroup("KNewStuffNames");
- QString name = config->readEntry(theme.path());
+ TQString name = config->readEntry(theme.path());
if(!name.isEmpty())
{
kdDebug() << "removing " << theme.path() << " from superkarambarc" << endl;
@@ -525,9 +525,9 @@ void ThemesDlg::uninstall()
selectionChanged(tableThemes->selected());
}
-QStringList ThemesDlg::runningThemes()
+TQStringList ThemesDlg::runningThemes()
{
- QStringList list;
+ TQStringList list;
ThemeWidget* w;
for(uint i = 2; i < tableThemes->count(); ++i)
diff --git a/superkaramba/src/themesdlg.h b/superkaramba/src/themesdlg.h
index 268a392..2c9976f 100644
--- a/superkaramba/src/themesdlg.h
+++ b/superkaramba/src/themesdlg.h
@@ -42,38 +42,38 @@ class ThemesDlg : public ThemesLayout
Q_OBJECT
public:
- ThemesDlg(QWidget *parent = 0, const char *name = 0);
+ ThemesDlg(TQWidget *parent = 0, const char *name = 0);
~ThemesDlg();
- int addTheme(const QString &appId, const QString &file);
- void removeTheme(const QString &appId, const QString &file, int instance);
- int addThemeToList(const QString &file);
- void addSkzThemeToDialog(const QString &file);
- void addThemeToDialog(const KArchiveDirectory *archiveDir, const QString& destDir);
- void writeNewStuffConfig(const QString &file);
+ int addTheme(const TQString &appId, const TQString &file);
+ void removeTheme(const TQString &appId, const TQString &file, int instance);
+ int addThemeToList(const TQString &file);
+ void addSkzThemeToDialog(const TQString &file);
+ void addThemeToDialog(const KArchiveDirectory *archiveDir, const TQString& destDir);
+ void writeNewStuffConfig(const TQString &file);
void configSanityCheck();
- bool isDownloaded(const QString &path);
+ bool isDownloaded(const TQString &path);
void saveUserAddedThemes();
- QStringList runningThemes();
+ TQStringList runningThemes();
protected slots:
virtual void addToDesktop();
virtual void selectionChanged(int);
virtual void openLocalTheme();
virtual void getNewStuff();
- virtual void search(const QString& text);
+ virtual void search(const TQString& text);
virtual void uninstall();
protected:
- static bool filter(int index, QWidget* widget, void* data);
+ static bool filter(int index, TQWidget* widget, void* data);
void populateListbox();
- int themeIndex(QString file);
- QStringList themes();
+ int themeIndex(TQString file);
+ TQStringList themes();
#ifdef HAVE_KNEWSTUFF
private:
SKNewStuff *mNewStuff;
- QStringList m_newStuffStatus;
+ TQStringList m_newStuffStatus;
#endif
};
diff --git a/superkaramba/src/themewidget.cpp b/superkaramba/src/themewidget.cpp
index c28e3cf..cad020c 100644
--- a/superkaramba/src/themewidget.cpp
+++ b/superkaramba/src/themewidget.cpp
@@ -22,10 +22,10 @@
#include <kpushbutton.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
-ThemeWidget::ThemeWidget(QWidget *parent, const char *name)
+ThemeWidget::ThemeWidget(TQWidget *parent, const char *name)
: ThemeWidgetLayout(parent, name), m_themeFile(0)
{
running->setText("");
@@ -35,10 +35,10 @@ ThemeWidget::ThemeWidget(QWidget *parent, const char *name)
ThemeWidget::ThemeWidget(ThemeFile* tf)
: m_themeFile(tf)
{
- QPixmap pixmap = m_themeFile->icon();
+ TQPixmap pixmap = m_themeFile->icon();
if(!pixmap.isNull())
icon->setPixmap(pixmap);
- QString version;
+ TQString version;
if(!m_themeFile->version().isEmpty())
version = " - " + m_themeFile->version();
themeName->setText(
@@ -80,12 +80,12 @@ void ThemeWidget::updateRunning()
running->setText("");
}
-void ThemeWidget::setDescriptionText(QString text)
+void ThemeWidget::setDescriptionText(TQString text)
{
description->setText(text);
}
-void ThemeWidget::setHeaderText(QString text)
+void ThemeWidget::setHeaderText(TQString text)
{
themeName->setText(text);
}
diff --git a/superkaramba/src/themewidget.h b/superkaramba/src/themewidget.h
index 4107716..011bbe9 100644
--- a/superkaramba/src/themewidget.h
+++ b/superkaramba/src/themewidget.h
@@ -31,7 +31,7 @@ class ThemeWidget : public ThemeWidgetLayout
{
Q_OBJECT
public:
- ThemeWidget(QWidget *parent = 0, const char *name = 0);
+ ThemeWidget(TQWidget *parent = 0, const char *name = 0);
ThemeWidget(ThemeFile* tf);
~ThemeWidget();
@@ -41,8 +41,8 @@ class ThemeWidget : public ThemeWidgetLayout
int instances() const { return m_instancePool.count(); };
void removeInstance(int instance);
- void setDescriptionText(QString text);
- void setHeaderText(QString text);
+ void setDescriptionText(TQString text);
+ void setHeaderText(TQString text);
void showButton(bool show);
protected:
@@ -51,7 +51,7 @@ class ThemeWidget : public ThemeWidgetLayout
private:
ThemeFile* m_themeFile;
- QValueList<int> m_instancePool;
+ TQValueList<int> m_instancePool;
};
#endif
diff --git a/superkaramba/src/uptimesensor.cpp b/superkaramba/src/uptimesensor.cpp
index 5d794a2..1dcc280 100644
--- a/superkaramba/src/uptimesensor.cpp
+++ b/superkaramba/src/uptimesensor.cpp
@@ -7,7 +7,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
-#include <qglobal.h>
+#include <tqglobal.h>
#if defined __FreeBSD__
#include <sys/time.h>
@@ -65,16 +65,16 @@ void UptimeSensor::update()
secs = uptime % 60;
}
#else
- QFile file("/proc/uptime");
- QString line;
+ TQFile file("/proc/uptime");
+ TQString line;
if ( file.open(IO_ReadOnly | IO_Translate) )
{
// file opened successfully
- QTextStream t( &file ); // use a text stream
+ TQTextStream t( &file ); // use a text stream
line = t.readLine(); // line of text excluding '\n'
file.close();
- QRegExp rx( "^\\d+" );
+ TQRegExp rx( "^\\d+" );
rx.search(line);
int uptime = rx.cap(0).toInt();
int days = uptime / 86400;
@@ -86,11 +86,11 @@ void UptimeSensor::update()
int secs = uptime;
#endif
- QString format;
+ TQString format;
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
while (it != 0)
{
sp = (SensorParams*)(*it);
@@ -101,13 +101,13 @@ void UptimeSensor::update()
{
format = "%dd %h:%M";
}
- format.replace( QRegExp("%d"), QString::number(days));
- format.replace( QRegExp("%H"), QString::number(hours).rightJustify(2,'0'));
- format.replace( QRegExp("%M"), QString::number(mins).rightJustify(2,'0'));
- format.replace( QRegExp("%S"), QString::number(secs).rightJustify(2,'0'));
- format.replace( QRegExp("%h"), QString::number(hours));
- format.replace( QRegExp("%m"), QString::number(mins));
- format.replace( QRegExp("%s"), QString::number(secs));
+ format.replace( TQRegExp("%d"), TQString::number(days));
+ format.replace( TQRegExp("%H"), TQString::number(hours).rightJustify(2,'0'));
+ format.replace( TQRegExp("%M"), TQString::number(mins).rightJustify(2,'0'));
+ format.replace( TQRegExp("%S"), TQString::number(secs).rightJustify(2,'0'));
+ format.replace( TQRegExp("%h"), TQString::number(hours));
+ format.replace( TQRegExp("%m"), TQString::number(mins));
+ format.replace( TQRegExp("%s"), TQString::number(secs));
meter->setValue(format);
++it;
diff --git a/superkaramba/src/uptimesensor.h b/superkaramba/src/uptimesensor.h
index 061a876..5459956 100644
--- a/superkaramba/src/uptimesensor.h
+++ b/superkaramba/src/uptimesensor.h
@@ -11,11 +11,11 @@
#define UPTIMESENSOR_H
#include "sensor.h"
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
class UptimeSensor : public Sensor
{
diff --git a/superkaramba/src/widget_python.cpp b/superkaramba/src/widget_python.cpp
index 8d5d8e7..0948e39 100644
--- a/superkaramba/src/widget_python.cpp
+++ b/superkaramba/src/widget_python.cpp
@@ -27,7 +27,7 @@
#endif
#include <Python.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "karamba.h"
#include "meter.h"
#include "meter_python.h"
@@ -62,9 +62,9 @@ PyObject* py_get_widget_position(PyObject *, PyObject *args)
long createWidgetMask(long widget, char* path)
{
karamba* currTheme = (karamba*)widget;
- QBitmap bm;
- QString maskpath;
- QString rootPath;
+ TQBitmap bm;
+ TQString maskpath;
+ TQString rootPath;
rootPath.setAscii(currTheme->theme().path().ascii());
currTheme->clearMask();
@@ -74,7 +74,7 @@ long createWidgetMask(long widget, char* path)
if(currTheme->theme().isZipTheme())
{
- QByteArray ba = currTheme->theme().readThemeFile(path);
+ TQByteArray ba = currTheme->theme().readThemeFile(path);
bm.loadFromData(ba);
}
else
diff --git a/superkaramba/src/xmmssensor.cpp b/superkaramba/src/xmmssensor.cpp
index de7fa7f..268700b 100644
--- a/superkaramba/src/xmmssensor.cpp
+++ b/superkaramba/src/xmmssensor.cpp
@@ -10,14 +10,14 @@
#include "xmmssensor.h"
#ifdef HAVE_XMMS
-#include <qlibrary.h>
+#include <tqlibrary.h>
class XMMSSensor::XMMS
{
public:
XMMS() : libxmms( 0 )
{
- libxmms = new QLibrary( "xmms.so.1" );
+ libxmms = new TQLibrary( "xmms.so.1" );
if ( !libxmms->load() )
{
delete libxmms;
@@ -101,7 +101,7 @@ public:
}
private:
- QLibrary* libxmms;
+ TQLibrary* libxmms;
bool (*xmms_remote_is_running)(int);
bool (*xmms_remote_is_playing)(int);
@@ -124,17 +124,17 @@ public:
#endif // HAVE_XMMS
-XMMSSensor::XMMSSensor( int interval, const QString &encoding )
+XMMSSensor::XMMSSensor( int interval, const TQString &encoding )
: Sensor( interval ), xmms( 0 )
{
if( !encoding.isEmpty() )
{
- codec = QTextCodec::codecForName( encoding.ascii() );
+ codec = TQTextCodec::codecForName( encoding.ascii() );
if ( codec == 0)
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
}
else
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
xmms = new XMMS();
@@ -146,15 +146,15 @@ XMMSSensor::~XMMSSensor()
void XMMSSensor::update()
{
- QString format;
+ TQString format;
SensorParams *sp;
Meter *meter;
- QObjectListIt it( *objList );
+ TQObjectListIt it( *objList );
#ifdef HAVE_XMMS
int pos;
- QString title;
+ TQString title;
int songLength = 0;
int currentTime = 0;
bool isPlaying = false;
@@ -165,7 +165,7 @@ void XMMSSensor::update()
isPlaying = xmms->isPlaying(0);
pos = xmms->getPlaylistPos(0);
qDebug("unicode start");
- title = codec->toUnicode( QCString( xmms->getPlaylistTitle( 0, pos ) ) );
+ title = codec->toUnicode( TQCString( xmms->getPlaylistTitle( 0, pos ) ) );
qDebug("unicode end");
if( title.isEmpty() )
title = "XMMS";
@@ -210,19 +210,19 @@ void XMMSSensor::update()
{
- format.replace( QRegExp("%title", false), title );
+ format.replace( TQRegExp("%title", false), title );
- format.replace( QRegExp("%length", false), QTime( 0,0,0 ).
+ format.replace( TQRegExp("%length", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.toString( "h:mm:ss" ) );
- format.replace( QRegExp("%time", false), QTime( 0,0,0 ).
+ format.replace( TQRegExp("%time", false), TQTime( 0,0,0 ).
addMSecs( currentTime )
.toString( "h:mm:ss" ) );
if( isPlaying )
{
- format.replace( QRegExp("%remain", false), QTime( 0,0,0 ).
+ format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).
addMSecs( songLength )
.addMSecs(-currentTime )
.toString( "h:mm:ss" ) );
@@ -230,7 +230,7 @@ void XMMSSensor::update()
else
{
- format.replace( QRegExp("%remain", false), QTime( 0,0,0 ).toString("h:mm:ss" ) );
+ format.replace( TQRegExp("%remain", false), TQTime( 0,0,0 ).toString("h:mm:ss" ) );
}
meter->setValue(format);
}
@@ -251,7 +251,7 @@ void XMMSSensor::setMaxValue( SensorParams *sp)
{
Meter *meter;
meter = sp->getMeter();
- QString f;
+ TQString f;
f = sp->getParam("FORMAT");
if ( f == "%full" )
diff --git a/superkaramba/src/xmmssensor.h b/superkaramba/src/xmmssensor.h
index 622eb8d..bda6b88 100644
--- a/superkaramba/src/xmmssensor.h
+++ b/superkaramba/src/xmmssensor.h
@@ -14,9 +14,9 @@
#include <config.h>
#endif
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include "sensor.h"
@@ -24,14 +24,14 @@ class XMMSSensor : public Sensor
{
Q_OBJECT
public:
- XMMSSensor( int interval, const QString &encoding=QString::null );
+ XMMSSensor( int interval, const TQString &encoding=TQString::null );
~XMMSSensor();
void update();
void setMaxValue( SensorParams *);
bool hasXMMS() const;
private:
- QTextCodec *codec;
+ TQTextCodec *codec;
class XMMS;
XMMS *xmms;