From bcc684e28ad6f9ebeeae5d334a4dc297cef3e816 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:35:27 -0600 Subject: Rename old tq methods that no longer need a unique name --- ksim/library/chart.cpp | 16 ++++++++-------- ksim/library/chart.h | 4 ++-- ksim/library/label.cpp | 22 +++++++++++----------- ksim/library/label.h | 4 ++-- ksim/library/led.cpp | 4 ++-- ksim/library/led.h | 2 +- ksim/library/progress.cpp | 6 +++--- ksim/library/progress.h | 2 +- ksim/library/themeloader.cpp | 18 +++++++++--------- ksim/library/themetypes.h | 2 +- 10 files changed, 40 insertions(+), 40 deletions(-) (limited to 'ksim/library') diff --git a/ksim/library/chart.cpp b/ksim/library/chart.cpp index ca555a4..388b9ea 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"); @@ -264,10 +264,10 @@ void KSim::Chart::configureObject(bool repaintWidget) } // Update our tqgeometry if we need to let any - // tqlayout know about our tqsizeHint() change - if (oldSize != tqsizeHint()) { + // tqlayout 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) @@ -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..32a18d8 100644 --- a/ksim/library/label.cpp +++ b/ksim/library/label.cpp @@ -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() @@ -138,7 +138,7 @@ void KSim::Label::setText(const TQString &text) if (text == d->text) return; // If the text is the same, no need to tqrepaint etc - TQSize oldSize = tqsizeHint(); + TQSize oldSize = sizeHint(); // set the text of our widget and tqrepaint d->text = text; relayoutLabel(oldSize); @@ -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); @@ -278,7 +278,7 @@ void KSim::Label::setThemePixmap(const TQString &image) void KSim::Label::relayoutLabel(const TQSize &old, bool tqrepaint) { - if (tqsizeHint() != old) { + if (sizeHint() != old) { updateGeometry(); } @@ -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..8ae9b64 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: /** 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..bdb26f4 100644 --- a/ksim/library/led.h +++ b/ksim/library/led.h @@ -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/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..a453af2 100644 --- a/ksim/library/themeloader.cpp +++ b/ksim/library/themeloader.cpp @@ -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]; } @@ -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()); } @@ -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; } } } -- cgit v1.2.3