diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:03:41 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:03:41 -0600 |
commit | 17678d65de293ae9a8b077b5c0bc3f493c617f8b (patch) | |
tree | b4131182c75a7a638f626bc3b9415b6f47ff680e /src/tag.cpp | |
parent | 522c7294f06d294c77bc1ea7d0dec4b371c43373 (diff) | |
download | basket-17678d65de293ae9a8b077b5c0bc3f493c617f8b.tar.gz basket-17678d65de293ae9a8b077b5c0bc3f493c617f8b.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'src/tag.cpp')
-rw-r--r-- | src/tag.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tag.cpp b/src/tag.cpp index 700b88e..1dce82b 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -736,7 +736,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac */ bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/; if (drawingEtchedText) { - TQString styleName = kapp->tqstyle().name(); + TQString styleName = kapp->style().name(); if (styleName == "plastik" || styleName == "lipstik") painter->setPen(cg.light()); drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground(); @@ -806,7 +806,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ */ bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/; if (drawingEtchedText) { - TQString styleName = kapp->tqstyle().name(); + TQString styleName = kapp->style().name(); if (styleName == "plastik" || styleName == "lipstik") painter->setPen(cg.light()); drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground(); @@ -851,11 +851,11 @@ TQSize StateMenuItem::sizeHint() TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth, 0); - int height = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight, 0); + int width = kapp->style().pixelMetric(TQStyle::PM_IndicatorWidth, 0); + int height = kapp->style().pixelMetric(TQStyle::PM_IndicatorHeight, 0); TQRect rect(0, 0, width, height); - TQColor menuBackgroundColor = (dynamic_cast<KStyle*>(&(kapp->tqstyle())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); + TQColor menuBackgroundColor = (dynamic_cast<KStyle*>(&(kapp->style())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); // Enabled, Not hovering TQPixmap pixmap(width, height); @@ -863,7 +863,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQPainter painter(&pixmap); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); TQColor background = cg.color(TQColorGroup::Background); - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); + kapp->style().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); // Enabled, Hovering @@ -872,7 +872,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) painter.begin(&pixmapHover); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); + kapp->style().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); // Disabled @@ -881,7 +881,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) painter.begin(&pixmapDisabled); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); cg.setColor(TQColorGroup::Background, background); - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); + kapp->style().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); TQIconSet iconSet(pixmap); @@ -892,8 +892,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); - int height = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); + int width = kapp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); + int height = kapp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); TQRect rect(0, 0, width, height); int style = TQStyle::Style_Default | TQStyle::Style_Enabled | (checked ? TQStyle::Style_On : TQStyle::Style_Off); @@ -902,13 +902,13 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) pixmap.fill(TQt::red); TQPainter painter(&pixmap); /* We can't use that line of code (like for checkboxes): - * //kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); + * //kapp->style().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); * because Plastik (and derived styles) don't care of the TQStyle::Style_On flag and will ALWAYS draw an unchecked radiobutton. * So, we use another method: */ TQRadioButton rb(0); rb.setChecked(checked); - kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); /* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted, * and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square. @@ -921,10 +921,10 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) TQPixmap pixmapHover(width, height); pixmapHover.fill(TQt::red); painter.begin(&pixmapHover); - //kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); + //kapp->style().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); - kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); pixmapHover.setMask(pixmapHover.createHeuristicMask()); |