summaryrefslogtreecommitdiffstats
path: root/ksim/library
diff options
context:
space:
mode:
Diffstat (limited to 'ksim/library')
-rw-r--r--ksim/library/chart.cpp56
-rw-r--r--ksim/library/chart.h17
-rw-r--r--ksim/library/common.h4
-rw-r--r--ksim/library/label.cpp60
-rw-r--r--ksim/library/label.h21
-rw-r--r--ksim/library/led.cpp42
-rw-r--r--ksim/library/led.h23
-rw-r--r--ksim/library/pluginglobal.cpp4
-rw-r--r--ksim/library/pluginloader.cpp32
-rw-r--r--ksim/library/pluginloader.h13
-rw-r--r--ksim/library/pluginmodule.cpp34
-rw-r--r--ksim/library/pluginmodule.h14
-rw-r--r--ksim/library/progress.cpp32
-rw-r--r--ksim/library/progress.h25
-rw-r--r--ksim/library/themeloader.cpp114
-rw-r--r--ksim/library/themetypes.h6
16 files changed, 252 insertions, 245 deletions
diff --git a/ksim/library/chart.cpp b/ksim/library/chart.cpp
index 12ff945..b78327b 100644
--- a/ksim/library/chart.cpp
+++ b/ksim/library/chart.cpp
@@ -80,7 +80,7 @@ TQTimer *KSim::Chart::Timer::m_timer = 0;
class KSim::Chart::Private
{
public:
- typedef QPair<int, int> ValuePair;
+ typedef TQPair<int, int> ValuePair;
TQSize size;
int type;
@@ -107,15 +107,15 @@ class KSim::Chart::Private
};
KSim::Chart::Chart(bool showKrell, int maxValue,
- const TQString &title, TQWidget *parent, const char *name,
- WFlags fl) : TQWidget(parent, name, fl)
+ const TQString &title, TQWidget *tqparent, const char *name,
+ WFlags fl) : TQWidget(tqparent, name, fl)
{
init(showKrell, maxValue, title);
}
KSim::Chart::Chart(bool showKrell, int maxValue,
- TQWidget *parent, const char *name, WFlags fl)
- : TQWidget(parent, name, fl)
+ TQWidget *tqparent, const char *name, WFlags fl)
+ : TQWidget(tqparent, name, fl)
{
init(showKrell, maxValue, i18n("None"));
}
@@ -232,7 +232,7 @@ void KSim::Chart::buildPixmaps()
}
else {
kdDebug(2003) << className() << ": Using chartInColor() = "
- << d->dataInColour.name() << endl;
+ << TQString(d->dataInColour.name()) << endl;
}
image.reset();
@@ -245,13 +245,13 @@ void KSim::Chart::buildPixmaps()
}
else {
kdDebug(2003) << className() << ": Using chartOutColor() = "
- << d->dataOutColour.name() << endl;
+ << TQString(d->dataOutColour.name()) << endl;
}
}
-void KSim::Chart::configureObject(bool repaintWidget)
+void KSim::Chart::configureObject(bool tqrepaintWidget)
{
- TQSize oldSize = sizeHint();
+ TQSize oldSize = tqsizeHint();
KSim::Config::config()->setGroup("Misc");
d->size = KSim::Config::config()->readSizeEntry("GraphSize");
@@ -263,11 +263,11 @@ void KSim::Chart::configureObject(bool repaintWidget)
d->krell->show();
}
- // Update our geometry if we need to let any
- // layout know about our sizeHint() change
- if (oldSize != sizeHint()) {
+ // Update our tqgeometry if we need to let any
+ // tqlayout know about our tqsizeHint() change
+ if (oldSize != tqsizeHint()) {
// Using resize() here seems to be needed
- resize(sizeHint());
+ resize(tqsizeHint());
updateGeometry();
}
@@ -275,18 +275,18 @@ void KSim::Chart::configureObject(bool repaintWidget)
setConfigValues();
- if (repaintWidget)
+ if (tqrepaintWidget)
update();
}
-TQSize KSim::Chart::sizeHint() const
+TQSize KSim::Chart::tqsizeHint() const
{
return d->size;
}
-TQSize KSim::Chart::minimumSizeHint() const
+TQSize KSim::Chart::tqminimumSizeHint() const
{
- return sizeHint();
+ return tqsizeHint();
}
void KSim::Chart::resizeEvent(TQResizeEvent *re)
@@ -333,19 +333,19 @@ void KSim::Chart::setDisplayMeter(bool value)
void KSim::Chart::setText(const TQString &in, const TQString &out)
{
- bool repaint = false;
+ bool tqrepaint = false;
if (d->inText != in) {
- repaint = true;
+ tqrepaint = true;
d->inText = in;
}
if (d->outText != out) {
- repaint = true;
+ tqrepaint = true;
d->outText = out;
}
- if (repaint)
+ if (tqrepaint)
update();
}
@@ -373,7 +373,7 @@ void KSim::Chart::setMaxValue(int maxValue)
void KSim::Chart::setValue(int valueIn, int valueOut)
{
- d->values.prepend(qMakePair(range(valueIn), range(valueOut)));
+ d->values.prepend(tqMakePair(range(valueIn), range(valueOut)));
if (d->variableGraphs) {
d->maxValues.prepend(valueIn > valueOut ? valueIn : valueOut);
@@ -407,13 +407,13 @@ void KSim::Chart::setValue(int valueIn, int valueOut)
void KSim::Chart::setConfigValues()
{
TQFont newFont = font();
- bool repaint = themeLoader().current().fontColours(this,
+ bool tqrepaint = themeLoader().current().fontColours(this,
newFont, d->mColour, d->sColour, d->showShadow);
if (font() != newFont)
setFont(newFont);
- if (repaint)
+ if (tqrepaint)
update();
}
@@ -446,7 +446,7 @@ void KSim::Chart::paintEvent(TQPaintEvent *)
const TQSize &size = chartSize();
TQPixmap pixmap(size);
TQPainter painter;
- painter.begin(&pixmap, this);
+ painter.tqbegin(&pixmap, this);
int location = size.height() / 5;
painter.drawPixmap(0, 0, d->chartPixmap);
@@ -521,7 +521,7 @@ void KSim::Chart::drawChart()
TQPainter painter;
d->graphData.setMask(drawMask(&painter));
- painter.begin(&d->graphData, this);
+ painter.tqbegin(&d->graphData, this);
int position = width() - 1;
TQValueList<Private::ValuePair>::ConstIterator it;
@@ -553,7 +553,7 @@ TQSize KSim::Chart::chartSize() const
TQBitmap KSim::Chart::drawMask(TQPainter *painter)
{
TQBitmap bitmap(chartSize(), true);
- painter->begin(&bitmap, this);
+ painter->tqbegin(&bitmap, this);
painter->setPen(color1);
int position = width() - 1;
@@ -608,7 +608,7 @@ void KSim::Chart::init(bool krell, int maxValue, const TQString &title)
{
setConfigString("StyleChart");
setThemeConfigOnly(false);
- setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
d = new Private;
KSim::Config::config()->setGroup("Misc");
diff --git a/ksim/library/chart.h b/ksim/library/chart.h
index b51ab83..1eb5a93 100644
--- a/ksim/library/chart.h
+++ b/ksim/library/chart.h
@@ -36,6 +36,7 @@ namespace KSim
class KDE_EXPORT Chart : public TQWidget, public KSim::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
enum DataType { DataIn = 0, DataOut };
enum LabelType { Label = 0, Progress, Led };
@@ -46,10 +47,10 @@ namespace KSim
* @param minValue is the minimum value to show
* @param maxValue is the maximum value to show
* @param title is the title off the krell bar (if enabled)
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
Chart(bool displayMeter, int maxValue,
- const TQString &title, TQWidget *parent,
+ const TQString &title, TQWidget *tqparent,
const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::Chart.
@@ -57,10 +58,10 @@ namespace KSim
* @param showKrell is if the krellbar should be shown
* @param minValue is the minimum value to show
* @param maxValue is the maximum value to show
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
Chart(bool displayMeter, int maxValue,
- TQWidget *parent, const char *name = 0,
+ TQWidget *tqparent, const char *name = 0,
WFlags fl = 0);
/**
* destructs KSim::Chart
@@ -103,16 +104,16 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual void configureObject(bool repaintWidget = true);
+ virtual void configureObject(bool tqrepaintWidget = true);
/**
* reimplemented for internal reasons
*/
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
/**
* reimplemented for internal reasons
*/
- TQSize minimumSizeHint() const;
+ TQSize tqminimumSizeHint() const;
void disableAutomaticUpdates();
@@ -133,7 +134,7 @@ namespace KSim
/**
* sets the current text that apears in the top left hand corner
*/
- void setText(const TQString &in, const TQString &out = TQString::null);
+ void setText(const TQString &in, const TQString &out = TQString());
/**
* Sets the minimum value the graph will display
*/
diff --git a/ksim/library/common.h b/ksim/library/common.h
index 9fc01c0..e19310e 100644
--- a/ksim/library/common.h
+++ b/ksim/library/common.h
@@ -58,12 +58,12 @@ namespace KSim
* class Test : public TQWidget, virtual public KSim::Base
* {
* public:
- * Test(TQWidget *parent, const char *name) : TQWidget(parent, name)
+ * Test(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
* {
* }
* ~Test() {}
*
- * void configureObject(bool repaintWidget)
+ * void configureObject(bool tqrepaintWidget)
* {
* // Re-Create view code here
* }
diff --git a/ksim/library/label.cpp b/ksim/library/label.cpp
index 400b1c5..06f525e 100644
--- a/ksim/library/label.cpp
+++ b/ksim/library/label.cpp
@@ -50,20 +50,20 @@ class KSim::Label::Private
bool showShadow;
};
-KSim::Label::Label(TQWidget *parent, const char *name, WFlags fl)
- : TQWidget(parent, name, fl)
+KSim::Label::Label(TQWidget *tqparent, const char *name, WFlags fl)
+ : TQWidget(tqparent, name, fl)
{
initWidget(KSim::Types::None);
}
-KSim::Label::Label(int type, TQWidget *parent, const char *name,
- WFlags fl) : TQWidget(parent, name, fl)
+KSim::Label::Label(int type, TQWidget *tqparent, const char *name,
+ WFlags fl) : TQWidget(tqparent, name, fl)
{
initWidget(type);
}
-KSim::Label::Label(int type, const TQString &text, TQWidget *parent,
- const char *name, WFlags fl) : TQWidget(parent, name, fl)
+KSim::Label::Label(int type, const TQString &text, TQWidget *tqparent,
+ const char *name, WFlags fl) : TQWidget(tqparent, name, fl)
{
initWidget(type);
setText(text);
@@ -79,7 +79,7 @@ const TQString &KSim::Label::text() const
return d->text;
}
-void KSim::Label::configureObject(bool repaintWidget)
+void KSim::Label::configureObject(bool tqrepaintWidget)
{
TQString image = themeLoader().current().meterPixmap(type(), false);
if (image.isEmpty())
@@ -88,10 +88,10 @@ void KSim::Label::configureObject(bool repaintWidget)
d->meterImage.load(image);
KSim::ThemeLoader::self().reColourImage(d->meterImage);
d->background = d->meterImage.smoothScale(size());
- TQSize oldSize = sizeHint();
+ TQSize oldSize = tqsizeHint();
setConfigValues();
- relayoutLabel(oldSize, repaintWidget);
+ retqlayoutLabel(oldSize, tqrepaintWidget);
}
void KSim::Label::setPixmap(const TQPixmap &pixmap)
@@ -99,10 +99,10 @@ void KSim::Label::setPixmap(const TQPixmap &pixmap)
if (pixmap.serialNumber() == d->sidePixmap.serialNumber())
return;
- TQSize oldSize = sizeHint();
+ TQSize oldSize = tqsizeHint();
d->sidePixmap = pixmap;
- relayoutLabel(oldSize);
+ retqlayoutLabel(oldSize);
}
const TQPixmap &KSim::Label::pixmap() const
@@ -110,7 +110,7 @@ const TQPixmap &KSim::Label::pixmap() const
return d->sidePixmap;
}
-TQSize KSim::Label::sizeHint() const
+TQSize KSim::Label::tqsizeHint() const
{
int width = fontMetrics().size(SingleLine, text()).width();
if (!pixmap().isNull())
@@ -123,25 +123,25 @@ TQSize KSim::Label::sizeHint() const
return TQSize(width, height);
}
-TQSize KSim::Label::minimumSizeHint() const
+TQSize KSim::Label::tqminimumSizeHint() const
{
- return sizeHint();
+ return tqsizeHint();
}
void KSim::Label::clear()
{
- setText(TQString::null);
+ setText(TQString());
}
void KSim::Label::setText(const TQString &text)
{
if (text == d->text)
- return; // If the text is the same, no need to repaint etc
+ return; // If the text is the same, no need to tqrepaint etc
- TQSize oldSize = sizeHint();
- // set the text of our widget and repaint
+ TQSize oldSize = tqsizeHint();
+ // set the text of our widget and tqrepaint
d->text = text;
- relayoutLabel(oldSize);
+ retqlayoutLabel(oldSize);
}
void KSim::Label::extraTypeCall()
@@ -183,13 +183,13 @@ const TQColor &KSim::Label::shadowColour() const
void KSim::Label::setConfigValues()
{
TQFont newFont = font();
- bool repaint = themeLoader().current().fontColours(this,
+ bool tqrepaint = themeLoader().current().fontColours(this,
newFont, d->mColour, d->sColour, d->showShadow);
if (font() != newFont)
setFont(newFont);
- if (repaint)
+ if (tqrepaint)
update();
}
@@ -232,7 +232,7 @@ void KSim::Label::drawText(TQPainter *painter, const TQRect &rect,
if (!pixmap().isNull())
location.setX(pixmap().width() + 5);
- style().drawItem(painter, location, AlignCenter, colorGroup(), true,
+ tqstyle().drawItem(painter, location, AlignCenter, tqcolorGroup(), true,
0, text, -1, &color);
}
@@ -242,8 +242,8 @@ void KSim::Label::drawPixmap(TQPainter *painter, const TQRect &rect,
TQRect location(rect);
location.setWidth(pixmap.width());
- style().drawItem(painter, location, AlignCenter, colorGroup(), true,
- pixmap.isNull() ? 0 : &pixmap, TQString::null);
+ tqstyle().drawItem(painter, location, AlignCenter, tqcolorGroup(), true,
+ pixmap.isNull() ? 0 : &pixmap, TQString());
}
void KSim::Label::setTextLocation(const TQRect &rect)
@@ -268,21 +268,21 @@ const TQRect &KSim::Label::shadowLocation() const
void KSim::Label::setThemePixmap(const TQString &image)
{
- TQSize oldSize = sizeHint();
+ TQSize oldSize = tqsizeHint();
d->meterImage.reset();
d->meterImage.load(image);
KSim::ThemeLoader::self().reColourImage(d->meterImage);
d->background = d->meterImage.smoothScale(size());
- relayoutLabel(oldSize);
+ retqlayoutLabel(oldSize);
}
-void KSim::Label::relayoutLabel(const TQSize &old, bool repaint)
+void KSim::Label::retqlayoutLabel(const TQSize &old, bool tqrepaint)
{
- if (sizeHint() != old) {
+ if (tqsizeHint() != old) {
updateGeometry();
}
- if (repaint)
+ if (tqrepaint)
update();
}
@@ -294,7 +294,7 @@ void KSim::Label::initWidget(int type)
// try to reduce flicker as much as possible
setBackgroundMode(NoBackground);
- setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
TQSizePolicy::Fixed));
configureObject();
diff --git a/ksim/library/label.h b/ksim/library/label.h
index 7d77aa6..78136d4 100644
--- a/ksim/library/label.h
+++ b/ksim/library/label.h
@@ -37,11 +37,12 @@ namespace KSim
class KDE_EXPORT Label : public TQWidget, public KSim::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a KSim::Label.
*
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*
* Example usage:
* <pre>
@@ -50,12 +51,12 @@ namespace KSim
* To create a KSim::Label with the normal theme look
* @see KSim::ThemeLoader
*/
- Label(TQWidget *parent, const char *name = 0, WFlags fl = 0);
+ Label(TQWidget *tqparent, const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSimLabel.
*
* @param type is the theme type
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*
* Example usage:
* <pre>
@@ -65,13 +66,13 @@ namespace KSim
* NOTE: this is the same as the KSim::Label(TQWidget *, const char *, WFlags) ctor
* @see KSim::ThemeLoader
*/
- Label(int type, TQWidget *parent, const char *name = 0, WFlags fl = 0);
+ Label(int type, TQWidget *tqparent, const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::Label.
*
* @param type is the theme type
* @param text is the default text to display
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*
* Example usage:
* <pre>
@@ -81,7 +82,7 @@ namespace KSim
* @see KSim::ThemeLoader
*/
Label(int type, const TQString &text,
- TQWidget *parent, const char *name = 0, WFlags fl = 0);
+ TQWidget *tqparent, const char *name = 0, WFlags fl = 0);
/**
* destructs KSim::Label.
*/
@@ -95,7 +96,7 @@ namespace KSim
/**
* recreates the labels look & feel
*/
- virtual void configureObject(bool repaintWidget = true);
+ virtual void configureObject(bool tqrepaintWidget = true);
/**
* sets a pixmap for the label
*/
@@ -107,11 +108,11 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/**
* reimplemented for internal reasons
*/
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
public slots:
/**
@@ -195,7 +196,7 @@ namespace KSim
* sets the background image to be painted
*/
void setThemePixmap(const TQString &image);
- void relayoutLabel(const TQSize &old, bool repaint = true);
+ void retqlayoutLabel(const TQSize &old, bool tqrepaint = true);
private:
/**
diff --git a/ksim/library/led.cpp b/ksim/library/led.cpp
index a3d9e1c..6977304 100644
--- a/ksim/library/led.cpp
+++ b/ksim/library/led.cpp
@@ -77,14 +77,14 @@ void KSim::Led::setOn(bool force)
TQRect rect = d->splitter.coordinates(d->type == First ? 1 : 3);
if (d->pixmap.isNull() || rect.isEmpty()) {
resize(12, 8);
- fill(Qt::white);
+ fill(TQt::white);
return;
}
- if (d->pixmap.mask() && !d->pixmap.mask()->isNull()) {
- TQBitmap mask(rect.size());
- bitBlt(&mask, TQPoint(0, 0), d->pixmap.mask(), rect, CopyROP);
- setMask(mask);
+ if (d->pixmap.tqmask() && !d->pixmap.tqmask()->isNull()) {
+ TQBitmap tqmask(rect.size());
+ bitBlt(&tqmask, TQPoint(0, 0), d->pixmap.tqmask(), rect, CopyROP);
+ setMask(tqmask);
}
bitBlt(this, TQPoint(0, 0), &d->pixmap, rect, CopyROP);
@@ -100,14 +100,14 @@ void KSim::Led::setOff(bool force)
TQRect rect = d->splitter.coordinates(d->type == First ? 0 : 2);
if (d->pixmap.isNull() || rect.isEmpty()) {
resize(12, 8);
- fill(Qt::white);
+ fill(TQt::white);
return;
}
- if (d->pixmap.mask() && !d->pixmap.mask()->isNull()) {
- TQBitmap mask(rect.size());
- bitBlt(&mask, TQPoint(0, 0), d->pixmap.mask(), rect, CopyROP);
- setMask(mask);
+ if (d->pixmap.tqmask() && !d->pixmap.tqmask()->isNull()) {
+ TQBitmap tqmask(rect.size());
+ bitBlt(&tqmask, TQPoint(0, 0), d->pixmap.tqmask(), rect, CopyROP);
+ setMask(tqmask);
}
bitBlt(this, TQPoint(0, 0), &d->pixmap, rect, CopyROP);
@@ -184,24 +184,24 @@ class KSim::LedLabel::Private
};
KSim::LedLabel::LedLabel(int max, int type, const TQString &label,
- TQWidget *parent, const char *name, WFlags fl)
- : KSim::Progress(max, type, Panel, parent, name, fl)
+ TQWidget *tqparent, const char *name, WFlags fl)
+ : KSim::Progress(max, type, Panel, tqparent, name, fl)
{
init();
setText(label);
}
KSim::LedLabel::LedLabel(int max, int type,
- TQWidget *parent, const char *name, WFlags fl)
- : KSim::Progress(max, type, Panel, parent, name, fl)
+ TQWidget *tqparent, const char *name, WFlags fl)
+ : KSim::Progress(max, type, Panel, tqparent, name, fl)
{
init();
}
KSim::LedLabel::LedLabel(int max,
- TQWidget *parent, const char *name, WFlags fl)
+ TQWidget *tqparent, const char *name, WFlags fl)
: KSim::Progress(max, KSim::Types::None,
- Panel, parent, name, fl)
+ Panel, tqparent, name, fl)
{
init();
}
@@ -228,15 +228,15 @@ void KSim::LedLabel::configureObject(bool reapaintWidget)
d->sendLed.update();
setConfigValues();
- layoutLeds();
+ tqlayoutLeds();
if (reapaintWidget)
update();
}
-TQSize KSim::LedLabel::sizeHint() const
+TQSize KSim::LedLabel::tqsizeHint() const
{
- TQSize hint(Progress::sizeHint());
+ TQSize hint(Progress::tqsizeHint());
if (d->sendLed.height() > hint.height())
hint.setHeight(d->sendLed.height());
@@ -313,10 +313,10 @@ void KSim::LedLabel::paintEvent(TQPaintEvent *ev)
void KSim::LedLabel::resizeEvent(TQResizeEvent *ev)
{
KSim::Progress::resizeEvent(ev);
- layoutLeds();
+ tqlayoutLeds();
}
-void KSim::LedLabel::layoutLeds()
+void KSim::LedLabel::tqlayoutLeds()
{
int ledHeight = height() / 2;
diff --git a/ksim/library/led.h b/ksim/library/led.h
index a3ef85e..1d0cb4f 100644
--- a/ksim/library/led.h
+++ b/ksim/library/led.h
@@ -34,7 +34,7 @@ namespace KSim
* @short led using gkrellm themes
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT Led : public QPixmap
+ class KDE_EXPORT Led : public TQPixmap
{
public:
enum Type { First = 0, Second };
@@ -46,7 +46,7 @@ namespace KSim
* @param ImageName is the image to display
* the image's height is divided by 4 and each item is used for send in,
* send out, receive in and receive out
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
* @param name is the object instance name
*/
Led(Type type, const TQString &imageName);
@@ -88,7 +88,7 @@ namespace KSim
*/
Type type() const;
/**
- * Force the Led to repaint its state
+ * Force the Led to tqrepaint its state
*/
void update();
@@ -107,35 +107,36 @@ namespace KSim
class KDE_EXPORT LedLabel : public KSim::Progress
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a KSim::LedLabel.
*
* @param type is the theme type
* @param label is the default text to display
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
* @see KSim::ThemeLoader
*/
LedLabel(int max, int type, const TQString &label,
- TQWidget *parent, const char *name = 0, WFlags fl = 0);
+ TQWidget *tqparent, const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::LedLabel.
*
* @param type is the theme type
* @param label is the default text to display
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
* @see KSim::ThemeLoader
*/
- LedLabel(int max, int type, TQWidget *parent,
+ LedLabel(int max, int type, TQWidget *tqparent,
const char *name = 0, WFlags fl = 0);
/**
* Constructs a KSim::LedLabel.
*
* @param label is the default text to display
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
* @see KSim::ThemeLoader
*/
- LedLabel(int max, TQWidget *parent,
+ LedLabel(int max, TQWidget *tqparent,
const char *name = 0, WFlags fl = 0);
/**
* destructor for KSim::LedLabel.
@@ -149,7 +150,7 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
/**
@@ -183,7 +184,7 @@ namespace KSim
virtual void resizeEvent(TQResizeEvent *);
private:
- void layoutLeds();
+ void tqlayoutLeds();
void init();
class Private;
diff --git a/ksim/library/pluginglobal.cpp b/ksim/library/pluginglobal.cpp
index 3cbae68..34a38c3 100644
--- a/ksim/library/pluginglobal.cpp
+++ b/ksim/library/pluginglobal.cpp
@@ -157,7 +157,7 @@ bool KSim::Plugin::isNull() const
const TQString &KSim::Plugin::name() const
{
- return d ? d->name : TQString::null;
+ return d ? d->name : TQString();
}
TQPixmap KSim::Plugin::icon() const
@@ -172,7 +172,7 @@ TQCString KSim::Plugin::libName() const
const TQString &KSim::Plugin::fileName() const
{
- return d ? d->filename : TQString::null;
+ return d ? d->filename : TQString();
}
KSim::PluginObject *KSim::Plugin::plugin() const
diff --git a/ksim/library/pluginloader.cpp b/ksim/library/pluginloader.cpp
index 1a8bbd8..4fcf761 100644
--- a/ksim/library/pluginloader.cpp
+++ b/ksim/library/pluginloader.cpp
@@ -92,13 +92,13 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file)
case KSim::PluginLoader::EmptyLibName:
KMessageBox::error(0, i18n("KSim was unable to load the plugin %1"
" due to the X-KSIM-LIBRARY property being empty in the"
- " plugins desktop file").arg(file.readName()));
+ " plugins desktop file").tqarg(file.readName()));
return false;
break;
case KSim::PluginLoader::LibNotFound:
KMessageBox::error(0, i18n("KSim was unable to load the plugin %1"
" due to not being able to find the plugin, check that the plugin"
- " is installed and is in your $KDEDIR/lib path").arg(file.readName()));
+ " is installed and is in your $KDEDIR/lib path").tqarg(file.readName()));
return false;
break;
case KSim::PluginLoader::UnSymbols:
@@ -108,8 +108,8 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file)
" macro</li>\n<li>The plugin has been damaged or has"
" some unresolved symbols</li>\n</ul> \nLast"
" error message that occurred: \n%3</qt>")
- .arg(d->lib.prepend("ksim_")).arg("KSIM_INIT_PLUGIN")
- .arg(d->error));
+ .tqarg(d->lib.prepend("ksim_")).tqarg("KSIM_INIT_PLUGIN")
+ .tqarg(d->error));
return false;
break;
default:
@@ -125,7 +125,7 @@ bool KSim::PluginLoader::unloadPlugin(const TQCString &name)
return false;
// see if our plugin is loaded
- KSim::Plugin plugin = find(name);
+ KSim::Plugin plugin = tqfind(name);
if (plugin.isNull())
return false;
@@ -161,7 +161,7 @@ bool KSim::PluginLoader::isLoaded(const TQCString &library) const
if (library.isEmpty())
return false;
- return !find(library).isNull();
+ return !tqfind(library).isNull();
}
KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
@@ -211,13 +211,13 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
return info;
}
-KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName)
+KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName)
{
if (libName.isEmpty())
return KSim::Plugin::null;
TQCString library(libName);
- if (libName.find(Private::ksimString) == -1)
+ if (libName.tqfind(Private::ksimString) == -1)
library.prepend(Private::ksimString);
KSim::PluginList::Iterator it;
@@ -229,13 +229,13 @@ KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName)
return KSim::Plugin::null;
}
-const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const
+const KSim::Plugin &KSim::PluginLoader::tqfind(const TQCString &libName) const
{
if (libName.isEmpty())
return KSim::Plugin::null;
TQCString library(libName);
- if (libName.find(Private::ksimString) == -1)
+ if (libName.tqfind(Private::ksimString) == -1)
library.prepend(Private::ksimString);
KSim::PluginList::ConstIterator it;
@@ -247,14 +247,14 @@ const KSim::Plugin &KSim::PluginLoader::find(const TQCString &libName) const
return KSim::Plugin::null;
}
-KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info)
+KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info)
{
- return find(info.libName());
+ return tqfind(info.libName());
}
-const KSim::Plugin &KSim::PluginLoader::find(const KSim::PluginInfo &info) const
+const KSim::Plugin &KSim::PluginLoader::tqfind(const KSim::PluginInfo &info) const
{
- return find(info.libName());
+ return tqfind(info.libName());
}
const KSim::PluginList &KSim::PluginLoader::pluginList() const
@@ -294,7 +294,7 @@ void KSim::PluginLoader::cleanup()
KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const KDesktopFile &file)
{
- d->error = TQString::null;
+ d->error = TQString();
TQCString pluginName(file.readEntry("X-KSIM-LIBRARY").local8Bit());
if (pluginName.isEmpty())
return EmptyLibName;
@@ -307,7 +307,7 @@ KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const KDesktopFil
TQCString symbol("init_plugin");
if (Private::PluginPtr *create = (Private::PluginPtr *)(library->symbol(symbol))) {
d->pluginList.append(KSim::Plugin(create(pluginName), file));
- d->lib = TQString::null;
+ d->lib = TQString();
d->lastLoaded = true;
}
else {
diff --git a/ksim/library/pluginloader.h b/ksim/library/pluginloader.h
index 385df44..b1806fa 100644
--- a/ksim/library/pluginloader.h
+++ b/ksim/library/pluginloader.h
@@ -61,9 +61,10 @@ namespace KSim
* Provides a loader for the plugins
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT PluginLoader : public QObject
+ class KDE_EXPORT PluginLoader : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class MainView;
public:
enum SearchType { Name = 0, DesktopFile, LibName };
@@ -122,19 +123,19 @@ namespace KSim
* @return a KSim::Plugin object
* @see KSim::Plugin
*/
- KSim::Plugin &find(const TQCString &libName);
+ KSim::Plugin &tqfind(const TQCString &libName);
/**
* convenience function, see the above function for details.
*/
- const KSim::Plugin &find(const TQCString &libName) const;
+ const KSim::Plugin &tqfind(const TQCString &libName) const;
/**
- * equivalent to find(info.libName());
+ * equivalent to tqfind(info.libName());
*/
- KSim::Plugin &find(const KSim::PluginInfo &info);
+ KSim::Plugin &tqfind(const KSim::PluginInfo &info);
/**
* convenience function, see the above function for details.
*/
- const KSim::Plugin &find(const KSim::PluginInfo &info) const;
+ const KSim::Plugin &tqfind(const KSim::PluginInfo &info) const;
/**
* provides plugin(), view(), config page and plugin information
* @see KSim::Plugin KSim::PluginList
diff --git a/ksim/library/pluginmodule.cpp b/ksim/library/pluginmodule.cpp
index b5cbd37..7dff303 100644
--- a/ksim/library/pluginmodule.cpp
+++ b/ksim/library/pluginmodule.cpp
@@ -64,7 +64,7 @@ void KSim::PluginObject::setConfigFileName(const TQString &name)
return;
d->configName = name;
- if (name.find("ksim") == -1)
+ if (name.tqfind("ksim") == -1)
d->configName.prepend("ksim_");
}
@@ -77,19 +77,19 @@ class KSim::PluginPage::Private
{
public:
KConfig *config;
- KSim::PluginObject *parent;
+ KSim::PluginObject *tqparent;
};
-KSim::PluginPage::PluginPage(KSim::PluginObject *parent, const char *name)
+KSim::PluginPage::PluginPage(KSim::PluginObject *tqparent, const char *name)
: TQWidget(0, name)
{
d = new PluginPage::Private;
- d->parent = parent;
- if (parent && !parent->configFileName().isEmpty())
- d->config = new KConfig(parent->configFileName() + "rc");
+ d->tqparent = tqparent;
+ if (tqparent && !tqparent->configFileName().isEmpty())
+ d->config = new KConfig(tqparent->configFileName() + "rc");
else {
kdWarning() << className() << ": Can not create the config() "
- "pointer due to the parent being null" << endl;
+ "pointer due to the tqparent being null" << endl;
d->config = 0;
}
}
@@ -111,25 +111,25 @@ KConfig *KSim::PluginPage::config() const
class KSim::PluginView::Private
{
public:
- PluginObject *parent;
+ PluginObject *tqparent;
TQPopupMenu *popupMenu;
KConfig *config;
};
-KSim::PluginView::PluginView(KSim::PluginObject *parent, const char *name)
+KSim::PluginView::PluginView(KSim::PluginObject *tqparent, const char *name)
: TQWidget(0, name)
{
d = new PluginView::Private;
- d->parent = parent;
+ d->tqparent = tqparent;
d->popupMenu = new TQPopupMenu(this);
d->popupMenu->insertItem(i18n("About"), this,
TQT_SLOT(showAbout()), 0, -1, 0);
- if (parent && !parent->configFileName().isEmpty())
- d->config = new KConfig(parent->configFileName() + "rc");
+ if (tqparent && !tqparent->configFileName().isEmpty())
+ d->config = new KConfig(tqparent->configFileName() + "rc");
else {
kdWarning() << className() << ": Can not create the config() "
- "pointer due to the parent being null" << endl;
+ "pointer due to the tqparent being null" << endl;
d->config = 0;
}
}
@@ -159,16 +159,16 @@ void KSim::PluginView::doCommand()
void KSim::PluginView::mousePressEvent(TQMouseEvent *ev)
{
- if (ev->button() == TQMouseEvent::LeftButton)
+ if (ev->button() == Qt::LeftButton)
doCommand();
}
-KSim::PluginObject *KSim::PluginView::parentPlugin() const
+KSim::PluginObject *KSim::PluginView::tqparentPlugin() const
{
- return d->parent;
+ return d->tqparent;
}
void KSim::PluginView::showAbout()
{
- parentPlugin()->showAbout();
+ tqparentPlugin()->showAbout();
}
diff --git a/ksim/library/pluginmodule.h b/ksim/library/pluginmodule.h
index 801f10c..39baef4 100644
--- a/ksim/library/pluginmodule.h
+++ b/ksim/library/pluginmodule.h
@@ -111,14 +111,15 @@ namespace KSim
* the config() to gain access to your config file
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT PluginPage : public QWidget
+ class KDE_EXPORT PluginPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* constructor for PluginPage
*/
- PluginPage(KSim::PluginObject *parent, const char *name);
+ PluginPage(KSim::PluginObject *tqparent, const char *name);
/**
* destructor for PluginPage
*/
@@ -144,7 +145,7 @@ namespace KSim
void pageChanged();
protected:
- PluginObject *parentPlugin() const;
+ PluginObject *tqparentPlugin() const;
private:
class Private;
@@ -159,14 +160,15 @@ namespace KSim
* when apply or ok gets clicked in the config dialog
* @author Robbie Ward <linuxphreak@gmx.co.uk>
*/
- class KDE_EXPORT PluginView : public QWidget
+ class KDE_EXPORT PluginView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* constructor for PluginView
*/
- PluginView(KSim::PluginObject *parent, const char *name);
+ PluginView(KSim::PluginObject *tqparent, const char *name);
/**
* destructor for PluginView
*/
@@ -192,7 +194,7 @@ namespace KSim
protected:
virtual void mousePressEvent(TQMouseEvent *);
- PluginObject *parentPlugin() const;
+ PluginObject *tqparentPlugin() const;
private slots:
void showAbout();
diff --git a/ksim/library/progress.cpp b/ksim/library/progress.cpp
index 82ae16e..6a8d2ba 100644
--- a/ksim/library/progress.cpp
+++ b/ksim/library/progress.cpp
@@ -40,17 +40,17 @@ class KSim::Progress::Private
};
KSim::Progress::Progress(int maxValue,
- TQWidget *parent, const char *name,
- WFlags fl) : KSim::Label(parent, name, fl)
+ TQWidget *tqparent, const char *name,
+ WFlags fl) : KSim::Label(tqparent, name, fl)
{
init(maxValue);
configureObject();
}
KSim::Progress::Progress(int maxValue,
- int type, const TQString &label, TQWidget *parent,
+ int type, const TQString &label, TQWidget *tqparent,
const char *name, WFlags fl)
- : KSim::Label(type, label, parent, name, fl)
+ : KSim::Label(type, label, tqparent, name, fl)
{
init(maxValue);
configureObject();
@@ -58,17 +58,17 @@ KSim::Progress::Progress(int maxValue,
KSim::Progress::Progress(int maxValue,
int type, const TQString &label, int value,
- TQWidget *parent, const char *name, WFlags fl)
- : KSim::Label(type, label, parent, name, fl)
+ TQWidget *tqparent, const char *name, WFlags fl)
+ : KSim::Label(type, label, tqparent, name, fl)
{
init(maxValue, value);
configureObject();
}
KSim::Progress::Progress(int maxValue,
- int type, TQWidget *parent,
+ int type, TQWidget *tqparent,
const char *name, WFlags fl)
- : KSim::Label(type, parent, name, fl)
+ : KSim::Label(type, tqparent, name, fl)
{
init(maxValue);
configureObject();
@@ -76,8 +76,8 @@ KSim::Progress::Progress(int maxValue,
KSim::Progress::Progress(int maxValue, int type,
ProgressType progressType,
- TQWidget *parent, const char *name, WFlags fl)
- : KSim::Label(type, parent, name, fl)
+ TQWidget *tqparent, const char *name, WFlags fl)
+ : KSim::Label(type, tqparent, name, fl)
{
init(maxValue, 0, progressType);
configureObject();
@@ -108,7 +108,7 @@ const TQRect &KSim::Progress::rectOrigin() const
return d->rectOrigin;
}
-void KSim::Progress::configureObject(bool repaintWidget)
+void KSim::Progress::configureObject(bool tqrepaintWidget)
{
KSim::Label::configureObject(false);
@@ -120,13 +120,13 @@ void KSim::Progress::configureObject(bool repaintWidget)
setMeterPixmap(themeLoader().current().splitPixmap(KSim::Theme::KrellMeter));
}
- if (repaintWidget)
+ if (tqrepaintWidget)
update();
}
-TQSize KSim::Progress::sizeHint() const
+TQSize KSim::Progress::tqsizeHint() const
{
- TQSize hint(Label::sizeHint());
+ TQSize hint(Label::tqsizeHint());
if (d->meterPixmap.height() > hint.height())
hint.setHeight(d->meterPixmap.height());
@@ -186,9 +186,9 @@ void KSim::Progress::setOrigin(const TQRect &origin)
void KSim::Progress::setMeterPixmap(const TQPixmap &pixmap)
{
- TQSize oldSize = sizeHint();
+ TQSize oldSize = tqsizeHint();
d->meterPixmap = pixmap;
- relayoutLabel(oldSize);
+ retqlayoutLabel(oldSize);
}
int KSim::Progress::xLocation() const
diff --git a/ksim/library/progress.h b/ksim/library/progress.h
index 7f0f68a..40eca5c 100644
--- a/ksim/library/progress.h
+++ b/ksim/library/progress.h
@@ -33,6 +33,7 @@ namespace KSim
class KDE_EXPORT Progress : public KSim::Label
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ProgressType { Panel, Meter };
/**
@@ -41,9 +42,9 @@ namespace KSim
* @param maxValue is the maximum value
* that the progress bar will show
* @param label is the text that will be displayed
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
- Progress(int maxValue, TQWidget *parent,
+ Progress(int maxValue, TQWidget *tqparent,
const char *name = 0, WFlags fl = 0);
/**
* constructs a KSim::Progress
@@ -52,10 +53,10 @@ namespace KSim
* that the progress bar will show
* @param type is the theme type
* @param label is the text that will be displayed
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
Progress(int maxValue, int type, const TQString &label,
- TQWidget *parent, const char *name = 0, WFlags fl = 0);
+ TQWidget *tqparent, const char *name = 0, WFlags fl = 0);
/**
* constructs a KSim::Progress
*
@@ -64,10 +65,10 @@ namespace KSim
* @param type is the theme type
* @param label is the text that will be displayed
* @param value is the initial value to be displayed
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
Progress(int maxValue, int type, const TQString &label,
- int value, TQWidget *parent, const char *name = 0,
+ int value, TQWidget *tqparent, const char *name = 0,
WFlags fl = 0);
/**
* constructs a KSim::Progress
@@ -75,9 +76,9 @@ namespace KSim
* @param maxValue is the maximum value
* that the progress bar will show
* @param type is the theme type
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
- Progress(int maxValue, int type, TQWidget *parent,
+ Progress(int maxValue, int type, TQWidget *tqparent,
const char *name = 0, WFlags fl = 0);
/**
* constructs a KSim::Progress
@@ -86,11 +87,11 @@ namespace KSim
* that the progress bar will show
* @param type is the theme type
* @param progressType is onr of Progress::ProgressType
- * @param parent is the parent widget
+ * @param tqparent is the tqparent widget
*/
Progress(int maxValue, int type,
ProgressType progressType,
- TQWidget *parent, const char *name = 0,
+ TQWidget *tqparent, const char *name = 0,
WFlags fl = 0);
/**
* destructs KSim::Chart
@@ -117,11 +118,11 @@ namespace KSim
/**
* reimplemented for internal reasons
*/
- virtual void configureObject(bool repaintWidget = true);
+ virtual void configureObject(bool tqrepaintWidget = true);
/**
* reimplemented for internal reasons
*/
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
/**
diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp
index f960ef7..b532ab9 100644
--- a/ksim/library/themeloader.cpp
+++ b/ksim/library/themeloader.cpp
@@ -58,12 +58,12 @@ class KSim::Theme::Private
TQString readOption(const TQString &entry,
bool useGlobal = true,
- const TQString &defValue = TQString::null)
+ const TQString &defValue = TQString())
{
TQString text;
TQStringList::ConstIterator it;
for (it = file.begin(); it != file.end(); ++it) {
- if ((*it).find(entry) != -1) {
+ if ((*it).tqfind(entry) != -1) {
text = TQStringList::split("=", (*it))[1].stripWhiteSpace();
}
}
@@ -73,7 +73,7 @@ class KSim::Theme::Private
TQStringList::ConstIterator it2;
for (it2 = dFile.begin(); it2 != dFile.end(); ++it) {
- if ((*it2).find(entry) != -1) {
+ if ((*it2).tqfind(entry) != -1) {
text = TQStringList::split("=", (*it2))[1].stripWhiteSpace();
}
}
@@ -135,13 +135,13 @@ TQString KSim::Theme::name() const
if (name.endsWith("/"))
name.remove(name.length() - 1, 1);
- return name.remove(0, name.findRev("/") + 1);
+ return name.remove(0, name.tqfindRev("/") + 1);
}
TQString KSim::Theme::author() const
{
TQString author(d->readOption("author", false));
- return author.replace(TQRegExp("\""), TQString::null);
+ return author.tqreplace(TQRegExp("\""), TQString());
}
int KSim::Theme::fontItem() const
@@ -217,7 +217,7 @@ TQRect KSim::Theme::frameRightBorder(const TQRect &defValue) const
TQColor KSim::Theme::chartInColour(const TQColor &defValue) const
{
if (d->recolour)
- return TQApplication::palette().active().background();
+ return TQApplication::tqpalette().active().background();
return internalColourEntry("chart_in_color", defValue);
}
@@ -230,7 +230,7 @@ TQColor KSim::Theme::chartInColourGrid(const TQColor &defValue) const
TQColor KSim::Theme::chartOutColour(const TQColor &defValue) const
{
if (d->recolour)
- return TQApplication::palette().active().background();
+ return TQApplication::tqpalette().active().background();
return internalColourEntry("chart_out_color", defValue);
}
@@ -312,37 +312,37 @@ TQRect KSim::Theme::buttonMeterBorder(const TQRect &defValue) const
TQFont KSim::Theme::largeFont() const
{
- TQString font(internalStringEntry("large_font", TQString::null));
+ TQString font(internalStringEntry("large_font", TQString()));
if (font.isEmpty())
return TQApplication::font();
TQFont themeFont;
- themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null));
+ themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString()));
return themeFont;
}
TQFont KSim::Theme::normalFont() const
{
- TQString font(internalStringEntry("normal_font", TQString::null));
+ TQString font(internalStringEntry("normal_font", TQString()));
if (font.isEmpty())
return TQApplication::font();
TQFont themeFont;
- themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null));
+ themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString()));
return themeFont;
}
TQFont KSim::Theme::smallFont() const
{
- TQString font(internalStringEntry("small_font", TQString::null));
+ TQString font(internalStringEntry("small_font", TQString()));
if (font.isEmpty())
return TQApplication::font();
TQFont themeFont;
- themeFont.setRawName(font.replace(TQRegExp("\""), TQString::null));
+ themeFont.setRawName(font.tqreplace(TQRegExp("\""), TQString()));
return themeFont;
}
@@ -548,7 +548,7 @@ TQString KSim::Theme::mailPixmap(bool useDefault) const
if (text.isNull() && useDefault)
return KSim::ThemeLoader::defaultUrl()
- + createType(KSim::Types::Mail, TQString::null) + file + ".png";
+ + createType(KSim::Types::Mail, TQString()) + file + ".png";
return text;
}
@@ -607,11 +607,11 @@ TQValueList<TQPixmap> KSim::Theme::pixmapToList(PixmapType type,
for (int i = 0; i < (depth + 1); ++i) {
newPixmap.fill();
- if (pixmap.mask()) {
- TQBitmap mask(newPixmap.size());
- bitBlt(&mask, 0, 0, pixmap.mask(), xOffset, yOffset,
+ if (pixmap.tqmask()) {
+ TQBitmap tqmask(newPixmap.size());
+ bitBlt(&tqmask, 0, 0, pixmap.tqmask(), xOffset, yOffset,
image.width() - xOffset, size);
- newPixmap.setMask(mask);
+ newPixmap.setMask(tqmask);
}
bitBlt(&newPixmap, 0, 0, &pixmap, xOffset, yOffset,
@@ -644,7 +644,7 @@ bool KSim::Theme::textShadow(const TQString &itemType,
return false;
TQString shadow = readEntry(itemType, entry);
- if (shadow.isEmpty() || shadow.findRev("none") != -1)
+ if (shadow.isEmpty() || shadow.tqfindRev("none") != -1)
return false;
return true;
@@ -683,7 +683,7 @@ TQString KSim::Theme::readEntry(const TQString &itemType,
const TQString &entry) const
{
TQString entryName = itemType + " " + entry;
- return internalStringEntry(entryName, TQString::null);
+ return internalStringEntry(entryName, TQString());
}
TQString KSim::Theme::readColourEntry(const TQString &itemType,
@@ -691,7 +691,7 @@ TQString KSim::Theme::readColourEntry(const TQString &itemType,
{
TQString color = readEntry(itemType, entry);
if (color.isEmpty())
- color = TQString::fromLatin1("#ffffff #ffffff");
+ color = TQString::tqfromLatin1("#ffffff #ffffff");
return TQStringList::split(' ', color)[row];
}
@@ -718,14 +718,14 @@ bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font,
TQColor &text, TQColor &shadow, bool &showShadow) const
{
TQString key = KSim::Types::typeToString(type, false);
- bool repaint = false;
+ bool tqrepaint = false;
// set colours from the string 'key'
if (!readEntry(string, key + ".textcolor").isEmpty()) {
text= textColour(string, key + ".textcolor");
shadow = shadowColour(string, key + ".textcolor");
showShadow = textShadow(string, key + ".textcolor");
- repaint = true;
+ tqrepaint = true;
}
else {
text= textColour(string, "*.textcolor");
@@ -737,14 +737,14 @@ bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font,
if (!readEntry(string, key + ".font").isEmpty()) {
if (KSim::ThemeLoader::currentFontItem() != 3) {
font = readFontEntry(string, key + ".font");
- repaint = true;
+ tqrepaint = true;
}
}
else {
font = currentFont();
}
- return repaint;
+ return tqrepaint;
}
bool KSim::Theme::fontColours(const KSim::Base *const base, TQFont &font,
@@ -927,7 +927,7 @@ void KSim::ThemeLoader::reload()
if (m_theme.d)
m_theme.d->globalReader = d->globalReader;
- TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString();
+ TQString fileName = TQString::tqfromLatin1("gkrellmrc") + alternativeAsString();
m_theme.reparse(currentUrl(), fileName, currentAlternative());
}
@@ -948,31 +948,31 @@ void KSim::ThemeLoader::reColourImage(TQImage &image)
if (!d->recolour || image.isNull())
return;
- TQColor color = TQApplication::palette().active().background();
+ TQColor color = TQApplication::tqpalette().active().background();
TQImage output(image.width(), image.height(), 32);
output.setAlphaBuffer(image.hasAlphaBuffer());
- Q_UINT32 r = color.red();
- Q_UINT32 g = color.green();
- Q_UINT32 b = color.blue();
- Q_UINT32 *write = reinterpret_cast<Q_UINT32 *>(output.bits());
- Q_UINT32 *read = reinterpret_cast<Q_UINT32 *>(image.bits());
+ TQ_UINT32 r = color.red();
+ TQ_UINT32 g = color.green();
+ TQ_UINT32 b = color.blue();
+ TQ_UINT32 *write = reinterpret_cast<TQ_UINT32 *>(output.bits());
+ TQ_UINT32 *read = reinterpret_cast<TQ_UINT32 *>(image.bits());
int size = image.width() * image.height();
for (int pos = 0; pos < size; pos++)
{
- QRgb basePix = static_cast<QRgb>(*read);
+ TQRgb basePix = static_cast<TQRgb>(*read);
// Here, we assume that source is really gray, so R=G=B=I
// Use blue since it's very easy to extract.
- Q_UINT32 i = qBlue(basePix);
+ TQ_UINT32 i = tqBlue(basePix);
- Q_UINT32 cr = (r * i + 128) >> 8; // Fixed point..
- Q_UINT32 cg = (g * i + 128) >> 8;
- Q_UINT32 cb = (b * i + 128) >> 8;
+ TQ_UINT32 cr = (r * i + 128) >> 8; // Fixed point..
+ TQ_UINT32 cg = (g * i + 128) >> 8;
+ TQ_UINT32 cb = (b * i + 128) >> 8;
- Q_UINT32 alpha = qAlpha(basePix);
- *write = qRgba(cr, cg, cb, alpha);
+ TQ_UINT32 alpha = tqAlpha(basePix);
+ *write = tqRgba(cr, cg, cb, alpha);
write++;
read++;
}
@@ -986,7 +986,7 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url,
TQFile origFile(url + fileName);
if (!origFile.open(IO_ReadOnly))
- return TQString::null;
+ return TQString();
TQTextStream origStream(&origFile);
TQString text;
@@ -997,26 +997,26 @@ TQString KSim::ThemeLoader::parseConfig(const TQString &url,
while (!origStream.atEnd()) {
TQString line(origStream.readLine().simplifyWhiteSpace());
- if (line.find(reg) == 0) // find the location of the * comments
+ if (line.tqfind(reg) == 0) // find the location of the * comments
// replace all * comments with # comments so KConfig doesn't complain
- line.replace(reg, "#");
+ line.tqreplace(reg, "#");
- if (line.find("#") == -1) { // find the location of the string 'gkrellmms'
- if (line.findRev("=") == -1) { // if found we check for the string '='
- int numLoc = line.findRev(numbers);
+ if (line.tqfind("#") == -1) { // find the location of the string 'gkrellmms'
+ if (line.tqfindRev("=") == -1) { // if found we check for the string '='
+ int numLoc = line.tqfindRev(numbers);
if (numLoc != -1)
// if '=' doesn't exist we add one so KConfig doesn't complain
line.insert(numLoc, " = ");
- numLoc = line.findRev(number);
+ numLoc = line.tqfindRev(number);
if (numLoc != -1)
// if '=' doesn't exist we add one so KConfig doesn't complain
line.insert(numLoc, " = ");
- numLoc = line.findRev(minus);
+ numLoc = line.tqfindRev(minus);
if (numLoc != -1)
// replace the '-' with an '=' so KConfig doesn't get confused
- line.replace(TQRegExp("-"), "=");
+ line.tqreplace(TQRegExp("-"), "=");
}
}
@@ -1036,9 +1036,9 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt)
{
TQString homePath = TQDir::current().path();
homePath = locateLocal( "data", "ksim" )
- + TQString::fromLatin1( "/themes" )
+ + TQString::tqfromLatin1( "/themes" )
+ homePath.right( homePath.length()
- - homePath.findRev( TQRegExp( "\\/" ),
+ - homePath.tqfindRev( TQRegExp( "\\/" ),
homePath.length() ) );
if ( !TQFile::exists( homePath ) )
@@ -1065,14 +1065,14 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt)
for (int i = 0; i < alternatives; ++i) {
TQString altString = KSim::ThemeLoader::alternativeAsString(i);
if (alternatives == 1 || i == 0)
- altString = TQString::null;
+ altString = TQString();
TQStringList::ConstIterator format;
for (format = formats.begin(); format != formats.end(); ++format) {
// go through the meters array and move the files to the correct dir/filename
TQStringList::Iterator meter;
for (meter = meters.begin(); meter != meters.end(); ++meter) {
- TQString bgMeter = TQString::fromLatin1("bg_meter_");
+ TQString bgMeter = TQString::tqfromLatin1("bg_meter_");
if (TQFile::exists(bgMeter + (*meter) + altString + "." + (*format))) {
if (KStandardDirs::makeDir(url + (*meter)))
directory.rename(bgMeter + (*meter) + altString + "." + (*format),
@@ -1083,7 +1083,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt)
// go through the panels array and move the files to the correct dir/filename
TQStringList::ConstIterator panel;
for (panel = panels.begin(); panel != panels.end(); ++panel) {
- TQString bgPanel = TQString::fromLatin1("bg_panel_");
+ TQString bgPanel = TQString::tqfromLatin1("bg_panel_");
if (TQFile::exists(bgPanel + (*panel) + altString + "." + (*format))) {
if (KStandardDirs::makeDir(url + (*panel)))
directory.rename(bgPanel + (*panel) + altString + "." + (*format),
@@ -1092,13 +1092,13 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt)
}
// fix stupid themes that have a bg_panel image in the host dir
- TQString tempFile = TQString::fromLatin1("host/bg_panel");
+ TQString tempFile = TQString::tqfromLatin1("host/bg_panel");
if (TQFile::exists(tempFile + altString + "." + (*format)))
directory.rename(tempFile + altString + "." + (*format), "host/bg_meter"
+ altString + "." + (*format));
// move decal_net_leds* to the net folder to be more consistant
- tempFile = TQString::fromLatin1("decal_net_leds");
+ tempFile = TQString::tqfromLatin1("decal_net_leds");
if (TQFile::exists(tempFile + altString + "." + (*format))) {
if (KStandardDirs::makeDir(url + "net"))
directory.rename(tempFile + altString + "." + (*format),
@@ -1159,7 +1159,7 @@ int KSim::ThemeLoader::currentAlternative()
TQString KSim::ThemeLoader::alternativeAsString(int alt)
{
int alternative = (alt == -1 ? currentAlternative() : alt);
- return (alternative == 0 ? TQString::null : TQString::fromLatin1("_")
+ return (alternative == 0 ? TQString() : TQString::tqfromLatin1("_")
+ TQString::number(alternative));
}
@@ -1225,7 +1225,7 @@ KSim::ThemeLoader::ThemeLoader()
m_theme.create(d->fileNames, d->imageTypes, d->globalReader);
- TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString();
+ TQString fileName = TQString::tqfromLatin1("gkrellmrc") + alternativeAsString();
m_theme.init(currentUrl(), fileName, currentAlternative());
reColourItems();
diff --git a/ksim/library/themetypes.h b/ksim/library/themetypes.h
index 0f34fbf..82b7aa3 100644
--- a/ksim/library/themetypes.h
+++ b/ksim/library/themetypes.h
@@ -56,12 +56,12 @@ namespace KSim
};
/**
- * @return the ThemeType enum as a QString
+ * @return the ThemeType enum as a TQString
*/
inline TQString typeToString(int type, bool incSlash = true)
{
if (type == Types::None)
- return TQString::null;
+ return TQString();
// This array MUST be in the same order
// as the ThemeType enum
@@ -74,7 +74,7 @@ namespace KSim
TQString returnString;
returnString.setLatin1(typeNames[type]);
- return incSlash ? returnString + TQString::fromLatin1("/") : returnString;
+ return incSlash ? returnString + TQString::tqfromLatin1("/") : returnString;
}
}
}