diff options
Diffstat (limited to 'src/newui')
-rw-r--r-- | src/newui/button.cpp | 40 | ||||
-rw-r--r-- | src/newui/button.h | 4 | ||||
-rw-r--r-- | src/newui/buttonbar.cpp | 22 | ||||
-rw-r--r-- | src/newui/buttonbar.h | 8 | ||||
-rw-r--r-- | src/newui/ddockwindow.cpp | 20 | ||||
-rw-r--r-- | src/newui/dmainwindow.cpp | 4 | ||||
-rw-r--r-- | src/newui/docksplitter.cpp | 2 | ||||
-rw-r--r-- | src/newui/dtabwidget.cpp | 4 |
8 files changed, 52 insertions, 52 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); } } diff --git a/src/newui/button.h b/src/newui/button.h index 34ce4e3a..96948267 100644 --- a/src/newui/button.h +++ b/src/newui/button.h @@ -54,8 +54,8 @@ public: /**Sets the mode of a button.*/ void setMode(Ideal::ButtonMode mode); - TQSize tqsizeHint() const; - TQSize tqsizeHint(const TQString &text) const; + TQSize sizeHint() const; + TQSize sizeHint(const TQString &text) const; /**Updates size of a widget. Used after squeezing button's text.*/ void updateSize(); diff --git a/src/newui/buttonbar.cpp b/src/newui/buttonbar.cpp index ddd4249b..2f193ad8 100644 --- a/src/newui/buttonbar.cpp +++ b/src/newui/buttonbar.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "buttonbar.h" -#include <tqlayout.h> +#include <layout.h> #include <kdebug.h> #include <kconfig.h> @@ -37,9 +37,9 @@ ButtonLayout::ButtonLayout(ButtonBar *parent, Direction d, int margin, int spaci { } -TQSize ButtonLayout::tqminimumSize() const +TQSize ButtonLayout::minimumSize() const { - TQSize size = TQBoxLayout::tqminimumSize(); + TQSize size = TQBoxLayout::minimumSize(); if (!m_buttonBar->autoResize()) return size; @@ -54,7 +54,7 @@ TQSize ButtonLayout::tqminimumSize() const case Ideal::Bottom: return TQSize(0,size.height()); } - return TQBoxLayout::tqminimumSize(); + return TQBoxLayout::minimumSize(); } @@ -128,14 +128,14 @@ void ButtonBar::fixDimensions() { case Ideal::Left: case Ideal::Right: - setFixedWidth(tqsizeHint().width()); - setMinimumHeight(tqsizeHint().height()); + setFixedWidth(sizeHint().width()); + setMinimumHeight(sizeHint().height()); setMaximumHeight(32767); break; case Ideal::Top: case Ideal::Bottom: - setFixedHeight(tqsizeHint().height()); - setMinimumWidth(tqsizeHint().width()); + setFixedHeight(sizeHint().height()); + setMinimumWidth(sizeHint().width()); setMaximumWidth(32767); break; } @@ -156,13 +156,13 @@ void ButtonBar::resizeEvent(TQResizeEvent *ev) { case Ideal::Left: case Ideal::Right: - preferredDimension = l->TQBoxLayout::tqminimumSize().height(); + preferredDimension = l->TQBoxLayout::minimumSize().height(); actualDimension = size().height(); oldDimension = ev->oldSize().height(); break; case Ideal::Top: case Ideal::Bottom: - preferredDimension = l->TQBoxLayout::tqminimumSize().width(); + preferredDimension = l->TQBoxLayout::minimumSize().width(); actualDimension = size().width(); oldDimension = ev->oldSize().width(); break; @@ -285,7 +285,7 @@ int ButtonBar::originalDimension() int size = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { - size += (*it)->tqsizeHint((*it)->realText()).width(); + size += (*it)->sizeHint((*it)->realText()).width(); } return size; } diff --git a/src/newui/buttonbar.h b/src/newui/buttonbar.h index ce4ad23b..9eb18e30 100644 --- a/src/newui/buttonbar.h +++ b/src/newui/buttonbar.h @@ -25,21 +25,21 @@ #include "comdefs.h" -#include <tqlayout.h> +#include <layout.h> namespace Ideal { class Button; class ButtonBar; -/**@short A tqlayout for a ButtonBar class. +/**@short A layout for a ButtonBar class. -Overrides tqminimumSize method to allow shrinking button bar buttons.*/ +Overrides minimumSize method to allow shrinking button bar buttons.*/ class ButtonLayout: public TQBoxLayout{ public: ButtonLayout(ButtonBar *parent, Direction d, int margin = 0, int spacing = -1, const char * name = 0); - virtual TQSize tqminimumSize() const; + virtual TQSize minimumSize() const; private: ButtonBar *m_buttonBar; diff --git a/src/newui/ddockwindow.cpp b/src/newui/ddockwindow.cpp index 9ce444eb..07d3da2a 100644 --- a/src/newui/ddockwindow.cpp +++ b/src/newui/ddockwindow.cpp @@ -20,7 +20,7 @@ #include "ddockwindow.h" #include <tqtoolbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstyle.h> #include <tqwidgetstack.h> #include <tqimage.h> @@ -104,7 +104,7 @@ void DDockWindow::setVisible(bool v) { //write dock width to the config file KConfig *config = kapp->config(); - TQString group = TQString("%1").tqarg(m_name); + TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (m_visible) @@ -115,13 +115,13 @@ void DDockWindow::setVisible(bool v) v ? m_widgetStack->show() : m_widgetStack->hide(); m_visible = v; - m_internalLayout->tqinvalidate(); + m_internalLayout->invalidate(); if (!m_visible) { if (m_position == DDockWindow::Bottom) - setFixedExtentHeight(m_internalLayout->tqsizeHint().height()); + setFixedExtentHeight(m_internalLayout->sizeHint().height()); else - setFixedExtentWidth(m_internalLayout->tqsizeHint().width()); + setFixedExtentWidth(m_internalLayout->sizeHint().width()); emit hidden(); } else @@ -130,12 +130,12 @@ void DDockWindow::setVisible(bool v) int size = 0; if (m_position == DDockWindow::Bottom) { - size = config->readNumEntry("ViewWidth", m_internalLayout->tqsizeHint().height()); + size = config->readNumEntry("ViewWidth", m_internalLayout->sizeHint().height()); setFixedExtentHeight(size); } else { - size = config->readNumEntry("ViewWidth", m_internalLayout->tqsizeHint().width()); + size = config->readNumEntry("ViewWidth", m_internalLayout->sizeHint().width()); setFixedExtentWidth(size); } } @@ -148,7 +148,7 @@ void DDockWindow::loadSettings() void DDockWindow::saveSettings() { KConfig *config = kapp->config(); - TQString group = TQString("%1").tqarg(m_name); + TQString group = TQString("%1").arg(m_name); int invisibleWidth = 0; config->setGroup(group); if (config->hasKey("ViewWidth")) @@ -200,7 +200,7 @@ void DDockWindow::addWidget(const TQString &title, TQWidget *widget, bool skipAc //if the widget was selected last time the dock is deleted //we need to show it KConfig *config = kapp->config(); - TQString group = TQString("%1").tqarg(m_name); + TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (config->readEntry("ViewLastWidget") == title) { @@ -338,7 +338,7 @@ bool DDockWindow::isActive() { if (m_toggledButton) { - TQWidget *w = tqApp->tqfocusWidget(); + TQWidget *w = tqApp->focusWidget(); if (!w) return false; TQWidget *toolWidget = m_widgets[m_toggledButton]; diff --git a/src/newui/dmainwindow.cpp b/src/newui/dmainwindow.cpp index 4c787886..45894178 100644 --- a/src/newui/dmainwindow.cpp +++ b/src/newui/dmainwindow.cpp @@ -184,8 +184,8 @@ DTabWidget *DMainWindow::splitVertical() void DMainWindow::invalidateActiveTabWidget() { -/* TQWidget *focused = m_central->tqfocusWidget(); - kdDebug(9000) << "tqinvalidate: " << focused << endl; +/* TQWidget *focused = m_central->focusWidget(); + kdDebug(9000) << "invalidate: " << focused << endl; if (focused == 0) return; if (!m_widgets.contains(focused)) diff --git a/src/newui/docksplitter.cpp b/src/newui/docksplitter.cpp index 8b382fb7..26fd4a71 100644 --- a/src/newui/docksplitter.cpp +++ b/src/newui/docksplitter.cpp @@ -113,7 +113,7 @@ void DockSplitter::removeDock(uint row, uint col, bool alsoDelete) w->hide(); } - m_splitters[row]->setMinimumSize(m_splitters[row]->tqminimumSizeHint()); + m_splitters[row]->setMinimumSize(m_splitters[row]->minimumSizeHint()); if (isRowEmpty(row)) { diff --git a/src/newui/dtabwidget.cpp b/src/newui/dtabwidget.cpp index 64b60ee7..c3a0c7d1 100644 --- a/src/newui/dtabwidget.cpp +++ b/src/newui/dtabwidget.cpp @@ -85,7 +85,7 @@ void DTabWidget::insertTab(TQWidget *child, const TQString &label, int index) if (m_closeButton && m_closeButtonShown) m_closeButton->show(); KTabWidget::insertTab(child, label, index); - if (index != -1) tabBar()->tqrepaint(); + if (index != -1) tabBar()->repaint(); } void DTabWidget::insertTab(TQWidget *child, const TQIconSet &iconset, @@ -94,7 +94,7 @@ void DTabWidget::insertTab(TQWidget *child, const TQIconSet &iconset, if (m_closeButton && m_closeButtonShown) m_closeButton->show(); KTabWidget::insertTab(child, iconset, label, index); - if (index != -1) tabBar()->tqrepaint(); + if (index != -1) tabBar()->repaint(); } /*void DTabWidget::updateHistory(TQWidget *w) |