diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:51:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:51:21 -0600 |
commit | b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04 (patch) | |
tree | 76f49820693d443128d3720322ff1605e9bcd558 /src/newui/button.cpp | |
parent | 247f828db1b8dcdc9346c1568d81cfa00db99c9e (diff) | |
download | tdevelop-b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04.tar.gz tdevelop-b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/newui/button.cpp')
-rw-r--r-- | src/newui/button.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/newui/button.cpp b/src/newui/button.cpp index 3b483cd4..0d7cf9aa 100644 --- a/src/newui/button.cpp +++ b/src/newui/button.cpp @@ -49,8 +49,8 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, setToggleButton(true); setFocusPolicy(TQ_NoFocus); setDescription(m_description); - tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); - resize(tqsizeHint()); + setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + resize(sizeHint()); fixDimensions(Ideal::Bottom); TQToolTip::add(this, m_realText); @@ -62,9 +62,9 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, KConfig *config = kapp->config(); config->setGroup("UI"); - TQString accel = config->readEntry(TQString("button_%1").tqarg(text), ""); + TQString accel = config->readEntry(TQString("button_%1").arg(text), ""); if (!accel.isEmpty()) - setRealText(TQString("&%1 %2").tqarg(accel).tqarg(m_realText)); + setRealText(TQString("&%1 %2").arg(accel).arg(m_realText)); } Button::~Button() @@ -80,11 +80,11 @@ Button::~Button() TQString text = m_realText; if (text.contains(r2)) text.remove(r2); - config->writeEntry(TQString("button_%1").tqarg(text), r.cap(1)); + config->writeEntry(TQString("button_%1").arg(text), r.cap(1)); } else { - config->writeEntry(TQString("button_%1").tqarg(m_realText), ""); + config->writeEntry(TQString("button_%1").arg(m_realText), ""); } } @@ -131,11 +131,11 @@ void Button::drawButton(TQPainter *p) pm.fill(eraseColor()); TQPainter p2(&pm); - tqstyle().tqdrawControl(TQStyle::CE_PushButton,&p2,this, TQRect(0,0,pm.width(),pm.height()), tqcolorGroup(),flags); + tqstyle().drawControl(TQStyle::CE_PushButton,&p2,this, TQRect(0,0,pm.width(),pm.height()), colorGroup(),flags); - tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel, &p2, this, + tqstyle().drawControl(TQStyle::CE_PushButtonLabel, &p2, this, TQRect(0,0,pm.width(),pm.height()), - tqcolorGroup(), flags, TQStyleOption()); + colorGroup(), flags, TQStyleOption()); switch (m_place) { @@ -178,7 +178,7 @@ void Button::fixDimensions(Place oldPlace) if ((oldPlace == Ideal::Bottom) || (oldPlace == Ideal::Top)) { setFixedWidth(height()); - setMinimumHeight(tqsizeHint().width()); + setMinimumHeight(sizeHint().width()); setMaximumHeight(32767); } break; @@ -187,19 +187,19 @@ void Button::fixDimensions(Place oldPlace) if ((oldPlace == Ideal::Left) || (oldPlace == Ideal::Right)) { setFixedHeight(width()); - setMinimumWidth(tqsizeHint().height()); + setMinimumWidth(sizeHint().height()); setMaximumWidth(32767); } break; } } -TQSize Button::tqsizeHint() const +TQSize Button::sizeHint() const { - return tqsizeHint(text()); + return sizeHint(text()); } -TQSize Button::tqsizeHint(const TQString &text) const +TQSize Button::sizeHint(const TQString &text) const { constPolish(); int w = 0, h = 0; @@ -211,7 +211,7 @@ TQSize Button::tqsizeHint(const TQString &text) const h = TQMAX( h, ih ); } if ( isMenuButton() ) - w += tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator, this); + w += tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { TQPixmap *pm = (TQPixmap *)pixmap(); w += pm->width(); @@ -220,7 +220,7 @@ TQSize Button::tqsizeHint(const TQString &text) const TQString s( text ); bool empty = s.isEmpty(); if ( empty ) - s = TQString::tqfromLatin1("XXXX"); + s = TQString::fromLatin1("XXXX"); TQFontMetrics fm = fontMetrics(); TQSize sz = fm.size( ShowPrefix, s ); if(!empty || !w) @@ -239,12 +239,12 @@ void Button::updateSize() { case Ideal::Left: case Ideal::Right: - setMinimumHeight(tqsizeHint().width()); - resize(tqsizeHint().height(), tqsizeHint().width()); + setMinimumHeight(sizeHint().width()); + resize(sizeHint().height(), sizeHint().width()); break; case Ideal::Top: case Ideal::Bottom: - resize(tqsizeHint().width(), tqsizeHint().height()); + resize(sizeHint().width(), sizeHint().height()); break; } } @@ -319,7 +319,7 @@ void Button::assignAccel() if (ok) { TQString text = realTextWithoutAccel(); - text = TQString("&%1 %2").tqarg(num).tqarg(text); + text = TQString("&%1 %2").arg(num).arg(text); setRealText(text); } } |