diff options
Diffstat (limited to 'ksim/library/label.cpp')
-rw-r--r-- | ksim/library/label.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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 <tqpainter.h> #include <tqstyle.h> -#include <stylesheet.h> +#include <tqstylesheet.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 = 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(); |