diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:52 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:52 -0600 |
commit | bf280726d5d22f33d33e4f9e771220c725249407 (patch) | |
tree | 48b7496821910eb85179d543acee981cf5d16dd8 /ksim/library | |
parent | c78266617c282543427d2c000b3b68fe2b6b6722 (diff) | |
download | tdeutils-bf280726d5d22f33d33e4f9e771220c725249407.tar.gz tdeutils-bf280726d5d22f33d33e4f9e771220c725249407.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'ksim/library')
-rw-r--r-- | ksim/library/chart.cpp | 36 | ||||
-rw-r--r-- | ksim/library/chart.h | 4 | ||||
-rw-r--r-- | ksim/library/label.cpp | 36 | ||||
-rw-r--r-- | ksim/library/label.h | 6 | ||||
-rw-r--r-- | ksim/library/led.cpp | 4 | ||||
-rw-r--r-- | ksim/library/led.h | 4 | ||||
-rw-r--r-- | ksim/library/pluginloader.cpp | 8 | ||||
-rw-r--r-- | ksim/library/progress.cpp | 6 | ||||
-rw-r--r-- | ksim/library/progress.h | 2 | ||||
-rw-r--r-- | ksim/library/themeloader.cpp | 32 | ||||
-rw-r--r-- | ksim/library/themetypes.h | 2 |
11 files changed, 70 insertions, 70 deletions
diff --git a/ksim/library/chart.cpp b/ksim/library/chart.cpp index ca555a4..b9b5e31 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 = tqsizeHint(); + TQSize oldSize = sizeHint(); 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 tqgeometry if we need to let any - // tqlayout know about our tqsizeHint() change - if (oldSize != tqsizeHint()) { + // Update our geometry if we need to let any + // layout know about our sizeHint() change + if (oldSize != sizeHint()) { // Using resize() here seems to be needed - resize(tqsizeHint()); + resize(sizeHint()); updateGeometry(); } @@ -279,14 +279,14 @@ void KSim::Chart::configureObject(bool repaintWidget) update(); } -TQSize KSim::Chart::tqsizeHint() const +TQSize KSim::Chart::sizeHint() const { return d->size; } -TQSize KSim::Chart::tqminimumSizeHint() const +TQSize KSim::Chart::minimumSizeHint() const { - return tqsizeHint(); + return sizeHint(); } 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 tqrepaint = false; + bool repaint = false; if (d->inText != in) { - tqrepaint = true; + repaint = true; d->inText = in; } if (d->outText != out) { - tqrepaint = true; + repaint = true; d->outText = out; } - if (tqrepaint) + if (repaint) update(); } @@ -407,13 +407,13 @@ void KSim::Chart::setValue(int valueIn, int valueOut) void KSim::Chart::setConfigValues() { TQFont newFont = font(); - bool tqrepaint = themeLoader().current().fontColours(this, + bool repaint = themeLoader().current().fontColours(this, newFont, d->mColour, d->sColour, d->showShadow); if (font() != newFont) setFont(newFont); - if (tqrepaint) + if (repaint) update(); } @@ -446,7 +446,7 @@ void KSim::Chart::paintEvent(TQPaintEvent *) const TQSize &size = chartSize(); TQPixmap pixmap(size); TQPainter painter; - painter.tqbegin(&pixmap, this); + painter.begin(&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.tqbegin(&d->graphData, this); + painter.begin(&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->tqbegin(&bitmap, this); + painter->begin(&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); - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); + setSizePolicy(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 cd658c0..6f8cfeb 100644 --- a/ksim/library/chart.h +++ b/ksim/library/chart.h @@ -109,11 +109,11 @@ namespace KSim /** * reimplemented for internal reasons */ - TQSize tqsizeHint() const; + TQSize sizeHint() const; /** * reimplemented for internal reasons */ - TQSize tqminimumSizeHint() const; + TQSize minimumSizeHint() const; void disableAutomaticUpdates(); diff --git a/ksim/library/label.cpp b/ksim/library/label.cpp index 0b9ed18..16be059 100644 --- a/ksim/library/label.cpp +++ b/ksim/library/label.cpp @@ -24,7 +24,7 @@ #include <tqpainter.h> #include <tqstyle.h> -#include <tqstylesheet.h> +#include <stylesheet.h> #include <tqsimplerichtext.h> #include <tqcursor.h> #include <tqpixmap.h> @@ -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 = tqsizeHint(); + TQSize oldSize = sizeHint(); setConfigValues(); relayoutLabel(oldSize, repaintWidget); @@ -99,7 +99,7 @@ void KSim::Label::setPixmap(const TQPixmap &pixmap) if (pixmap.serialNumber() == d->sidePixmap.serialNumber()) return; - TQSize oldSize = tqsizeHint(); + TQSize oldSize = sizeHint(); d->sidePixmap = pixmap; relayoutLabel(oldSize); @@ -110,7 +110,7 @@ const TQPixmap &KSim::Label::pixmap() const return d->sidePixmap; } -TQSize KSim::Label::tqsizeHint() const +TQSize KSim::Label::sizeHint() const { int width = fontMetrics().size(SingleLine, text()).width(); if (!pixmap().isNull()) @@ -123,9 +123,9 @@ TQSize KSim::Label::tqsizeHint() const return TQSize(width, height); } -TQSize KSim::Label::tqminimumSizeHint() const +TQSize KSim::Label::minimumSizeHint() const { - return tqsizeHint(); + return sizeHint(); } 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 tqrepaint etc + return; // If the text is the same, no need to repaint etc - TQSize oldSize = tqsizeHint(); - // set the text of our widget and tqrepaint + TQSize oldSize = sizeHint(); + // set the text of our widget and repaint d->text = text; relayoutLabel(oldSize); } @@ -183,13 +183,13 @@ const TQColor &KSim::Label::shadowColour() const void KSim::Label::setConfigValues() { TQFont newFont = font(); - bool tqrepaint = themeLoader().current().fontColours(this, + bool repaint = themeLoader().current().fontColours(this, newFont, d->mColour, d->sColour, d->showShadow); if (font() != newFont) setFont(newFont); - if (tqrepaint) + if (repaint) 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, tqcolorGroup(), true, + tqstyle().drawItem(painter, location, AlignCenter, colorGroup(), 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, tqcolorGroup(), true, + tqstyle().drawItem(painter, location, AlignCenter, colorGroup(), 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 = tqsizeHint(); + TQSize oldSize = sizeHint(); 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 tqrepaint) +void KSim::Label::relayoutLabel(const TQSize &old, bool repaint) { - if (tqsizeHint() != old) { + if (sizeHint() != old) { updateGeometry(); } - if (tqrepaint) + if (repaint) update(); } @@ -294,7 +294,7 @@ void KSim::Label::initWidget(int type) // try to reduce flicker as much as possible setBackgroundMode(NoBackground); - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, + setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); configureObject(); diff --git a/ksim/library/label.h b/ksim/library/label.h index f20d8df..9e24c95 100644 --- a/ksim/library/label.h +++ b/ksim/library/label.h @@ -108,11 +108,11 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; /** * reimplemented for internal reasons */ - virtual TQSize tqminimumSizeHint() const; + virtual TQSize minimumSizeHint() 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 tqrepaint = true); + void relayoutLabel(const TQSize &old, bool repaint = true); private: /** diff --git a/ksim/library/led.cpp b/ksim/library/led.cpp index 3fa8d7f..a20a1d1 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::tqsizeHint() const +TQSize KSim::LedLabel::sizeHint() const { - TQSize hint(Progress::tqsizeHint()); + TQSize hint(Progress::sizeHint()); if (d->sendLed.height() > hint.height()) hint.setHeight(d->sendLed.height()); diff --git a/ksim/library/led.h b/ksim/library/led.h index 5c5e615..6dcecce 100644 --- a/ksim/library/led.h +++ b/ksim/library/led.h @@ -88,7 +88,7 @@ namespace KSim */ Type type() const; /** - * Force the Led to tqrepaint its state + * Force the Led to repaint its state */ void update(); @@ -150,7 +150,7 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: /** diff --git a/ksim/library/pluginloader.cpp b/ksim/library/pluginloader.cpp index 775a02e..71b17b7 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").tqarg(file.readName())); + " plugins desktop file").arg(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").tqarg(file.readName())); + " is installed and is in your $TDEDIR/lib path").arg(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>") - .tqarg(d->lib.prepend("ksim_")).tqarg("KSIM_INIT_PLUGIN") - .tqarg(d->error)); + .arg(d->lib.prepend("ksim_")).arg("KSIM_INIT_PLUGIN") + .arg(d->error)); return false; break; default: diff --git a/ksim/library/progress.cpp b/ksim/library/progress.cpp index e37cff1..82ae16e 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::tqsizeHint() const +TQSize KSim::Progress::sizeHint() const { - TQSize hint(Label::tqsizeHint()); + TQSize hint(Label::sizeHint()); 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 = tqsizeHint(); + TQSize oldSize = sizeHint(); d->meterPixmap = pixmap; relayoutLabel(oldSize); } diff --git a/ksim/library/progress.h b/ksim/library/progress.h index 0e30986..415c9fa 100644 --- a/ksim/library/progress.h +++ b/ksim/library/progress.h @@ -122,7 +122,7 @@ namespace KSim /** * reimplemented for internal reasons */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: /** diff --git a/ksim/library/themeloader.cpp b/ksim/library/themeloader.cpp index 3fced29..f6d6474 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::tqpalette().active().background(); + return TQApplication::palette().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::tqpalette().active().background(); + return TQApplication::palette().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::tqfromLatin1("#ffffff #ffffff"); + color = TQString::fromLatin1("#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 tqrepaint = false; + bool repaint = 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"); - tqrepaint = true; + repaint = 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"); - tqrepaint = true; + repaint = true; } } else { font = currentFont(); } - return tqrepaint; + return repaint; } 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::tqfromLatin1("gkrellmrc") + alternativeAsString(); + TQString fileName = TQString::fromLatin1("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::tqpalette().active().background(); + TQColor color = TQApplication::palette().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::tqfromLatin1( "/themes" ) + + TQString::fromLatin1( "/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::tqfromLatin1("bg_meter_"); + TQString bgMeter = TQString::fromLatin1("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::tqfromLatin1("bg_panel_"); + TQString bgPanel = TQString::fromLatin1("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::tqfromLatin1("host/bg_panel"); + TQString tempFile = TQString::fromLatin1("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::tqfromLatin1("decal_net_leds"); + tempFile = TQString::fromLatin1("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::tqfromLatin1("_") + return (alternative == 0 ? TQString() : TQString::fromLatin1("_") + TQString::number(alternative)); } @@ -1225,7 +1225,7 @@ KSim::ThemeLoader::ThemeLoader() m_theme.create(d->fileNames, d->imageTypes, d->globalReader); - TQString fileName = TQString::tqfromLatin1("gkrellmrc") + alternativeAsString(); + TQString fileName = TQString::fromLatin1("gkrellmrc") + alternativeAsString(); m_theme.init(currentUrl(), fileName, currentAlternative()); reColourItems(); diff --git a/ksim/library/themetypes.h b/ksim/library/themetypes.h index 82b7aa3..9ca4bb4 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::tqfromLatin1("/") : returnString; + return incSlash ? returnString + TQString::fromLatin1("/") : returnString; } } } |