From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/newui/button.cpp | 126 ++++++++++++++++++++++----------------------- src/newui/button.h | 40 +++++++------- src/newui/buttonbar.cpp | 40 +++++++------- src/newui/buttonbar.h | 16 +++--- src/newui/ddockwindow.cpp | 76 +++++++++++++-------------- src/newui/ddockwindow.h | 32 ++++++------ src/newui/dmainwindow.cpp | 64 +++++++++++------------ src/newui/dmainwindow.h | 36 ++++++------- src/newui/docksplitter.cpp | 24 ++++----- src/newui/docksplitter.h | 18 +++---- src/newui/dtabwidget.cpp | 24 ++++----- src/newui/dtabwidget.h | 18 +++---- 12 files changed, 257 insertions(+), 257 deletions(-) (limited to 'src/newui') diff --git a/src/newui/button.cpp b/src/newui/button.cpp index a0cdd246..0631510e 100644 --- a/src/newui/button.cpp +++ b/src/newui/button.cpp @@ -19,11 +19,11 @@ ***************************************************************************/ #include "button.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,9 +39,9 @@ namespace Ideal { -Button::Button(ButtonBar *parent, const QString text, const QIconSet &icon, - const QString &description) - :QPushButton(icon, text, parent), m_buttonBar(parent), m_description(description), +Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon, + const TQString &description) + :TQPushButton(icon, text, parent), m_buttonBar(parent), m_description(description), m_place(parent->place()), m_realText(text), m_realIconSet(icon) { hide(); @@ -49,22 +49,22 @@ Button::Button(ButtonBar *parent, const QString text, const QIconSet &icon, setToggleButton(true); setFocusPolicy(NoFocus); setDescription(m_description); - setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); resize(sizeHint()); fixDimensions(Ideal::Bottom); - QToolTip::add(this, m_realText); + TQToolTip::add(this, m_realText); m_assignAccelAction = new KAction(i18n("Assign Accelerator..."), 0, - this, SLOT(assignAccel()), this); + this, TQT_SLOT(assignAccel()), this); m_clearAccelAction = new KAction(i18n("Clear Accelerator"), 0, - this, SLOT(clearAccel()), this); + this, TQT_SLOT(clearAccel()), this); KConfig *config = kapp->config(); config->setGroup("UI"); - QString accel = config->readEntry(QString("button_%1").arg(text), ""); + TQString accel = config->readEntry(TQString("button_%1").arg(text), ""); if (!accel.isEmpty()) - setRealText(QString("&%1 %2").arg(accel).arg(m_realText)); + setRealText(TQString("&%1 %2").arg(accel).arg(m_realText)); } Button::~Button() @@ -73,37 +73,37 @@ Button::~Button() KConfig *config = kapp->config(); config->setGroup("UI"); - QRegExp r("^&([0-9])\\s.*"); - QRegExp r2("^&[0-9]\\s"); + TQRegExp r("^&([0-9])\\s.*"); + TQRegExp r2("^&[0-9]\\s"); if (r.search(m_realText) > -1) { - QString text = m_realText; + TQString text = m_realText; if (text.contains(r2)) text.remove(r2); - config->writeEntry(QString("button_%1").arg(text), r.cap(1)); + config->writeEntry(TQString("button_%1").arg(text), r.cap(1)); } else { - config->writeEntry(QString("button_%1").arg(m_realText), ""); + config->writeEntry(TQString("button_%1").arg(m_realText), ""); } } -void Button::setDescription(const QString &description) +void Button::setDescription(const TQString &description) { m_description = description; - QToolTip::remove(this); - QToolTip::add(this, m_description); + TQToolTip::remove(this); + TQToolTip::add(this, m_description); } -QString Button::description() const +TQString Button::description() const { return m_description; } -void Button::drawButton(QPainter *p) +void Button::drawButton(TQPainter *p) { - QRect r = rect(); - QSize sh = r.size(); + TQRect r = rect(); + TQSize sh = r.size(); switch (m_place) { case Ideal::Left: @@ -113,29 +113,29 @@ void Button::drawButton(QPainter *p) break; } - QStyle::SFlags flags = QStyle::Style_Default; + TQStyle::SFlags flags = TQStyle::Style_Default; if (isEnabled()) - flags |= QStyle::Style_Enabled; + flags |= TQStyle::Style_Enabled; if (hasFocus()) - flags |= QStyle::Style_HasFocus; + flags |= TQStyle::Style_HasFocus; if (isDown()) - flags |= QStyle::Style_Down; + flags |= TQStyle::Style_Down; if (isOn()) - flags |= QStyle::Style_On; + flags |= TQStyle::Style_On; if (! isFlat() && ! isDown()) - flags |= QStyle::Style_Raised; + flags |= TQStyle::Style_Raised; if (isDefault()) - flags |= QStyle::Style_ButtonDefault; + flags |= TQStyle::Style_ButtonDefault; - QPixmap pm(sh.width(), sh.height()); + TQPixmap pm(sh.width(), sh.height()); pm.fill(eraseColor()); - QPainter p2(&pm); + TQPainter p2(&pm); - style().drawControl(QStyle::CE_PushButton,&p2,this, QRect(0,0,pm.width(),pm.height()), colorGroup(),flags); + style().drawControl(TQStyle::CE_PushButton,&p2,this, TQRect(0,0,pm.width(),pm.height()), colorGroup(),flags); - style().drawControl(QStyle::CE_PushButtonLabel, &p2, this, - QRect(0,0,pm.width(),pm.height()), - colorGroup(), flags, QStyleOption()); + style().drawControl(TQStyle::CE_PushButtonLabel, &p2, this, + TQRect(0,0,pm.width(),pm.height()), + colorGroup(), flags, TQStyleOption()); switch (m_place) { @@ -153,7 +153,7 @@ void Button::drawButton(QPainter *p) } } -void Button::drawButtonLabel(QPainter */*p*/) +void Button::drawButtonLabel(TQPainter */*p*/) { } @@ -194,43 +194,43 @@ void Button::fixDimensions(Place oldPlace) } } -QSize Button::sizeHint() const +TQSize Button::sizeHint() const { return sizeHint(text()); } -QSize Button::sizeHint(const QString &text) const +TQSize Button::sizeHint(const TQString &text) const { constPolish(); int w = 0, h = 0; if ( iconSet() && !iconSet()->isNull() && (m_buttonBar->mode() != Text) ) { - int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4; - int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height(); + int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; + int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height(); w += iw; h = QMAX( h, ih ); } if ( isMenuButton() ) - w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this); + w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this); if ( pixmap() ) { - QPixmap *pm = (QPixmap *)pixmap(); + TQPixmap *pm = (TQPixmap *)pixmap(); w += pm->width(); h += pm->height(); } else if (m_buttonBar->mode() != Icons) { - QString s( text ); + TQString s( text ); bool empty = s.isEmpty(); if ( empty ) - s = QString::fromLatin1("XXXX"); - QFontMetrics fm = fontMetrics(); - QSize sz = fm.size( ShowPrefix, s ); + s = TQString::fromLatin1("XXXX"); + TQFontMetrics fm = fontMetrics(); + TQSize sz = fm.size( ShowPrefix, s ); if(!empty || !w) w += sz.width(); if(!empty || !h) h = QMAX(h, sz.height()); } - return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)). - expandedTo(QApplication::globalStrut())); + return (style().sizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)). + expandedTo(TQApplication::globalStrut())); } void Button::updateSize() @@ -249,7 +249,7 @@ void Button::updateSize() } } -QString Button::realText() const +TQString Button::realText() const { return m_realText; } @@ -285,7 +285,7 @@ void Button::enableIconSet() void Button::disableIconSet() { - setIconSet(QIconSet()); + setIconSet(TQIconSet()); } void Button::disableText() @@ -299,12 +299,12 @@ void Button::enableText() setText(m_realText); } -void Button::contextMenuEvent(QContextMenuEvent *e) +void Button::contextMenuEvent(TQContextMenuEvent *e) { - QPopupMenu menu; + TQPopupMenu menu; m_assignAccelAction->plug(&menu); - if (m_realText.contains(QRegExp("^&[0-9]\\s"))) + if (m_realText.contains(TQRegExp("^&[0-9]\\s"))) m_clearAccelAction->plug(&menu); emit contextMenu( &menu ); @@ -318,13 +318,13 @@ void Button::assignAccel() int num = KInputDialog::getInteger(i18n("Change Button Number"), i18n("New accelerator number:"), 1, 0, 10, 1, &ok, this); if (ok) { - QString text = realTextWithoutAccel(); - text = QString("&%1 %2").arg(num).arg(text); + TQString text = realTextWithoutAccel(); + text = TQString("&%1 %2").arg(num).arg(text); setRealText(text); } } -void Button::setRealText(const QString &text) +void Button::setRealText(const TQString &text) { m_realText = text; setText(text); @@ -336,10 +336,10 @@ void Button::clearAccel() setRealText(realTextWithoutAccel()); } -QString Button::realTextWithoutAccel() const +TQString Button::realTextWithoutAccel() const { - QString text = m_realText; - QRegExp r("^&[0-9]\\s"); + TQString text = m_realText; + TQRegExp r("^&[0-9]\\s"); if (text.contains(r)) text.remove(r); return text; diff --git a/src/newui/button.h b/src/newui/button.h index bc61d9c5..86e7dbed 100644 --- a/src/newui/button.h +++ b/src/newui/button.h @@ -20,8 +20,8 @@ #ifndef IDEALBUTTON_H #define IDEALBUTTON_H -#include -#include +#include +#include #include "comdefs.h" @@ -34,50 +34,50 @@ class ButtonBar; /** @short A button to place onto the ButtonBar -A QPushButton derivative with a size of a QToolBar. Button can be rotated +A TQPushButton derivative with a size of a TQToolBar. Button can be rotated (placed onto different places in ideal mode). */ -class Button : public QPushButton { +class Button : public TQPushButton { Q_OBJECT public: - Button(ButtonBar *parent, const QString text, const QIconSet &icon = QIconSet(), - const QString &description = QString::null); + Button(ButtonBar *parent, const TQString text, const TQIconSet &icon = TQIconSet(), + const TQString &description = TQString::null); /**Sets the description used as a tooltip.*/ - void setDescription(const QString &description); + void setDescription(const TQString &description); /**Returns the description.*/ - QString description() const; + TQString description() const; /**Sets the place of a button.*/ void setPlace(Ideal::Place place); /**Sets the mode of a button.*/ void setMode(Ideal::ButtonMode mode); - QSize sizeHint() const; - QSize sizeHint(const QString &text) const; + TQSize sizeHint() const; + TQSize sizeHint(const TQString &text) const; /**Updates size of a widget. Used after squeezing button's text.*/ void updateSize(); /**Returns the real (i.e. not squeezed) text of a button.*/ - QString realText() const; - QString realTextWithoutAccel() const; - void setRealText(const QString &text); + TQString realText() const; + TQString realTextWithoutAccel() const; + void setRealText(const TQString &text); protected: ButtonMode mode(); - virtual void drawButton(QPainter *p); - virtual void drawButtonLabel(QPainter *p); + virtual void drawButton(TQPainter *p); + virtual void drawButtonLabel(TQPainter *p); - virtual void contextMenuEvent(QContextMenuEvent *e); + virtual void contextMenuEvent(TQContextMenuEvent *e); protected slots: void assignAccel(); void clearAccel(); signals: - void contextMenu(QPopupMenu*); + void contextMenu(TQPopupMenu*); private: virtual ~Button(); @@ -91,11 +91,11 @@ private: ButtonBar *m_buttonBar; - QString m_description; + TQString m_description; Place m_place; - QString m_realText; - QIconSet m_realIconSet; + TQString m_realText; + TQIconSet m_realIconSet; KAction *m_assignAccelAction; KAction *m_clearAccelAction; diff --git a/src/newui/buttonbar.cpp b/src/newui/buttonbar.cpp index 52a20bf5..b2a3b47c 100644 --- a/src/newui/buttonbar.cpp +++ b/src/newui/buttonbar.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "buttonbar.h" -#include +#include #include #include @@ -33,13 +33,13 @@ namespace Ideal { //ButtonLayout class ButtonLayout::ButtonLayout(ButtonBar *parent, Direction d, int margin, int spacing, const char *name) - :QBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent) + :TQBoxLayout(parent, d, margin, spacing, name), m_buttonBar(parent) { } -QSize ButtonLayout::minimumSize() const +TQSize ButtonLayout::minimumSize() const { - QSize size = QBoxLayout::minimumSize(); + TQSize size = TQBoxLayout::minimumSize(); if (!m_buttonBar->autoResize()) return size; @@ -48,13 +48,13 @@ QSize ButtonLayout::minimumSize() const { case Ideal::Left: case Ideal::Right: - return QSize(size.width(),0); + return TQSize(size.width(),0); break; case Ideal::Top: case Ideal::Bottom: - return QSize(0,size.height()); + return TQSize(0,size.height()); } - return QBoxLayout::minimumSize(); + return TQBoxLayout::minimumSize(); } @@ -62,22 +62,22 @@ QSize ButtonLayout::minimumSize() const //ButtonBar class -ButtonBar::ButtonBar(Place place, ButtonMode mode, QWidget *parent, const char *name) - :QWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true) +ButtonBar::ButtonBar(Place place, ButtonMode mode, TQWidget *parent, const char *name) + :TQWidget(parent, name), m_place(place), l(0), m_shrinked(false), m_autoResize(true) { switch (m_place) { case Ideal::Left: case Ideal::Right: - l = new ButtonLayout(this, QBoxLayout::TopToBottom, 0, 0); + l = new ButtonLayout(this, TQBoxLayout::TopToBottom, 0, 0); break; case Ideal::Top: case Ideal::Bottom: - l = new ButtonLayout(this, QBoxLayout::LeftToRight, 0, 0); + l = new ButtonLayout(this, TQBoxLayout::LeftToRight, 0, 0); break; } - l->setResizeMode(QLayout::Minimum); + l->setResizeMode(TQLayout::Minimum); setMode(mode); l->insertStretch(-1); @@ -147,7 +147,7 @@ void ButtonBar::setButtonsPlace(Ideal::Place place) (*it)->setPlace(place); } -void ButtonBar::resizeEvent(QResizeEvent *ev) +void ButtonBar::resizeEvent(TQResizeEvent *ev) { int preferredDimension = 0; int actualDimension = 0; @@ -156,13 +156,13 @@ void ButtonBar::resizeEvent(QResizeEvent *ev) { case Ideal::Left: case Ideal::Right: - preferredDimension = l->QBoxLayout::minimumSize().height(); + preferredDimension = l->TQBoxLayout::minimumSize().height(); actualDimension = size().height(); oldDimension = ev->oldSize().height(); break; case Ideal::Top: case Ideal::Bottom: - preferredDimension = l->QBoxLayout::minimumSize().width(); + preferredDimension = l->TQBoxLayout::minimumSize().width(); actualDimension = size().width(); oldDimension = ev->oldSize().width(); break; @@ -175,7 +175,7 @@ void ButtonBar::resizeEvent(QResizeEvent *ev) else if (m_shrinked && actualDimension > oldDimension) deshrink(preferredDimension, actualDimension); - QWidget::resizeEvent(ev); + TQWidget::resizeEvent(ev); } void ButtonBar::shrink(int preferredDimension, int actualDimension) @@ -186,7 +186,7 @@ void ButtonBar::shrink(int preferredDimension, int actualDimension) m_shrinked = true; uint textLength = 0; - QValueList texts; + TQValueList texts; uint maxLength = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { @@ -203,7 +203,7 @@ void ButtonBar::shrink(int preferredDimension, int actualDimension) do { newMaxLength -= 1; newTextLength = 0; - for (QValueList::iterator it = texts.begin(); it != texts.end(); ++it) + for (TQValueList::iterator it = texts.begin(); it != texts.end(); ++it) { if (*it > newMaxLength) *it = newMaxLength; @@ -227,7 +227,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension) m_shrinked = true; uint textLength = 0; - QValueList texts; + TQValueList texts; uint maxLength = 0; for (ButtonList::const_iterator it = m_buttons.constBegin(); it != m_buttons.constEnd(); ++it) { @@ -247,7 +247,7 @@ void ButtonBar::deshrink(int preferredDimension, int actualDimension) do { newTextLength = 0; int i = 0; - for (QValueList::iterator it = texts.begin(); it != texts.end(); ++it, i++) + for (TQValueList::iterator it = texts.begin(); it != texts.end(); ++it, i++) { if (m_buttons[i]->text().contains("...")) (*it)++; diff --git a/src/newui/buttonbar.h b/src/newui/buttonbar.h index f137c925..ad1cf5b6 100644 --- a/src/newui/buttonbar.h +++ b/src/newui/buttonbar.h @@ -20,12 +20,12 @@ #ifndef IDEALBUTTONBAR_H #define IDEALBUTTONBAR_H -#include -#include +#include +#include #include "comdefs.h" -#include +#include namespace Ideal { @@ -39,7 +39,7 @@ class ButtonLayout: public QBoxLayout{ public: ButtonLayout(ButtonBar *parent, Direction d, int margin = 0, int spacing = -1, const char * name = 0); - virtual QSize minimumSize() const; + virtual TQSize minimumSize() const; private: ButtonBar *m_buttonBar; @@ -51,11 +51,11 @@ private: Looks like a toolbar but has another behaviour. It is suitable for placing on the left(right, bottom, top) corners of a window as a bar with slider. */ -class ButtonBar : public QWidget { +class ButtonBar : public TQWidget { Q_OBJECT public: ButtonBar(Place place, ButtonMode mode = IconsAndText, - QWidget *parent = 0, const char *name = 0); + TQWidget *parent = 0, const char *name = 0); virtual ~ButtonBar(); /**Adds a button to the bar.*/ @@ -87,7 +87,7 @@ public: Button *prevTo(Button *button); protected: - virtual void resizeEvent ( QResizeEvent *ev ); + virtual void resizeEvent ( TQResizeEvent *ev ); int originalDimension(); @@ -95,7 +95,7 @@ private: void fixDimensions(); void setButtonsPlace(Ideal::Place place); - typedef QValueList ButtonList; + typedef TQValueList ButtonList; ButtonList m_buttons; ButtonMode m_mode; diff --git a/src/newui/ddockwindow.cpp b/src/newui/ddockwindow.cpp index 1676d48e..5f11425d 100644 --- a/src/newui/ddockwindow.cpp +++ b/src/newui/ddockwindow.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "ddockwindow.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ #include "dmainwindow.h" DDockWindow::DDockWindow(DMainWindow *parent, Position position) - :QDockWindow(QDockWindow::InDock, parent), m_position(position), m_visible(false), + :TQDockWindow(TQDockWindow::InDock, parent), m_position(position), m_visible(false), m_mainWindow(parent), m_doNotCloseActiveWidget(false), m_toggledButton(0), m_lastContextMenuButton(0) { setMovingEnabled(false); @@ -51,20 +51,20 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position) case DDockWindow::Bottom: m_name = "BottomToolWindow"; place = Ideal::Bottom; - m_internalLayout = new QVBoxLayout(boxLayout(), 0); - m_internalLayout->setDirection(QBoxLayout::BottomToTop); + m_internalLayout = new TQVBoxLayout(boxLayout(), 0); + m_internalLayout->setDirection(TQBoxLayout::BottomToTop); break; case DDockWindow::Left: m_name = "LeftToolWindow"; place = Ideal::Left; - m_internalLayout = new QHBoxLayout(boxLayout(), 0); - m_internalLayout->setDirection(QBoxLayout::LeftToRight); + m_internalLayout = new TQHBoxLayout(boxLayout(), 0); + m_internalLayout->setDirection(TQBoxLayout::LeftToRight); break; case DDockWindow::Right: m_name = "RightToolWindow"; place = Ideal::Right; - m_internalLayout = new QHBoxLayout(boxLayout(), 0); - m_internalLayout->setDirection(QBoxLayout::RightToLeft); + m_internalLayout = new TQHBoxLayout(boxLayout(), 0); + m_internalLayout->setDirection(TQBoxLayout::RightToLeft); break; } @@ -82,12 +82,12 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position) m_bar = new Ideal::ButtonBar(place, buttonMode, this); m_internalLayout->addWidget(m_bar); - m_widgetStack = new QWidgetStack(this); + m_widgetStack = new TQWidgetStack(this); m_internalLayout->addWidget(m_widgetStack); - m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, this, SLOT(moveToDockLeft()), this ); - m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, this, SLOT(moveToDockRight()), this ); - m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, this, SLOT(moveToDockBottom()), this ); + m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, this, TQT_SLOT(moveToDockLeft()), this ); + m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, this, TQT_SLOT(moveToDockRight()), this ); + m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, this, TQT_SLOT(moveToDockBottom()), this ); setVisible(m_visible); @@ -104,7 +104,7 @@ void DDockWindow::setVisible(bool v) { //write dock width to the config file KConfig *config = kapp->config(); - QString group = QString("%1").arg(m_name); + TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (m_visible) @@ -148,7 +148,7 @@ void DDockWindow::loadSettings() void DDockWindow::saveSettings() { KConfig *config = kapp->config(); - QString group = QString("%1").arg(m_name); + TQString group = TQString("%1").arg(m_name); int invisibleWidth = 0; config->setGroup(group); if (config->hasKey("ViewWidth")) @@ -164,22 +164,22 @@ void DDockWindow::saveSettings() config->writeEntry("ViewWidth", invisibleWidth); } -QWidget *DDockWindow::currentWidget() const +TQWidget *DDockWindow::currentWidget() const { return m_widgetStack->visibleWidget(); } -void DDockWindow::addWidget(const QString &title, QWidget *widget, bool skipActivation) +void DDockWindow::addWidget(const TQString &title, TQWidget *widget, bool skipActivation) { kdDebug(9000) << k_funcinfo << endl; - QPixmap *pm = const_cast(widget->icon()); + TQPixmap *pm = const_cast(widget->icon()); Ideal::Button *button; if (pm != 0) { //force 16pt for now if (pm->height() > 16) { - QImage img = pm->convertToImage(); + TQImage img = pm->convertToImage(); img = img.smoothScale(16, 16); pm->convertFromImage(img); } @@ -192,15 +192,15 @@ void DDockWindow::addWidget(const QString &title, QWidget *widget, bool skipActi m_bar->addButton(button); m_widgetStack->addWidget(widget); - connect(button, SIGNAL(clicked()), this, SLOT(selectWidget())); - connect(button, SIGNAL(contextMenu(QPopupMenu*)), this, SLOT(contextMenu(QPopupMenu*)) ); + connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectWidget())); + connect(button, TQT_SIGNAL(contextMenu(TQPopupMenu*)), this, TQT_SLOT(contextMenu(TQPopupMenu*)) ); if (!skipActivation) { //if the widget was selected last time the dock is deleted //we need to show it KConfig *config = kapp->config(); - QString group = QString("%1").arg(m_name); + TQString group = TQString("%1").arg(m_name); config->setGroup(group); if (config->readEntry("ViewLastWidget") == title) { @@ -211,7 +211,7 @@ void DDockWindow::addWidget(const QString &title, QWidget *widget, bool skipActi } } -void DDockWindow::raiseWidget(QWidget *widget) +void DDockWindow::raiseWidget(TQWidget *widget) { kdDebug(9000) << k_funcinfo << endl; @@ -225,7 +225,7 @@ void DDockWindow::raiseWidget(QWidget *widget) } } -void DDockWindow::lowerWidget(QWidget * widget) +void DDockWindow::lowerWidget(TQWidget * widget) { kdDebug(9000) << k_funcinfo << endl; @@ -239,7 +239,7 @@ void DDockWindow::lowerWidget(QWidget * widget) } } -void DDockWindow::removeWidget(QWidget *widget) +void DDockWindow::removeWidget(TQWidget *widget) { kdDebug(9000) << k_funcinfo << endl; if (m_widgetStack->id(widget) == -1) @@ -297,7 +297,7 @@ void DDockWindow::selectWidget() selectWidget((Ideal::Button*)sender()); } -void DDockWindow::hideWidget(QWidget *widget) +void DDockWindow::hideWidget(TQWidget *widget) { Ideal::Button *button = m_buttons[widget]; if (button != 0) @@ -310,7 +310,7 @@ void DDockWindow::hideWidget(QWidget *widget) setVisible(false); } -void DDockWindow::showWidget(QWidget *widget) +void DDockWindow::showWidget(TQWidget *widget) { Ideal::Button *button = m_buttons[widget]; if (button != 0) @@ -322,7 +322,7 @@ void DDockWindow::setMovingEnabled(bool) { //some operations on KMainWindow cause moving to be enabled //but we always don't want DDockWindow instances to be movable - QDockWindow::setMovingEnabled(false); + TQDockWindow::setMovingEnabled(false); } void DDockWindow::selectLastWidget() @@ -338,16 +338,16 @@ bool DDockWindow::isActive() { if (m_toggledButton) { - QWidget *w = qApp->focusWidget(); + TQWidget *w = qApp->focusWidget(); if (!w) return false; - QWidget *toolWidget = m_widgets[m_toggledButton]; + TQWidget *toolWidget = m_widgets[m_toggledButton]; if (toolWidget == w) return true; else { do { - w = (QWidget*)w->parent(); + w = (TQWidget*)w->parent(); if (w && (w == toolWidget)) return true; } while (w); } @@ -373,9 +373,9 @@ void DDockWindow::selectPrevWidget() b->animateClick(); } -void DDockWindow::contextMenu(QPopupMenu * menu) +void DDockWindow::contextMenu(TQPopupMenu * menu) { - m_lastContextMenuButton = static_cast( const_cast( sender() ) ); + m_lastContextMenuButton = static_cast( const_cast( sender() ) ); menu->insertSeparator(); diff --git a/src/newui/ddockwindow.h b/src/newui/ddockwindow.h index 06cf3eb1..f9abc93f 100644 --- a/src/newui/ddockwindow.h +++ b/src/newui/ddockwindow.h @@ -20,8 +20,8 @@ #ifndef DDOCKWINDOW_H #define DDOCKWINDOW_H -#include -#include +#include +#include class QBoxLayout; class QToolButton; @@ -38,7 +38,7 @@ namespace Ideal { class ButtonBar; } -class DDockWindow : public QDockWindow { +class DDockWindow : public TQDockWindow { Q_OBJECT public: enum Position { Bottom, Left, Right }; @@ -50,16 +50,16 @@ public: bool visible() const { return m_visible; } Position position() const { return m_position; } - virtual void addWidget(const QString &title, QWidget *widget, bool skipActivation = false); - virtual void raiseWidget(QWidget *widget); - virtual void lowerWidget(QWidget *widget); + virtual void addWidget(const TQString &title, TQWidget *widget, bool skipActivation = false); + virtual void raiseWidget(TQWidget *widget); + virtual void lowerWidget(TQWidget *widget); /**Removes the widget from dock. Does not delete it.*/ - virtual void removeWidget(QWidget *widget); + virtual void removeWidget(TQWidget *widget); - virtual void hideWidget(QWidget *widget); - virtual void showWidget(QWidget *widget); + virtual void hideWidget(TQWidget *widget); + virtual void showWidget(TQWidget *widget); - virtual QWidget *currentWidget() const; + virtual TQWidget *currentWidget() const; virtual void setMovingEnabled(bool b); @@ -79,7 +79,7 @@ signals: private slots: void selectWidget(); void selectWidget(Ideal::Button *button); - void contextMenu(QPopupMenu*); + void contextMenu(TQPopupMenu*); void moveToDockLeft(); void moveToDockRight(); void moveToDockBottom(); @@ -89,21 +89,21 @@ protected: virtual void loadSettings(); Ideal::ButtonBar *m_bar; - QWidgetStack *m_widgetStack; + TQWidgetStack *m_widgetStack; - QMap m_widgets; - QMap m_buttons; + TQMap m_widgets; + TQMap m_buttons; private: Position m_position; bool m_visible; - QString m_name; + TQString m_name; DMainWindow *m_mainWindow; bool m_doNotCloseActiveWidget; Ideal::Button *m_toggledButton; Ideal::Button *m_lastContextMenuButton; - QBoxLayout *m_internalLayout; + TQBoxLayout *m_internalLayout; KAction * m_moveToDockLeft; diff --git a/src/newui/dmainwindow.cpp b/src/newui/dmainwindow.cpp index 9d3801e3..6e6a63d4 100644 --- a/src/newui/dmainwindow.cpp +++ b/src/newui/dmainwindow.cpp @@ -24,12 +24,12 @@ #include #include -#include +#include #include "dtabwidget.h" #include "docksplitter.h" -DMainWindow::DMainWindow(QWidget *parent, const char *name) +DMainWindow::DMainWindow(TQWidget *parent, const char *name) :KParts::MainWindow(parent, name), m_firstRemoved(false), m_currentWidget(0) { loadSettings(); @@ -57,7 +57,7 @@ void DMainWindow::saveSettings() DMainWindow::~DMainWindow() { -/* for (QValueList::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it) +/* for (TQValueList::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it) removeWidget(*it);*/ } @@ -81,7 +81,7 @@ void DMainWindow::createToolWindows() moveDockWindow(m_rightDock, Qt::DockRight); } -void DMainWindow::addWidget(QWidget *widget, const QString &title) +void DMainWindow::addWidget(TQWidget *widget, const TQString &title) { // invalidateActiveTabWidget(); if (m_firstRemoved && m_activeTabWidget == m_tabs.first()) @@ -93,17 +93,17 @@ void DMainWindow::addWidget(QWidget *widget, const QString &title) addWidget(m_activeTabWidget, widget, title); } -void DMainWindow::addWidget(DTabWidget *tab, QWidget *widget, const QString &title) +void DMainWindow::addWidget(DTabWidget *tab, TQWidget *widget, const TQString &title) { - static QPixmap emptyPixmap; + static TQPixmap emptyPixmap; int idx = -1; if (m_openTabAfterCurrent && (tab->count() > 0)) idx = tab->currentPageIndex() + 1; if (m_showIconsOnTabs) { - const QPixmap *pixmap = widget->icon(); - const QIconSet &icons = (pixmap && (pixmap->size().height() <= 16)) ? *(pixmap) : SmallIcon("kdevelop"); + const TQPixmap *pixmap = widget->icon(); + const TQIconSet &icons = (pixmap && (pixmap->size().height() <= 16)) ? *(pixmap) : SmallIcon("kdevelop"); tab->insertTab(widget, icons, title, idx); } else @@ -114,7 +114,7 @@ void DMainWindow::addWidget(DTabWidget *tab, QWidget *widget, const QString &tit tab->showPage(widget); } -void DMainWindow::removeWidget(QWidget *widget) +void DMainWindow::removeWidget(TQWidget *widget) { if (!m_widgets.contains(widget)) return; //not a widget in main window @@ -125,7 +125,7 @@ void DMainWindow::removeWidget(QWidget *widget) if (tab->indexOf(widget) >= 0) { tab->removePage(widget); - widget->reparent(0,QPoint(0,0),false); + widget->reparent(0,TQPoint(0,0),false); if (tab->count() == 0) { if (tab->closeButton()) @@ -161,8 +161,8 @@ void DMainWindow::removeWidget(QWidget *widget) if (m_activeTabWidget && m_activeTabWidget->currentPage()) { //a hack to please multibuffer and actually switch the active part - QFocusEvent ev(QEvent::FocusIn); - QApplication::sendEvent(m_activeTabWidget->currentPage(), &ev); + TQFocusEvent ev(TQEvent::FocusIn); + TQApplication::sendEvent(m_activeTabWidget->currentPage(), &ev); } } @@ -184,7 +184,7 @@ DTabWidget *DMainWindow::splitVertical() void DMainWindow::invalidateActiveTabWidget() { -/* QWidget *focused = m_central->focusWidget(); +/* TQWidget *focused = m_central->focusWidget(); kdDebug(9000) << "invalidate: " << focused << endl; if (focused == 0) return; @@ -208,33 +208,33 @@ DTabWidget *DMainWindow::createTab() DTabWidget *tab = new DTabWidget(m_central); m_tabs.append(tab); if (tab->closeButton()) - connect(tab->closeButton(), SIGNAL(clicked()), this, SLOT(closeTab())); - connect(tab, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeTab(QWidget*))); - connect(tab, SIGNAL(contextMenu(QWidget*,const QPoint &)), - this, SLOT(tabContext(QWidget*,const QPoint &))); + connect(tab->closeButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(closeTab())); + connect(tab, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*))); + connect(tab, TQT_SIGNAL(contextMenu(TQWidget*,const TQPoint &)), + this, TQT_SLOT(tabContext(TQWidget*,const TQPoint &))); return tab; } -bool DMainWindow::eventFilter(QObject *obj, QEvent *ev) +bool DMainWindow::eventFilter(TQObject *obj, TQEvent *ev) { - QWidget *w = (QWidget*)obj; + TQWidget *w = (TQWidget*)obj; if (!m_widgets.contains(w)) return KParts::MainWindow::eventFilter(obj, ev); - if ((m_currentWidget != w) && (ev->type() == QEvent::FocusIn)) + if ((m_currentWidget != w) && (ev->type() == TQEvent::FocusIn)) { m_currentWidget = w; emit widgetChanged(w); } - else if (ev->type() == QEvent::IconChange) + else if (ev->type() == TQEvent::IconChange) { if (m_widgetTabs.contains(w)) { DTabWidget *tab = m_widgetTabs[w]; - tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : QPixmap()); + tab->setTabIconSet(w, w->icon() ? (*(w->icon())) : TQPixmap()); } } - else if (ev->type() == QEvent::CaptionChange) + else if (ev->type() == TQEvent::CaptionChange) { kdDebug(9000) << "caption change" << endl; DTabWidget *tab = m_widgetTabs[w]; @@ -249,17 +249,17 @@ void DMainWindow::closeTab() //nothing to do here, should be reimplemented } -void DMainWindow::tabContext(QWidget *, const QPoint &) +void DMainWindow::tabContext(TQWidget *, const TQPoint &) { //nothing to do here, should be reimplemented } -void DMainWindow::closeTab(QWidget *) +void DMainWindow::closeTab(TQWidget *) { //nothing to do here, should be reimplemented } -void DMainWindow::moveWidget(DDockWindow::Position position, QWidget * view, const QString & title) +void DMainWindow::moveWidget(DDockWindow::Position position, TQWidget * view, const TQString & title) { if (m_docks.contains(view)) { @@ -270,32 +270,32 @@ void DMainWindow::moveWidget(DDockWindow::Position position, QWidget * view, con } } -void DMainWindow::addDockWidget(DDockWindow::Position position, QWidget *view, const QString &title) +void DMainWindow::addDockWidget(DDockWindow::Position position, TQWidget *view, const TQString &title) { toolWindow(position)->addWidget(title, view); m_docks[view] = position; - connect(view, SIGNAL(destroyed()), this, SLOT(widgetDestroyed())); + connect(view, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed())); } -void DMainWindow::removeDockWidget(QWidget *view) +void DMainWindow::removeDockWidget(TQWidget *view) { toolWindow(m_docks[view])->removeWidget(view); m_docks.remove(view); } -bool DMainWindow::hasDockWidget(QWidget *view) +bool DMainWindow::hasDockWidget(TQWidget *view) { return m_docks.contains(view); } -DDockWindow::Position DMainWindow::dockWidgetPosition(QWidget *view) +DDockWindow::Position DMainWindow::dockWidgetPosition(TQWidget *view) { return m_docks[view]; } void DMainWindow::widgetDestroyed() { - QWidget *w = static_cast(const_cast(sender())); + TQWidget *w = static_cast(const_cast(sender())); if (m_docks.contains(w)) { diff --git a/src/newui/dmainwindow.h b/src/newui/dmainwindow.h index 7a036665..ae757678 100644 --- a/src/newui/dmainwindow.h +++ b/src/newui/dmainwindow.h @@ -34,7 +34,7 @@ namespace Ideal { class DMainWindow: public KParts::MainWindow { Q_OBJECT public: - DMainWindow(QWidget *parent = 0, const char *name = 0); + DMainWindow(TQWidget *parent = 0, const char *name = 0); virtual ~DMainWindow(); /**@return The tool window in given @p position.*/ @@ -42,22 +42,22 @@ public: /**Adds a tabbed widget into the active (focused) tab widget. If @p widget is null then only tab is created.*/ - virtual void addWidget(QWidget *widget, const QString &title); - virtual void addWidget(DTabWidget *tab, QWidget *widget, const QString &title); + virtual void addWidget(TQWidget *widget, const TQString &title); + virtual void addWidget(DTabWidget *tab, TQWidget *widget, const TQString &title); /**Removes widget. Does not delete it.*/ - virtual void removeWidget(QWidget *widget); + virtual void removeWidget(TQWidget *widget); /**Moves a widget from an existing dockposition to a new position**/ - virtual void moveWidget(DDockWindow::Position newPosition, QWidget *widget, const QString & title); + virtual void moveWidget(DDockWindow::Position newPosition, TQWidget *widget, const TQString & title); /**Adds a dock widget into given position.*/ - virtual void addDockWidget(DDockWindow::Position position, QWidget *view, const QString &title); + virtual void addDockWidget(DDockWindow::Position position, TQWidget *view, const TQString &title); /**Removes a dock widget.*/ - virtual void removeDockWidget(QWidget *view); + virtual void removeDockWidget(TQWidget *view); virtual void saveSettings(); - bool hasDockWidget(QWidget *view); - DDockWindow::Position dockWidgetPosition(QWidget *view); + bool hasDockWidget(TQWidget *view); + DDockWindow::Position dockWidgetPosition(TQWidget *view); public slots: DTabWidget *splitHorizontal(); @@ -69,17 +69,17 @@ protected slots: virtual void closeTab(); /**This does nothing. Reimplement in subclass to close the tab when hover close button is pressed.*/ - virtual void closeTab(QWidget*); + virtual void closeTab(TQWidget*); /**This does nothing. Reimplement in subclass to show tab context menu.*/ - virtual void tabContext(QWidget*,const QPoint &); + virtual void tabContext(TQWidget*,const TQPoint &); void widgetDestroyed(); signals: - void widgetChanged(QWidget *); + void widgetChanged(TQWidget *); protected: - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(TQObject *obj, TQEvent *ev); virtual void loadSettings(); @@ -90,20 +90,20 @@ protected: DDockWindow *m_rightDock; DDockWindow *m_bottomDock; - QMap m_docks; + TQMap m_docks; Ideal::DockSplitter *m_central; DTabWidget *m_activeTabWidget; - QValueList m_tabs; + TQValueList m_tabs; bool m_openTabAfterCurrent; bool m_showIconsOnTabs; bool m_firstRemoved; - QValueList m_widgets; - QMap m_widgetTabs; - QWidget *m_currentWidget; + TQValueList m_widgets; + TQMap m_widgetTabs; + TQWidget *m_currentWidget; private slots: void invalidateActiveTabWidget(); diff --git a/src/newui/docksplitter.cpp b/src/newui/docksplitter.cpp index eae4a3e3..0dc55453 100644 --- a/src/newui/docksplitter.cpp +++ b/src/newui/docksplitter.cpp @@ -23,8 +23,8 @@ namespace Ideal { -DockSplitter::DockSplitter(Orientation orientation, QWidget *parent, const char *name) - :QSplitter(parent, name), m_orientation(orientation) +DockSplitter::DockSplitter(Orientation orientation, TQWidget *parent, const char *name) + :TQSplitter(parent, name), m_orientation(orientation) { switch (m_orientation) { @@ -43,11 +43,11 @@ DockSplitter::~DockSplitter() { } -void DockSplitter::addDock(uint row, uint col, QWidget *dock) +void DockSplitter::addDock(uint row, uint col, TQWidget *dock) { if (m_docks.count() <= row) for (uint i = m_docks.count(); i <= row ; ++i) - m_docks.append(QValueList()); + m_docks.append(TQValueList()); if (m_docks[row].count() <= col) { @@ -62,9 +62,9 @@ void DockSplitter::addDock(uint row, uint col, QWidget *dock) if (m_splitters.count() <= row) createSplitters(row); - QSplitter *splitter = m_splitters[row]; + TQSplitter *splitter = m_splitters[row]; - dock->reparent(splitter, QPoint(0,0), true); + dock->reparent(splitter, TQPoint(0,0), true); if (col < m_docks[row].count()-1) shiftWidgets(splitter, row, col+1); } @@ -74,10 +74,10 @@ void DockSplitter::appendSplitter() switch (m_orientation) { case Horizontal: - m_splitters.append(new QSplitter(Horizontal, this)); + m_splitters.append(new TQSplitter(Horizontal, this)); break; case Vertical: - m_splitters.append(new QSplitter(Vertical, this)); + m_splitters.append(new TQSplitter(Vertical, this)); break; } m_splitters[m_splitters.size()-1]->setOpaqueResize(true); @@ -99,7 +99,7 @@ void DockSplitter::removeDock(uint row, uint col, bool alsoDelete) if ((row >= m_docks.count()) || (col >= m_docks[row].count())) return; - QWidget *w = m_docks[row][col]; + TQWidget *w = m_docks[row][col]; m_docks[row].remove(m_docks[row].at(col)); if (alsoDelete) @@ -109,7 +109,7 @@ void DockSplitter::removeDock(uint row, uint col, bool alsoDelete) } else { - w->reparent(0, QPoint(0,0), false); + w->reparent(0, TQPoint(0,0), false); w->hide(); } @@ -134,7 +134,7 @@ bool DockSplitter::isRowEmpty(int row) return true; } -void DockSplitter::shiftWidgets(QSplitter *splitter, uint row, uint fromCol) +void DockSplitter::shiftWidgets(TQSplitter *splitter, uint row, uint fromCol) { kdDebug(9000) << "shiftWidgets: row=" << row << " from col=" << fromCol << endl; kdDebug(9000) << "row size is: " << m_docks[row].count() << endl; @@ -161,7 +161,7 @@ int DockSplitter::numCols(int row) const return 0; } -QPair DockSplitter::indexOf(QWidget *dock) +QPair DockSplitter::indexOf(TQWidget *dock) { for (uint i = 0; i < m_docks.count(); ++i) for (uint j = 0; j < m_docks[i].count(); ++j) diff --git a/src/newui/docksplitter.h b/src/newui/docksplitter.h index ce4a2e8e..c25dd495 100644 --- a/src/newui/docksplitter.h +++ b/src/newui/docksplitter.h @@ -20,8 +20,8 @@ #ifndef IDEALDOCKSPLITTER_H #define IDEALDOCKSPLITTER_H -#include -#include +#include +#include namespace Ideal { @@ -30,16 +30,16 @@ class DockWidget; /** @short Splitter for docks */ -class DockSplitter: public QSplitter { +class DockSplitter: public TQSplitter { Q_OBJECT public: - DockSplitter(Orientation orientation, QWidget *parent = 0, const char *name = 0); + DockSplitter(Orientation orientation, TQWidget *parent = 0, const char *name = 0); ~DockSplitter(); - void addDock(uint row, uint col, QWidget *dock); + void addDock(uint row, uint col, TQWidget *dock); void removeDock(uint row, uint col, bool alsoDelete = false); - QPair indexOf(QWidget *dock); + QPair indexOf(TQWidget *dock); int numRows() const; int numCols(int row) const; @@ -47,14 +47,14 @@ public: protected: void appendSplitter(); void createSplitters(uint index); - void shiftWidgets(QSplitter *splitter, uint row, uint fromCol); + void shiftWidgets(TQSplitter *splitter, uint row, uint fromCol); bool isRowEmpty(int row); private: Orientation m_orientation; - QValueList m_splitters; - QValueList > m_docks; + TQValueList m_splitters; + TQValueList > m_docks; }; } diff --git a/src/newui/dtabwidget.cpp b/src/newui/dtabwidget.cpp index b9bf790a..db2e4c4e 100644 --- a/src/newui/dtabwidget.cpp +++ b/src/newui/dtabwidget.cpp @@ -19,14 +19,14 @@ ***************************************************************************/ #include "dtabwidget.h" -#include -#include +#include +#include #include #include #include -DTabWidget::DTabWidget(QWidget *parent, const char *name) +DTabWidget::DTabWidget(TQWidget *parent, const char *name) :KTabWidget(parent, name), m_closeButton(0) { setFocusPolicy(NoFocus); @@ -37,7 +37,7 @@ DTabWidget::DTabWidget(QWidget *parent, const char *name) if (!m_tabBarShown) tabBar()->hide(); else { - m_closeButton = new QToolButton(this); + m_closeButton = new TQToolButton(this); m_closeButton->setIconSet(SmallIcon("tab_remove")); m_closeButton->adjustSize(); m_closeButton->hide(); @@ -49,8 +49,8 @@ DTabWidget::DTabWidget(QWidget *parent, const char *name) setTabReorderingEnabled(true); } - connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(setFocus(QWidget*))); -// connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(updateHistory(QWidget*))); + connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(setFocus(TQWidget*))); +// connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(updateHistory(TQWidget*))); } void DTabWidget::loadSettings() @@ -69,18 +69,18 @@ void DTabWidget::saveSettings() { } -QToolButton *DTabWidget::closeButton() const +TQToolButton *DTabWidget::closeButton() const { return m_closeButton; } -void DTabWidget::setFocus(QWidget *w) +void DTabWidget::setFocus(TQWidget *w) { if (w) w->setFocus(); } -void DTabWidget::insertTab(QWidget *child, const QString &label, int index) +void DTabWidget::insertTab(TQWidget *child, const TQString &label, int index) { if (m_closeButton && m_closeButtonShown) m_closeButton->show(); @@ -88,8 +88,8 @@ void DTabWidget::insertTab(QWidget *child, const QString &label, int index) if (index != -1) tabBar()->repaint(); } -void DTabWidget::insertTab(QWidget *child, const QIconSet &iconset, - const QString &label, int index) +void DTabWidget::insertTab(TQWidget *child, const TQIconSet &iconset, + const TQString &label, int index) { if (m_closeButton && m_closeButtonShown) m_closeButton->show(); @@ -97,7 +97,7 @@ void DTabWidget::insertTab(QWidget *child, const QIconSet &iconset, if (index != -1) tabBar()->repaint(); } -/*void DTabWidget::updateHistory(QWidget *w) +/*void DTabWidget::updateHistory(TQWidget *w) { if (m_history.top() != w) m_history.push(w); diff --git a/src/newui/dtabwidget.h b/src/newui/dtabwidget.h index 9640d2cd..d3e5d9da 100644 --- a/src/newui/dtabwidget.h +++ b/src/newui/dtabwidget.h @@ -27,31 +27,31 @@ class QToolButton; class DTabWidget: public KTabWidget { Q_OBJECT public: - DTabWidget(QWidget *parent=0, const char *name=0); + DTabWidget(TQWidget *parent=0, const char *name=0); /**@return The close button at the top right corner. May be 0 if the configuration do not allow close buttons or the tabbar.*/ - QToolButton *closeButton() const; + TQToolButton *closeButton() const; - virtual void insertTab(QWidget *child, const QString &label, int index = -1 ); - virtual void insertTab(QWidget *child, const QIconSet &iconset, - const QString &label, int index = -1); + virtual void insertTab(TQWidget *child, const TQString &label, int index = -1 ); + virtual void insertTab(TQWidget *child, const TQIconSet &iconset, + const TQString &label, int index = -1); protected: virtual void loadSettings(); virtual void saveSettings(); private slots: - void setFocus(QWidget *w); -// void updateHistory(QWidget *w); + void setFocus(TQWidget *w); +// void updateHistory(TQWidget *w); private: bool m_tabBarShown; bool m_closeOnHover; bool m_closeButtonShown; - QToolButton *m_closeButton; -// QValueStack *m_history; + TQToolButton *m_closeButton; +// TQValueStack *m_history; }; -- cgit v1.2.1