From 955e20356d63ed405198c8143617a8a0ca8bfc02 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 10:00:17 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit bf280726d5d22f33d33e4f9e771220c725249407. --- ksim/library/chart.cpp | 36 ++++++++++++++++++------------------ ksim/library/chart.h | 4 ++-- ksim/library/label.cpp | 36 ++++++++++++++++++------------------ ksim/library/label.h | 6 +++--- ksim/library/led.cpp | 4 ++-- ksim/library/led.h | 4 ++-- ksim/library/pluginloader.cpp | 8 ++++---- ksim/library/progress.cpp | 6 +++--- ksim/library/progress.h | 2 +- ksim/library/themeloader.cpp | 32 ++++++++++++++++---------------- ksim/library/themetypes.h | 2 +- 11 files changed, 70 insertions(+), 70 deletions(-) (limited to 'ksim/library') diff --git a/ksim/library/chart.cpp b/ksim/library/chart.cpp index b9b5e31..ca555a4 100644 --- a/ksim/library/chart.cpp +++ b/ksim/library/chart.cpp @@ -251,7 +251,7 @@ void KSim::Chart::buildPixmaps() void KSim::Chart::configureObject(bool repaintWidget) { - 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(); } @@ -279,14 +279,14 @@ void KSim::Chart::configureObject(bool repaintWidget) 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(); } @@ -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::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 6f8cfeb..cd658c0 100644 --- a/ksim/library/chart.h +++ b/ksim/library/chart.h @@ -109,11 +109,11 @@ namespace KSim /** * reimplemented for internal reasons */ - TQSize sizeHint() const; + TQSize tqsizeHint() const; /** * reimplemented for internal reasons */ - TQSize minimumSizeHint() const; + TQSize tqminimumSizeHint() const; void disableAutomaticUpdates(); diff --git a/ksim/library/label.cpp b/ksim/library/label.cpp index 16be059..0b9ed18 100644 --- a/ksim/library/label.cpp +++ b/ksim/library/label.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -88,7 +88,7 @@ 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); @@ -99,7 +99,7 @@ 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); @@ -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,9 +123,9 @@ 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() @@ -136,10 +136,10 @@ void KSim::Label::clear() 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); } @@ -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); - tqstyle().drawItem(painter, location, AlignCenter, colorGroup(), true, + tqstyle().drawItem(painter, location, AlignCenter, tqcolorGroup(), true, 0, text, -1, &color); } @@ -242,7 +242,7 @@ void KSim::Label::drawPixmap(TQPainter *painter, const TQRect &rect, TQRect location(rect); location.setWidth(pixmap.width()); - tqstyle().drawItem(painter, location, AlignCenter, colorGroup(), true, + tqstyle().drawItem(painter, location, AlignCenter, tqcolorGroup(), true, pixmap.isNull() ? 0 : &pixmap, TQString()); } @@ -268,7 +268,7 @@ 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); @@ -276,13 +276,13 @@ void KSim::Label::setThemePixmap(const TQString &image) relayoutLabel(oldSize); } -void KSim::Label::relayoutLabel(const TQSize &old, bool repaint) +void KSim::Label::relayoutLabel(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 9e24c95..f20d8df 100644 --- a/ksim/library/label.h +++ b/ksim/library/label.h @@ -108,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: /** @@ -196,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 relayoutLabel(const TQSize &old, bool tqrepaint = true); private: /** diff --git a/ksim/library/led.cpp b/ksim/library/led.cpp index a20a1d1..3fa8d7f 100644 --- a/ksim/library/led.cpp +++ b/ksim/library/led.cpp @@ -234,9 +234,9 @@ void KSim::LedLabel::configureObject(bool 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()); diff --git a/ksim/library/led.h b/ksim/library/led.h index 6dcecce..5c5e615 100644 --- a/ksim/library/led.h +++ b/ksim/library/led.h @@ -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(); @@ -150,7 +150,7 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: /** diff --git a/ksim/library/pluginloader.cpp b/ksim/library/pluginloader.cpp index 71b17b7..775a02e 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 $TDEDIR/lib path").arg(file.readName())); + " is installed and is in your $TDEDIR/lib path").tqarg(file.readName())); return false; break; case KSim::PluginLoader::UnSymbols: @@ -108,8 +108,8 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file) " macro\n
  • The plugin has been damaged or has" " some unresolved symbols
  • \n \nLast" " error message that occurred: \n%3") - .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: diff --git a/ksim/library/progress.cpp b/ksim/library/progress.cpp index 82ae16e..e37cff1 100644 --- a/ksim/library/progress.cpp +++ b/ksim/library/progress.cpp @@ -124,9 +124,9 @@ void KSim::Progress::configureObject(bool repaintWidget) 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,7 +186,7 @@ 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); } diff --git a/ksim/library/progress.h b/ksim/library/progress.h index 415c9fa..0e30986 100644 --- a/ksim/library/progress.h +++ b/ksim/library/progress.h @@ -122,7 +122,7 @@ namespace KSim /** * 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 f6d6474..3fced29 100644 --- a/ksim/library/themeloader.cpp +++ b/ksim/library/themeloader.cpp @@ -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); } @@ -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,7 +948,7 @@ 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()); @@ -1036,7 +1036,7 @@ 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.length() ) ); @@ -1072,7 +1072,7 @@ void KSim::ThemeLoader::parseDir(const TQString &url, int alt) // 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() : 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 9ca4bb4..82b7aa3 100644 --- a/ksim/library/themetypes.h +++ b/ksim/library/themetypes.h @@ -74,7 +74,7 @@ namespace KSim TQString returnString; returnString.setLatin1(typeNames[type]); - return incSlash ? returnString + TQString::fromLatin1("/") : returnString; + return incSlash ? returnString + TQString::tqfromLatin1("/") : returnString; } } } -- cgit v1.2.1