diff options
Diffstat (limited to 'src/tag.cpp')
-rw-r--r-- | src/tag.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/tag.cpp b/src/tag.cpp index f560397..700b88e 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -77,7 +77,7 @@ TQString State::fullName() { if (!parentTag() || parentTag()->states().count() == 1) return (name().isEmpty() && parentTag() ? parentTag()->name() : name()); - return TQString(i18n("%1: %2")).tqarg(parentTag()->name(), name()); + return TQString(i18n("%1: %2")).arg(parentTag()->name(), name()); } TQFont State::font(TQFont base) @@ -541,9 +541,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </state>\n" " </tag>\n" "\n") - .tqarg( i18n("To Do"), i18n("Unchecked"), i18n("Done") ) // %1 %2 %3 - .tqarg( i18n("Progress"), i18n("0 %"), i18n("25 %") ) // %4 %5 %6 - .tqarg( i18n("50 %"), i18n("75 %"), i18n("100 %") ) // %7 %8 %9 + .arg( i18n("To Do"), i18n("Unchecked"), i18n("Done") ) // %1 %2 %3 + .arg( i18n("Progress"), i18n("0 %"), i18n("25 %") ) // %4 %5 %6 + .arg( i18n("50 %"), i18n("75 %"), i18n("100 %") ) // %7 %8 %9 + TQString( " <tag>\n" " <name>%1</name>\n" // "Priority" @@ -596,9 +596,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </state>\n" " </tag>\n" "\n") - .tqarg( i18n("Priority"), i18n("Low"), i18n("Medium") ) // %1 %2 %3 - .tqarg( i18n("High"), i18n("Preference"), i18n("Bad") ) // %4 %5 %6 - .tqarg( i18n("Good"), i18n("Excellent"), i18n("Highlight") ) // %7 %8 %9 + .arg( i18n("Priority"), i18n("Low"), i18n("Medium") ) // %1 %2 %3 + .arg( i18n("High"), i18n("Preference"), i18n("Bad") ) // %4 %5 %6 + .arg( i18n("Good"), i18n("Excellent"), i18n("Highlight") ) // %7 %8 %9 + TQString( " <tag>\n" " <name>%1</name>\n" // "Important" @@ -664,9 +664,9 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </state>\n" " </tag>""\n" "\n") - .tqarg( i18n("Important"), i18n("Very Important"), i18n("Information") ) // %1 %2 %3 - .tqarg( i18n("Idea"), i18n("The initial of 'Idea'", "I."), i18n("Title") ) // %4 %5 %6 - .tqarg( i18n("Code"), i18n("Work"), i18n("The initial of 'Work'", "W.") ) // %7 %8 %9 + .arg( i18n("Important"), i18n("Very Important"), i18n("Information") ) // %1 %2 %3 + .arg( i18n("Idea"), i18n("The initial of 'Idea'", "I."), i18n("Title") ) // %4 %5 %6 + .arg( i18n("Code"), i18n("Work"), i18n("The initial of 'Work'", "W.") ) // %7 %8 %9 + TQString( " <tag>\n" " <state id=\"personal\">\n" @@ -684,7 +684,7 @@ void Tag::createDefaultTagsSet(const TQString &fullPath) " </tag>\n" "</basketTags>\n" "") - .tqarg( i18n("Personal"), i18n("The initial of 'Personal'", "P."), i18n("Funny") ); // %1 %2 %3 + .arg( i18n("Personal"), i18n("The initial of 'Personal'", "P."), i18n("Funny") ); // %1 %2 %3 // Write to Disk: TQFile file(fullPath); @@ -768,7 +768,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac } } -TQSize IndentedMenuItem::tqsizeHint() +TQSize IndentedMenuItem::sizeHint() { int iconSize = KIcon::SizeSmall; int iconMargin = StateMenuItem::iconMargin(); @@ -841,7 +841,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ } } -TQSize StateMenuItem::tqsizeHint() +TQSize StateMenuItem::sizeHint() { int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons TQFont theFont = m_state->font(KGlobalSettings::menuFont()); @@ -851,15 +851,15 @@ TQSize StateMenuItem::tqsizeHint() TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth, 0); - int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight, 0); + int width = kapp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth, 0); + int height = kapp->tqstyle().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)); // Enabled, Not hovering TQPixmap pixmap(width, height); - pixmap.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmap.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws TQPainter painter(&pixmap); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); TQColor background = cg.color(TQColorGroup::Background); @@ -868,7 +868,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) // Enabled, Hovering TQPixmap pixmapHover(width, height); - pixmapHover.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmapHover.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapHover); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); @@ -877,7 +877,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) // Disabled TQPixmap pixmapDisabled(width, height); - pixmapDisabled.fill(menuBackgroundColor); // In case the tqpixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws + pixmapDisabled.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapDisabled); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); cg.setColor(TQColorGroup::Background, background); @@ -892,8 +892,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) { - int width = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); - int height = kapp->tqstyle().tqpixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); + int width = kapp->tqstyle().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); + int height = kapp->tqstyle().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); @@ -908,7 +908,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) */ TQRadioButton rb(0); rb.setChecked(checked); - kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->tqstyle().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. @@ -924,7 +924,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) //kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); style |= TQStyle::Style_MouseOver; cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); - kapp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); + kapp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); pixmapHover.setMask(pixmapHover.createHeuristicMask()); |