diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kwin/lib | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/lib')
-rw-r--r-- | kwin/lib/kcommondecoration.cpp | 148 | ||||
-rw-r--r-- | kwin/lib/kcommondecoration.h | 52 | ||||
-rw-r--r-- | kwin/lib/kdecoration.cpp | 48 | ||||
-rw-r--r-- | kwin/lib/kdecoration.h | 62 | ||||
-rw-r--r-- | kwin/lib/kdecoration_p.cpp | 36 | ||||
-rw-r--r-- | kwin/lib/kdecoration_p.h | 38 | ||||
-rw-r--r-- | kwin/lib/kdecoration_plugins_p.cpp | 22 | ||||
-rw-r--r-- | kwin/lib/kdecoration_plugins_p.h | 16 | ||||
-rw-r--r-- | kwin/lib/kdecorationfactory.cpp | 6 | ||||
-rw-r--r-- | kwin/lib/kdecorationfactory.h | 4 |
10 files changed, 216 insertions, 216 deletions
diff --git a/kwin/lib/kcommondecoration.cpp b/kwin/lib/kcommondecoration.cpp index 58a95b599..32a297683 100644 --- a/kwin/lib/kcommondecoration.cpp +++ b/kwin/lib/kcommondecoration.cpp @@ -22,12 +22,12 @@ DEALINGS IN THE SOFTWARE. */ -#include <qapplication.h> -#include <qcursor.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqwidget.h> #include <kdebug.h> @@ -118,8 +118,8 @@ void KCommonDecoration::init() resetLayout(); - connect(this, SIGNAL(keepAboveChanged(bool) ), SLOT(keepAboveChange(bool) ) ); - connect(this, SIGNAL(keepBelowChanged(bool) ), SLOT(keepBelowChange(bool) ) ); + connect(this, TQT_SIGNAL(keepAboveChanged(bool) ), TQT_SLOT(keepAboveChange(bool) ) ); + connect(this, TQT_SIGNAL(keepBelowChanged(bool) ), TQT_SLOT(keepBelowChange(bool) ) ); updateCaption(); } @@ -132,9 +132,9 @@ void KCommonDecoration::reset( unsigned long changed ) } } -QRegion KCommonDecoration::cornerShape(WindowCorner) +TQRegion KCommonDecoration::cornerShape(WindowCorner) { - return QRegion(); + return TQRegion(); } void KCommonDecoration::updateCaption() @@ -157,7 +157,7 @@ void KCommonDecoration::borders( int& left, int& right, int& top, int& bottom ) void KCommonDecoration::updateLayout() const { - QRect r = widget()->rect(); + TQRect r = widget()->rect(); int r_x, r_y, r_x2, r_y2; r.coords(&r_x, &r_y, &r_x2, &r_y2); @@ -182,7 +182,7 @@ void KCommonDecoration::updateLayout() const // resize buttons... for (int n=0; n<NumButtons; n++) { if (m_button[n]) { - QSize newSize = QSize(layoutMetric(LM_ButtonWidth, true, m_button[n]), + TQSize newSize = TQSize(layoutMetric(LM_ButtonWidth, true, m_button[n]), layoutMetric(LM_ButtonHeight, true, m_button[n]) ); if (newSize != m_button[n]->size() ) m_button[n]->setSize(newSize); @@ -262,7 +262,7 @@ void KCommonDecoration::resetLayout() // shown instead of the window contents in decoration previews if(isPreview() ) { - m_previewWidget = new QLabel(i18n("%1 is the name of window decoration style", "<center><b>%1 preview</b></center>").arg(visibleName() ), widget()); + m_previewWidget = new TQLabel(i18n("%1 is the name of window decoration style", "<center><b>%1 preview</b></center>").arg(visibleName() ), widget()); m_previewWidget->show(); } @@ -316,7 +316,7 @@ int KCommonDecoration::buttonContainerWidth(const ButtonContainer &btnContainer, return w; } -void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& s, bool isLeft) +void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString& s, bool isLeft) { if (s.length() > 0) { for (unsigned n=0; n < s.length(); n++) { @@ -328,8 +328,8 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& if (!btn) break; btn->setTipText(i18n("Menu") ); btn->setRealizeButtons(LeftButton|RightButton); - connect(btn, SIGNAL(pressed()), SLOT(menuButtonPressed())); - connect(btn, SIGNAL(released()), this, SLOT(menuButtonReleased())); + connect(btn, TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed())); + connect(btn, TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased())); m_button[MenuButton] = btn; } @@ -342,7 +342,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn->setTipText(oad?i18n("Not on all desktops"):i18n("On all desktops") ); btn->setToggleButton(true); btn->setOn( oad ); - connect(btn, SIGNAL(clicked()), SLOT(toggleOnAllDesktops())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(toggleOnAllDesktops())); m_button[OnAllDesktopsButton] = btn; } @@ -352,7 +352,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn = createButton(HelpButton); if (!btn) break; btn->setTipText(i18n("Help") ); - connect(btn, SIGNAL(clicked()), SLOT(showContextHelp())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp())); m_button[HelpButton] = btn; } @@ -362,7 +362,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn = createButton(MinButton); if (!btn) break; btn->setTipText(i18n("Minimize") ); - connect(btn, SIGNAL(clicked()), SLOT(minimize())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(minimize())); m_button[MinButton] = btn; } @@ -376,7 +376,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn->setTipText(max?i18n("Restore"):i18n("Maximize") ); btn->setToggleButton(true); btn->setOn( max ); - connect(btn, SIGNAL(clicked()), SLOT(slotMaximize())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMaximize())); m_button[MaxButton] = btn; } @@ -386,7 +386,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn = createButton(CloseButton); if (!btn) break; btn->setTipText(i18n("Close") ); - connect(btn, SIGNAL(clicked()), SLOT(closeWindow())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(closeWindow())); m_button[CloseButton] = btn; } @@ -399,7 +399,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn->setTipText(above?i18n("Do not keep above others"):i18n("Keep above others") ); btn->setToggleButton(true); btn->setOn( above ); - connect(btn, SIGNAL(clicked()), SLOT(slotKeepAbove())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepAbove())); m_button[AboveButton] = btn; } @@ -412,7 +412,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn->setTipText(below?i18n("Do not keep below others"):i18n("Keep below others") ); btn->setToggleButton(true); btn->setOn( below ); - connect(btn, SIGNAL(clicked()), SLOT(slotKeepBelow())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBelow())); m_button[BelowButton] = btn; } @@ -425,7 +425,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& btn->setTipText(shaded?i18n("Unshade"):i18n("Shade") ); btn->setToggleButton(true); btn->setOn( shaded ); - connect(btn, SIGNAL(clicked()), SLOT(slotShade())); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotShade())); m_button[ShadeButton] = btn; } @@ -437,7 +437,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const QString& if (btn) { btn->setLeft(isLeft); - btn->setSize(QSize(layoutMetric(LM_ButtonWidth, true, btn),layoutMetric(LM_ButtonHeight, true, btn)) ); + btn->setSize(TQSize(layoutMetric(LM_ButtonWidth, true, btn),layoutMetric(LM_ButtonHeight, true, btn)) ); btn->show(); btnContainer.append(btn); } @@ -492,17 +492,17 @@ void KCommonDecoration::show() widget()->show(); } -void KCommonDecoration::resize( const QSize& s ) +void KCommonDecoration::resize( const TQSize& s ) { widget()->resize( s ); } -QSize KCommonDecoration::minimumSize() const +TQSize KCommonDecoration::minimumSize() const { const int minWidth = QMAX(layoutMetric(LM_TitleEdgeLeft), layoutMetric(LM_BorderLeft)) +QMAX(layoutMetric(LM_TitleEdgeRight), layoutMetric(LM_BorderRight)) +layoutMetric(LM_TitleBorderLeft)+layoutMetric(LM_TitleBorderRight); - return QSize(minWidth, + return TQSize(minWidth, layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight) +layoutMetric(LM_TitleEdgeBottom) +layoutMetric(LM_BorderBottom) ); @@ -623,19 +623,19 @@ void KCommonDecoration::slotKeepBelow() void KCommonDecoration::menuButtonPressed() { - static QTime* t = NULL; + static TQTime* t = NULL; static KCommonDecoration* lastClient = NULL; if (t == NULL) t = new QTime; - bool dbl = (lastClient==this && t->elapsed() <= QApplication::doubleClickInterval()); + bool dbl = (lastClient==this && t->elapsed() <= TQApplication::doubleClickInterval()); lastClient = this; t->start(); if (!dbl || !decorationBehaviour(DB_MenuClose) ) { - QRect menuRect = m_button[MenuButton]->rect(); - QPoint menutop = m_button[MenuButton]->mapToGlobal(menuRect.topLeft()); - QPoint menubottom = m_button[MenuButton]->mapToGlobal(menuRect.bottomRight())+QPoint(0,2); + TQRect menuRect = m_button[MenuButton]->rect(); + TQPoint menutop = m_button[MenuButton]->mapToGlobal(menuRect.topLeft()); + TQPoint menubottom = m_button[MenuButton]->mapToGlobal(menuRect.bottomRight())+TQPoint(0,2); KDecorationFactory* f = factory(); - showWindowMenu(QRect(menutop, menubottom)); + showWindowMenu(TQRect(menutop, menubottom)); if( !f->exists( this )) // 'this' was deleted return; m_button[MenuButton]->setDown(false); @@ -650,7 +650,7 @@ void KCommonDecoration::menuButtonReleased() closeWindow(); } -void KCommonDecoration::resizeEvent(QResizeEvent */*e*/) +void KCommonDecoration::resizeEvent(TQResizeEvent */*e*/) { if (decorationBehaviour(DB_ButtonHide) ) calcHiddenButtons(); @@ -663,9 +663,9 @@ void KCommonDecoration::resizeEvent(QResizeEvent */*e*/) // widget()->update(); } -void KCommonDecoration::moveWidget(int x, int y, QWidget *widget) const +void KCommonDecoration::moveWidget(int x, int y, TQWidget *widget) const { - QPoint p = widget->pos(); + TQPoint p = widget->pos(); int oldX = p.y(); int oldY = p.x(); @@ -673,9 +673,9 @@ void KCommonDecoration::moveWidget(int x, int y, QWidget *widget) const widget->move(x,y); } -void KCommonDecoration::resizeWidget(int w, int h, QWidget *widget) const +void KCommonDecoration::resizeWidget(int w, int h, TQWidget *widget) const { - QSize s = widget->size(); + TQSize s = widget->size(); int oldW = s.width(); int oldH = s.height(); @@ -683,7 +683,7 @@ void KCommonDecoration::resizeWidget(int w, int h, QWidget *widget) const widget->resize(w,h); } -void KCommonDecoration::mouseDoubleClickEvent(QMouseEvent *e) +void KCommonDecoration::mouseDoubleClickEvent(TQMouseEvent *e) { if( e->button() != LeftButton ) return; @@ -695,19 +695,19 @@ void KCommonDecoration::mouseDoubleClickEvent(QMouseEvent *e) titlebarDblClickOperation(); } -void KCommonDecoration::wheelEvent(QWheelEvent *e) +void KCommonDecoration::wheelEvent(TQWheelEvent *e) { int tb = layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)+layoutMetric(LM_TitleEdgeBottom); if (isSetShade() || e->pos().y() <= tb ) titlebarMouseWheelOperation( e->delta()); } -KCommonDecoration::Position KCommonDecoration::mousePosition(const QPoint &point) const +KCommonDecoration::Position KCommonDecoration::mousePosition(const TQPoint &point) const { const int corner = 18+3*layoutMetric(LM_BorderBottom, false)/2; Position pos = PositionCenter; - QRect r = widget()->rect(); + TQRect r = widget()->rect(); int r_x, r_y, r_x2, r_y2; r.coords(&r_x, &r_y, &r_x2, &r_y2); int p_x = point.x(); @@ -778,12 +778,12 @@ void KCommonDecoration::updateWindowShape() bool tl=true,tr=true,bl=true,br=true; // is there a transparent rounded corner in top-left? etc - QDesktopWidget *desktop=KApplication::desktop(); + TQDesktopWidget *desktop=KApplication::desktop(); // no transparent rounded corners if this window corner lines up with a screen corner for(int screen=0; screen < desktop->numScreens(); ++screen) { - QRect fullscreen(desktop->screenGeometry(screen)); - QRect window = geometry(); + TQRect fullscreen(desktop->screenGeometry(screen)); + TQRect window = geometry(); if(window.topLeft() == fullscreen.topLeft() ) tl = false; if(window.topRight() == fullscreen.topRight() ) tr = false; @@ -791,7 +791,7 @@ void KCommonDecoration::updateWindowShape() if(window.bottomRight()== fullscreen.bottomRight() ) br = false; } - QRegion mask(0, 0, w, h); + TQRegion mask(0, 0, w, h); // Remove top-left corner. if(tl) @@ -817,26 +817,26 @@ void KCommonDecoration::updateWindowShape() setMask( mask ); } -bool KCommonDecoration::eventFilter( QObject* o, QEvent* e ) +bool KCommonDecoration::eventFilter( TQObject* o, TQEvent* e ) { if( o != widget()) return false; switch( e->type()) { - case QEvent::Resize: - resizeEvent(static_cast<QResizeEvent*>(e) ); + case TQEvent::Resize: + resizeEvent(static_cast<TQResizeEvent*>(e) ); return true; - case QEvent::Paint: - paintEvent( static_cast< QPaintEvent* >( e )); + case TQEvent::Paint: + paintEvent( static_cast< TQPaintEvent* >( e )); return true; - case QEvent::MouseButtonDblClick: - mouseDoubleClickEvent( static_cast< QMouseEvent* >( e )); + case TQEvent::MouseButtonDblClick: + mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e )); return true; - case QEvent::MouseButtonPress: - processMousePressEvent( static_cast< QMouseEvent* >( e )); + case TQEvent::MouseButtonPress: + processMousePressEvent( static_cast< TQMouseEvent* >( e )); return true; - case QEvent::Wheel: - wheelEvent( static_cast< QWheelEvent* >( e )); + case TQEvent::Wheel: + wheelEvent( static_cast< TQWheelEvent* >( e )); return true; default: return false; @@ -853,7 +853,7 @@ bool KCommonDecoration::isToolWindow() const return ((type==NET::Toolbar)||(type==NET::Utility)||(type==NET::Menu)); } -QRect KCommonDecoration::titleRect() const +TQRect KCommonDecoration::titleRect() const { int r_x, r_y, r_x2, r_y2; widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2); @@ -865,14 +865,14 @@ QRect KCommonDecoration::titleRect() const const int titleBorderRight = layoutMetric(LM_TitleBorderRight); const int ttlHeight = layoutMetric(LM_TitleHeight); const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1; - return QRect(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft, r_y+titleEdgeTop, + return TQRect(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft, r_y+titleEdgeTop, r_x2-titleEdgeRight-buttonsRightWidth()-titleBorderRight-(r_x+titleEdgeLeft+buttonsLeftWidth()+titleBorderLeft), titleEdgeBottomBottom-(r_y+titleEdgeTop) ); } KCommonDecorationButton::KCommonDecorationButton(ButtonType type, KCommonDecoration *parent, const char *name) - : QButton(parent->widget(), name), + : TQButton(parent->widget(), name), m_decoration(parent), m_type(type), m_realizeButtons(LeftButton), @@ -911,7 +911,7 @@ void KCommonDecorationButton::setRealizeButtons(int btns) m_realizeButtons = btns; } -void KCommonDecorationButton::setSize(const QSize &s) +void KCommonDecorationButton::setSize(const TQSize &s) { if (!m_size.isValid() || s != size() ) { m_size = s; @@ -921,46 +921,46 @@ void KCommonDecorationButton::setSize(const QSize &s) } } -QSize KCommonDecorationButton::sizeHint() const +TQSize KCommonDecorationButton::sizeHint() const { return m_size; } -void KCommonDecorationButton::setTipText(const QString &tip) { - QToolTip::remove(this ); - QToolTip::add(this, tip ); +void KCommonDecorationButton::setTipText(const TQString &tip) { + TQToolTip::remove(this ); + TQToolTip::add(this, tip ); } void KCommonDecorationButton::setToggleButton(bool toggle) { - QButton::setToggleButton(toggle); + TQButton::setToggleButton(toggle); reset(ToggleChange); } void KCommonDecorationButton::setOn(bool on) { if (on != isOn() ) { - QButton::setOn(on); + TQButton::setOn(on); reset(StateChange); } } -void KCommonDecorationButton::mousePressEvent(QMouseEvent* e) +void KCommonDecorationButton::mousePressEvent(TQMouseEvent* e) { m_lastMouse = e->button(); // pass on event after changing button to LeftButton - QMouseEvent me(e->type(), e->pos(), e->globalPos(), + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), (e->button()&m_realizeButtons)?LeftButton:NoButton, e->state()); - QButton::mousePressEvent(&me); + TQButton::mousePressEvent(&me); } -void KCommonDecorationButton::mouseReleaseEvent(QMouseEvent* e) +void KCommonDecorationButton::mouseReleaseEvent(TQMouseEvent* e) { m_lastMouse = e->button(); // pass on event after changing button to LeftButton - QMouseEvent me(e->type(), e->pos(), e->globalPos(), + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), (e->button()&m_realizeButtons)?LeftButton:NoButton, e->state()); - QButton::mouseReleaseEvent(&me); + TQButton::mouseReleaseEvent(&me); } diff --git a/kwin/lib/kcommondecoration.h b/kwin/lib/kcommondecoration.h index 9495cf148..f515a7da7 100644 --- a/kwin/lib/kcommondecoration.h +++ b/kwin/lib/kcommondecoration.h @@ -25,8 +25,8 @@ #ifndef KCOMMONDECORATION_H #define KCOMMONDECORATION_H -#include <qbutton.h> -#include <qvaluevector.h> +#include <tqbutton.h> +#include <tqvaluevector.h> #include "kdecoration.h" @@ -134,19 +134,19 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration /** * The name of the decoration used in the decoration preview. */ - virtual QString visibleName() const = 0; + virtual TQString visibleName() const = 0; /** * The default title button order on the left. * @see KDecoration::titleButtonsLeft() * @see KDecoration::titleButtonsRight() */ - virtual QString defaultButtonsLeft() const = 0; + virtual TQString defaultButtonsLeft() const = 0; /** * The default title button order on the left. * @see KDecoration::titleButtonsLeft() * @see KDecoration::titleButtonsRight() */ - virtual QString defaultButtonsRight() const = 0; + virtual TQString defaultButtonsRight() const = 0; /** * This controls whether some specific behaviour should be enabled or not. @@ -172,7 +172,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration /** * @return the mask for the specific window corner. */ - virtual QRegion cornerShape(WindowCorner corner); + virtual TQRegion cornerShape(WindowCorner corner); /** * This updates the window mask using the information provided by @@ -186,7 +186,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration /** * Draw the window decoration. */ - virtual void paintEvent(QPaintEvent *e) = 0; + virtual void paintEvent(TQPaintEvent *e) = 0; /** * This is used to update the painting of the title bar after the caption has been changed. @@ -219,7 +219,7 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration * Convenience method. * @returns the title rect. */ - QRect titleRect() const; + TQRect titleRect() const; public: /** @@ -232,8 +232,8 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration virtual void reset( unsigned long changed ); virtual void borders( int& left, int& right, int& top, int& bottom ) const; virtual void show(); - virtual void resize(const QSize& s); - virtual QSize minimumSize() const; + virtual void resize(const TQSize& s); + virtual TQSize minimumSize() const; virtual void maximizeChange(); virtual void desktopChange(); virtual void shadeChange(); @@ -250,29 +250,29 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration void menuButtonPressed(); void menuButtonReleased(); public: - virtual Position mousePosition(const QPoint &point) const; + virtual Position mousePosition(const TQPoint &point) const; - virtual bool eventFilter( QObject* o, QEvent* e ); - virtual void resizeEvent(QResizeEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void wheelEvent(QWheelEvent *e); + virtual bool eventFilter( TQObject* o, TQEvent* e ); + virtual void resizeEvent(TQResizeEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); private: void resetLayout(); - void moveWidget(int x, int y, QWidget *widget) const; - void resizeWidget(int w, int h, QWidget *widget) const; + void moveWidget(int x, int y, TQWidget *widget) const; + void resizeWidget(int w, int h, TQWidget *widget) const; - typedef QValueVector <KCommonDecorationButton*> ButtonContainer; ///< If the entry is 0, it's a spacer. + typedef TQValueVector <KCommonDecorationButton*> ButtonContainer; ///< If the entry is 0, it's a spacer. int buttonContainerWidth(const ButtonContainer &btnContainer, bool countHidden = false) const; - void addButtons(ButtonContainer &btnContainer, const QString& buttons, bool isLeft); + void addButtons(ButtonContainer &btnContainer, const TQString& buttons, bool isLeft); KCommonDecorationButton *m_button[NumButtons]; ButtonContainer m_buttonsLeft; ButtonContainer m_buttonsRight; - QWidget *m_previewWidget; + TQWidget *m_previewWidget; // button hiding for small windows void calcHiddenButtons(); @@ -333,30 +333,30 @@ class KWIN_EXPORT KCommonDecorationButton : public QButton /** * Set the button size. */ - void setSize(const QSize &s); + void setSize(const TQSize &s); /** * Set/update the button's tool tip */ - void setTipText(const QString &tip); + void setTipText(const TQString &tip); /** * The mouse button that has been clicked last time. */ ButtonState lastMousePress() const { return m_lastMouse; } - QSize sizeHint() const; + TQSize sizeHint() const; protected: void setToggleButton(bool toggle); void setOn(bool on); void setLeft(bool left); - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); private: KCommonDecoration *m_decoration; ButtonType m_type; int m_realizeButtons; - QSize m_size; + TQSize m_size; ButtonState m_lastMouse; bool m_isLeft; diff --git a/kwin/lib/kdecoration.cpp b/kwin/lib/kdecoration.cpp index c7b3d6929..97c8965e9 100644 --- a/kwin/lib/kdecoration.cpp +++ b/kwin/lib/kdecoration.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. #include "kdecoration.h" #include <kdebug.h> -#include <qapplication.h> +#include <tqapplication.h> #include <kglobal.h> #include <assert.h> #if defined Q_WS_X11 && ! defined K_WS_QTONLY @@ -60,10 +60,10 @@ const KDecorationOptions* KDecoration::options() void KDecoration::createMainWidget( WFlags flags ) { // FRAME check flags? - setMainWidget( new QWidget( initialParentWidget(), "decoration widget", initialWFlags() | flags )); + setMainWidget( new TQWidget( initialParentWidget(), "decoration widget", initialWFlags() | flags )); } -void KDecoration::setMainWidget( QWidget* w ) +void KDecoration::setMainWidget( TQWidget* w ) { assert( w_ == NULL ); w_ = w; @@ -71,7 +71,7 @@ void KDecoration::setMainWidget( QWidget* w ) widget()->resize( geometry().size()); } -QWidget* KDecoration::initialParentWidget() const +TQWidget* KDecoration::initialParentWidget() const { return bridge_->initialParentWidget(); } @@ -161,27 +161,27 @@ NET::WindowType KDecoration::windowType( unsigned long supported_types ) const return bridge_->windowType( supported_types ); } -QIconSet KDecoration::icon() const +TQIconSet KDecoration::icon() const { return bridge_->icon(); } -QString KDecoration::caption() const +TQString KDecoration::caption() const { return bridge_->caption(); } -void KDecoration::processMousePressEvent( QMouseEvent* e ) +void KDecoration::processMousePressEvent( TQMouseEvent* e ) { return bridge_->processMousePressEvent( e ); } -void KDecoration::showWindowMenu( const QRect &pos ) +void KDecoration::showWindowMenu( const TQRect &pos ) { bridge_->showWindowMenu( pos ); } -void KDecoration::showWindowMenu( QPoint pos ) +void KDecoration::showWindowMenu( TQPoint pos ) { bridge_->showWindowMenu( pos ); } @@ -191,14 +191,14 @@ void KDecoration::performWindowOperation( WindowOperation op ) bridge_->performWindowOperation( op ); } -void KDecoration::setMask( const QRegion& reg, int mode ) +void KDecoration::setMask( const TQRegion& reg, int mode ) { bridge_->setMask( reg, mode ); } void KDecoration::clearMask() { - bridge_->setMask( QRegion(), 0 ); + bridge_->setMask( TQRegion(), 0 ); } bool KDecoration::isPreview() const @@ -206,22 +206,22 @@ bool KDecoration::isPreview() const return bridge_->isPreview(); } -QRect KDecoration::geometry() const +TQRect KDecoration::geometry() const { return bridge_->geometry(); } -QRect KDecoration::iconGeometry() const +TQRect KDecoration::iconGeometry() const { return bridge_->iconGeometry(); } -QRegion KDecoration::unobscuredRegion( const QRegion& r ) const +TQRegion KDecoration::unobscuredRegion( const TQRegion& r ) const { return bridge_->unobscuredRegion( r ); } -QWidget* KDecoration::workspaceWidget() const +TQWidget* KDecoration::workspaceWidget() const { return bridge_->workspaceWidget(); } @@ -294,7 +294,7 @@ void KDecoration::setKeepBelow( bool set ) bridge_->setKeepBelow( set ); } -bool KDecoration::drawbound( const QRect&, bool ) +bool KDecoration::drawbound( const TQRect&, bool ) { return false; } @@ -328,7 +328,7 @@ void KDecoration::ungrabXServer() bridge_->grabXServer( false ); } -KDecoration::Position KDecoration::mousePosition( const QPoint& p ) const +KDecoration::Position KDecoration::mousePosition( const TQPoint& p ) const { const int range = 16; int bleft, bright, btop, bbottom; @@ -375,12 +375,12 @@ KDecorationOptions::~KDecorationOptions() KDecoration::options_ = NULL; } -const QColor& KDecorationOptions::color(ColorType type, bool active) const +const TQColor& KDecorationOptions::color(ColorType type, bool active) const { return(d->colors[type + (active ? 0 : NUM_COLORS)]); } -const QFont& KDecorationOptions::font(bool active, bool small) const +const TQFont& KDecorationOptions::font(bool active, bool small) const { if ( small ) return(active ? d->activeFontSmall : d->inactiveFontSmall); @@ -388,14 +388,14 @@ const QFont& KDecorationOptions::font(bool active, bool small) const return(active ? d->activeFont : d->inactiveFont); } -const QColorGroup& KDecorationOptions::colorGroup(ColorType type, bool active) const +const TQColorGroup& KDecorationOptions::colorGroup(ColorType type, bool active) const { int idx = type + (active ? 0 : NUM_COLORS); if(d->cg[idx]) return(*d->cg[idx]); - d->cg[idx] = new QColorGroup(Qt::black, d->colors[idx], d->colors[idx].light(150), + d->cg[idx] = new TQColorGroup(Qt::black, d->colors[idx], d->colors[idx].light(150), d->colors[idx].dark(), d->colors[idx].dark(120), - Qt::black, QApplication::palette().active(). + Qt::black, TQApplication::palette().active(). base()); return(*d->cg[idx]); } @@ -405,12 +405,12 @@ bool KDecorationOptions::customButtonPositions() const return d->custom_button_positions; } -QString KDecorationOptions::titleButtonsLeft() const +TQString KDecorationOptions::titleButtonsLeft() const { return d->title_buttons_left; } -QString KDecorationOptions::titleButtonsRight() const +TQString KDecorationOptions::titleButtonsRight() const { return d->title_buttons_right; } diff --git a/kwin/lib/kdecoration.h b/kwin/lib/kdecoration.h index 2fd1fc451..b4f62d6f8 100644 --- a/kwin/lib/kdecoration.h +++ b/kwin/lib/kdecoration.h @@ -25,10 +25,10 @@ DEALINGS IN THE SOFTWARE. #ifndef KDECORATION_H #define KDECORATION_H -#include <qcolor.h> -#include <qfont.h> -#include <qobject.h> -#include <qiconset.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqobject.h> +#include <tqiconset.h> #include <netwm_def.h> #include <kdeversion.h> @@ -196,7 +196,7 @@ public: * @param type The requested color type. * @param active Whether the color should be for active or inactive windows. */ - const QColor& color(ColorType type, bool active=true) const; + const TQColor& color(ColorType type, bool active=true) const; /** * Returns a colorgroup using the given decoration color as the background. * The changed flags for this setting is SettingColors. @@ -204,7 +204,7 @@ public: * @param type The requested color type. * @param active Whether to return the color for active or inactive windows. */ - const QColorGroup& colorGroup(ColorType type, bool active=true) const; + const TQColorGroup& colorGroup(ColorType type, bool active=true) const; /** * Returns the active or inactive decoration font. * The changed flags for this setting is SettingFont. @@ -212,7 +212,7 @@ public: * @param active Whether to return the color for active or inactive windows. * @param small If @a true, returns a font that's suitable for tool windows. */ - const QFont& font(bool active=true, bool small = false) const; + const TQFont& font(bool active=true, bool small = false) const; /** * Returns @a true if the style should use custom button positions * The changed flags for this setting is SettingButtons. @@ -242,7 +242,7 @@ public: * Unknown buttons in the returned string must be ignored. * The changed flags for this setting is SettingButtons. */ - QString titleButtonsLeft() const; + TQString titleButtonsLeft() const; /** * If customButtonPositions() returns true, titleButtonsRight * returns which buttons should be on the right side of the titlebar from left @@ -254,7 +254,7 @@ public: * Unknown buttons in the returned string must be ignored. * The changed flags for this setting is SettingButtons. */ - QString titleButtonsRight() const; + TQString titleButtonsRight() const; /** * @returns true if the style should use tooltips for window buttons @@ -308,7 +308,7 @@ protected: * @since 3.2 */ class KWIN_EXPORT KDecoration - : public QObject, public KDecorationDefines + : public TQObject, public KDecorationDefines { Q_OBJECT public: @@ -436,11 +436,11 @@ class KWIN_EXPORT KDecoration /** * Returns an icon set with the decorated window's icon. */ - QIconSet icon() const; + TQIconSet icon() const; /** * Returns the decorated window's caption that should be shown in the titlebar. */ - QString caption() const; + TQString caption() const; /** * This function invokes the window operations menu. * \param pos specifies the place on the screen where the menu should @@ -467,12 +467,12 @@ class KWIN_EXPORT KDecoration * button[MenuButton]->setDown(false); * \endcode */ - void showWindowMenu( const QRect &pos ); + void showWindowMenu( const TQRect &pos ); /** * Overloaded version of the above. */ - void showWindowMenu( QPoint pos ); + void showWindowMenu( TQPoint pos ); /** * This function performs the given window operation. This function may destroy * the current decoration object, just like showWindowMenu(). @@ -486,7 +486,7 @@ class KWIN_EXPORT KDecoration * @param mode The X11 values Unsorted, YSorted, YXSorted and YXBanded that specify * the sorting of the rectangles, default value is Unsorted. */ - void setMask( const QRegion& reg, int mode = 0 ); + void setMask( const TQRegion& reg, int mode = 0 ); /** * This convenience function resets the shape mask. */ @@ -500,13 +500,13 @@ class KWIN_EXPORT KDecoration /** * Returns the geometry of the decoration. */ - QRect geometry() const; + TQRect geometry() const; /** * Returns the icon geometry for the window, i.e. the geometry of the taskbar * entry. This is used mainly for window minimize animations. Note that * the geometry may be null. */ - QRect iconGeometry() const; + TQRect iconGeometry() const; /** * Returns the intersection of the given region with the region left * unobscured by the windows stacked above the current one. You can use @@ -515,12 +515,12 @@ class KWIN_EXPORT KDecoration * space of the decoration. * @param r The region you want to check for holes */ - QRegion unobscuredRegion( const QRegion& r ) const; + TQRegion unobscuredRegion( const TQRegion& r ) const; /** * Returns the main workspace widget. The main purpose of this function is to * allow painting the minimize animation or the transparent move bound on it. */ - QWidget* workspaceWidget() const; + TQWidget* workspaceWidget() const; /** * Returns the handle of the window that is being decorated. It is possible * the returned value will be 0. @@ -548,7 +548,7 @@ class KWIN_EXPORT KDecoration * that are not handled by the decoration itself should be passed to it * in order to make work operations like window resizing by dragging borders etc. */ - void processMousePressEvent( QMouseEvent* e ); + void processMousePressEvent( TQMouseEvent* e ); // requests to decoration @@ -564,7 +564,7 @@ class KWIN_EXPORT KDecoration * Positions at the edge will result in window resizing with mouse button * pressed, center position will result in moving. */ - virtual Position mousePosition( const QPoint& p ) const = 0; + virtual Position mousePosition( const TQPoint& p ) const = 0; /** * This function should return the distance from each window side to the inner @@ -587,13 +587,13 @@ class KWIN_EXPORT KDecoration * * @param s Specifies the new size of the decoration window. */ - virtual void resize( const QSize& s ) = 0; + virtual void resize( const TQSize& s ) = 0; /** * This function should return the minimum required size for the decoration. * Note that the returned size shouldn't be too large, because it will be * used to keep the decorated window at least as large. */ - virtual QSize minimumSize() const = 0; + virtual TQSize minimumSize() const = 0; /** * This function is called whenever the window either becomes or stops being active. * Use isActive() to find out the current state. @@ -651,7 +651,7 @@ class KWIN_EXPORT KDecoration * * @see workspaceWidget() and geometry(). */ - virtual bool drawbound( const QRect& geom, bool clear ); + virtual bool drawbound( const TQRect& geom, bool clear ); /** * This function may be reimplemented to provide custom minimize/restore animations * The reimplementation is allowed to perform X server grabs if necessary @@ -684,7 +684,7 @@ class KWIN_EXPORT KDecoration * with parent specified by initialParentWidget() and flags * specified by initialWFlags(). */ - void setMainWidget( QWidget* ); + void setMainWidget( TQWidget* ); /** * Convenience functions that creates and sets a main widget as necessary. * In such case, it's usually needed to install an event filter @@ -698,7 +698,7 @@ class KWIN_EXPORT KDecoration /** * The parent widget that should be used for the main widget. */ - QWidget* initialParentWidget() const; + TQWidget* initialParentWidget() const; /** * The flags that should be used when creating the main widget. * It is possible to add more flags when creating the main widget, but only flags @@ -716,11 +716,11 @@ class KWIN_EXPORT KDecoration /** * Returns the main widget for the decoration. */ - QWidget* widget(); + TQWidget* widget(); /** * Returns the main widget for the decoration. */ - const QWidget* widget() const; + const TQWidget* widget() const; /** * Returns the factory that created this decoration. */ @@ -829,7 +829,7 @@ class KWIN_EXPORT KDecoration void emitKeepBelowChanged( bool below ) { emit keepBelowChanged( below ); } private: KDecorationBridge* bridge_; - QWidget* w_; + TQWidget* w_; KDecorationFactory* factory_; friend class KDecorationOptions; // for options_ static KDecorationOptions* options_; @@ -854,12 +854,12 @@ KDecorationDefines::MaximizeMode operator|( KDecorationDefines::MaximizeMode m1, return KDecorationDefines::MaximizeMode( int(m1) | int(m2) ); } -inline QWidget* KDecoration::widget() +inline TQWidget* KDecoration::widget() { return w_; } -inline const QWidget* KDecoration::widget() const +inline const TQWidget* KDecoration::widget() const { return w_; } diff --git a/kwin/lib/kdecoration_p.cpp b/kwin/lib/kdecoration_p.cpp index 0117e4ec4..1e063d099 100644 --- a/kwin/lib/kdecoration_p.cpp +++ b/kwin/lib/kdecoration_p.cpp @@ -26,8 +26,8 @@ DEALINGS IN THE SOFTWARE. #include <kconfig.h> #include <kglobalsettings.h> -#include <qpalette.h> -#include <qapplication.h> +#include <tqpalette.h> +#include <tqapplication.h> #include <assert.h> KDecorationOptionsPrivate::KDecorationOptionsPrivate() @@ -66,17 +66,17 @@ void KDecorationOptionsPrivate::defaultKWinSettings() unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) { unsigned long changed = 0; - QString old_group = config->group(); + TQString old_group = config->group(); config->setGroup( "WM" ); // SettingColors - QColor old_colors[NUM_COLORS*2]; + TQColor old_colors[NUM_COLORS*2]; for( int i = 0; i < NUM_COLORS*2; ++i ) old_colors[ i ] = colors[ i ]; - QPalette pal = QApplication::palette(); + TQPalette pal = TQApplication::palette(); // normal colors colors[ColorFrame] = pal.active().background(); colors[ColorFrame] = config->readColorEntry("frame", &colors[ColorFrame]); @@ -84,7 +84,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) colors[ColorHandle] = config->readColorEntry("handle", &colors[ColorHandle]); // full button configuration (background, blend, and foreground - if(QPixmap::defaultDepth() > 8) + if(TQPixmap::defaultDepth() > 8) colors[ColorButtonBg] = colors[ColorFrame].light(130); else colors[ColorButtonBg] = colors[ColorFrame]; @@ -93,7 +93,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) colors[ColorTitleBar] = pal.active().highlight(); colors[ColorTitleBar] = config->readColorEntry("activeBackground", &colors[ColorTitleBar]); - if(QPixmap::defaultDepth() > 8) + if(TQPixmap::defaultDepth() > 8) colors[ColorTitleBlend] = colors[ ColorTitleBar ].dark(110); else colors[ColorTitleBlend] = colors[ ColorTitleBar ]; @@ -110,7 +110,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) colors[ColorTitleBar+NUM_COLORS] = config-> readColorEntry("inactiveBackground", &colors[ColorTitleBar+NUM_COLORS]); - if(QPixmap::defaultDepth() > 8) + if(TQPixmap::defaultDepth() > 8) colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ].dark(110); else colors[ColorTitleBlend+NUM_COLORS] = colors[ ColorTitleBar+NUM_COLORS ]; @@ -118,7 +118,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) config->readColorEntry("inactiveBlend", &colors[ColorTitleBlend+NUM_COLORS]); // full button configuration - if(QPixmap::defaultDepth() > 8) + if(TQPixmap::defaultDepth() > 8) colors[ColorButtonBg+NUM_COLORS] = colors[ColorFrame+NUM_COLORS].light(130); else colors[ColorButtonBg+NUM_COLORS] = colors[ColorFrame+NUM_COLORS]; @@ -140,12 +140,12 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) changed |= SettingColors; // SettingFont - QFont old_activeFont = activeFont; - QFont old_inactiveFont = inactiveFont; - QFont old_activeFontSmall = activeFontSmall; - QFont old_inactiveFontSmall = inactiveFontSmall; + TQFont old_activeFont = activeFont; + TQFont old_inactiveFont = inactiveFont; + TQFont old_activeFontSmall = activeFontSmall; + TQFont old_inactiveFontSmall = inactiveFontSmall; - QFont activeFontGuess = KGlobalSettings::windowTitleFont(); + TQFont activeFontGuess = KGlobalSettings::windowTitleFont(); activeFont = config->readFontEntry("activeFont", &activeFontGuess); inactiveFont = config->readFontEntry("inactiveFont", &activeFont); @@ -163,8 +163,8 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) config->setGroup( "Style" ); // SettingsButtons - QString old_title_buttons_left = title_buttons_left; - QString old_title_buttons_right = title_buttons_right; + TQString old_title_buttons_left = title_buttons_left; + TQString old_title_buttons_right = title_buttons_right; bool old_custom_button_positions = custom_button_positions; custom_button_positions = config->readBoolEntry("CustomButtonPositions", false); if (custom_button_positions) @@ -224,9 +224,9 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config ) } KDecorationDefines::BorderSize KDecorationOptionsPrivate::findPreferredBorderSize( BorderSize size, - QValueList< BorderSize > sizes ) const + TQValueList< BorderSize > sizes ) const { - for( QValueList< BorderSize >::ConstIterator it = sizes.begin(); + for( TQValueList< BorderSize >::ConstIterator it = sizes.begin(); it != sizes.end(); ++it ) if( size <= *it ) // size is either a supported size, or *it is the closest larger supported diff --git a/kwin/lib/kdecoration_p.h b/kwin/lib/kdecoration_p.h index 8d0e5e15a..58f386c9b 100644 --- a/kwin/lib/kdecoration_p.h +++ b/kwin/lib/kdecoration_p.h @@ -30,8 +30,8 @@ DEALINGS IN THE SOFTWARE. // #include "kdecoration.h" -#include <qwidget.h> -#include <qvaluelist.h> +#include <tqwidget.h> +#include <tqvaluelist.h> class KConfig; @@ -42,13 +42,13 @@ class KWIN_EXPORT KDecorationOptionsPrivate : public KDecorationDefines virtual ~KDecorationOptionsPrivate(); void defaultKWinSettings(); // shared implementation unsigned long updateKWinSettings( KConfig* ); // shared implementation - BorderSize findPreferredBorderSize( BorderSize size, QValueList< BorderSize > ) const; // shared implementation + BorderSize findPreferredBorderSize( BorderSize size, TQValueList< BorderSize > ) const; // shared implementation - QColor colors[NUM_COLORS*2]; - QColorGroup *cg[NUM_COLORS*2]; - QFont activeFont, inactiveFont, activeFontSmall, inactiveFontSmall; - QString title_buttons_left; - QString title_buttons_right; + TQColor colors[NUM_COLORS*2]; + TQColorGroup *cg[NUM_COLORS*2]; + TQFont activeFont, inactiveFont, activeFontSmall, inactiveFontSmall; + TQString title_buttons_left; + TQString title_buttons_right; bool custom_button_positions; bool show_tooltips; BorderSize border_size, cached_border_size; @@ -77,18 +77,18 @@ class KDecorationBridge : public KDecorationDefines virtual bool isMovable() const = 0; virtual bool isResizable() const = 0; virtual NET::WindowType windowType( unsigned long supported_types ) const = 0; - virtual QIconSet icon() const = 0; - virtual QString caption() const = 0; - virtual void processMousePressEvent( QMouseEvent* ) = 0; - virtual void showWindowMenu( const QRect &) = 0; - virtual void showWindowMenu( QPoint ) = 0; + virtual TQIconSet icon() const = 0; + virtual TQString caption() const = 0; + virtual void processMousePressEvent( TQMouseEvent* ) = 0; + virtual void showWindowMenu( const TQRect &) = 0; + virtual void showWindowMenu( TQPoint ) = 0; virtual void performWindowOperation( WindowOperation ) = 0; - virtual void setMask( const QRegion&, int ) = 0; + virtual void setMask( const TQRegion&, int ) = 0; virtual bool isPreview() const = 0; - virtual QRect geometry() const = 0; - virtual QRect iconGeometry() const = 0; - virtual QRegion unobscuredRegion( const QRegion& r ) const = 0; - virtual QWidget* workspaceWidget() const = 0; + virtual TQRect geometry() const = 0; + virtual TQRect iconGeometry() const = 0; + virtual TQRegion unobscuredRegion( const TQRegion& r ) const = 0; + virtual TQWidget* workspaceWidget() const = 0; virtual WId windowId() const = 0; virtual void closeWindow() = 0; virtual void maximize( MaximizeMode mode ) = 0; @@ -102,7 +102,7 @@ class KDecorationBridge : public KDecorationDefines virtual void setKeepBelow( bool ) = 0; // not part of public API virtual int currentDesktop() const = 0; - virtual QWidget* initialParentWidget() const = 0; + virtual TQWidget* initialParentWidget() const = 0; virtual Qt::WFlags initialWFlags() const = 0; virtual void helperShowHide( bool ) = 0; virtual void grabXServer( bool grab ) = 0; diff --git a/kwin/lib/kdecoration_plugins_p.cpp b/kwin/lib/kdecoration_plugins_p.cpp index 85d496105..0490e4755 100644 --- a/kwin/lib/kdecoration_plugins_p.cpp +++ b/kwin/lib/kdecoration_plugins_p.cpp @@ -31,8 +31,8 @@ DEALINGS IN THE SOFTWARE. #include <klibloader.h> #include <assert.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #include "kdecorationfactory.h" @@ -65,7 +65,7 @@ KDecorationPlugins::~KDecorationPlugins() bool KDecorationPlugins::reset( unsigned long changed ) { - QString oldPlugin = pluginStr; + TQString oldPlugin = pluginStr; config->reparseConfiguration(); bool ret = false; if(( !loadPlugin( "" ) && library ) // "" = read the one in cfg file @@ -91,7 +91,7 @@ KDecoration* KDecorationPlugins::createDecoration( KDecorationBridge* bridge ) } // returns true if plugin was loaded successfully -bool KDecorationPlugins::loadPlugin( QString nameStr ) +bool KDecorationPlugins::loadPlugin( TQString nameStr ) { if( nameStr.isEmpty()) { @@ -105,13 +105,13 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) KLibrary *oldLibrary = library; KDecorationFactory* oldFactory = fact; - QString path = KLibLoader::findLibrary(QFile::encodeName(nameStr)); + TQString path = KLibLoader::findLibrary(TQFile::encodeName(nameStr)); // If the plugin was not found, try to find the default if (path.isEmpty()) { nameStr = defaultPlugin; - path = KLibLoader::findLibrary(QFile::encodeName(nameStr)); + path = KLibLoader::findLibrary(TQFile::encodeName(nameStr)); } // If no library was found, exit kwin with an error message @@ -126,7 +126,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) return true; // Try loading the requested plugin - library = KLibLoader::self()->library(QFile::encodeName(path)); + library = KLibLoader::self()->library(TQFile::encodeName(path)); // If that fails, fall back to the default plugin if (!library) @@ -135,9 +135,9 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) nameStr = defaultPlugin; if ( pluginStr == nameStr ) return true; - path = KLibLoader::findLibrary(QFile::encodeName(nameStr)); + path = KLibLoader::findLibrary(TQFile::encodeName(nameStr)); if (!path.isEmpty()) - library = KLibLoader::self()->library(QFile::encodeName(path)); + library = KLibLoader::self()->library(TQFile::encodeName(path)); } if (!library) @@ -166,7 +166,7 @@ bool KDecorationPlugins::loadPlugin( QString nameStr ) pluginStr = nameStr; // For clients in kdeartwork - QString catalogue = nameStr; + TQString catalogue = nameStr; catalogue.replace( "kwin3_", "kwin_" ); KGlobal::locale()->insertCatalogue( catalogue ); // For KCommonDecoration based clients @@ -194,6 +194,6 @@ void KDecorationPlugins::destroyPreviousPlugin() } } -void KDecorationPlugins::error( const QString& ) +void KDecorationPlugins::error( const TQString& ) { } diff --git a/kwin/lib/kdecoration_plugins_p.h b/kwin/lib/kdecoration_plugins_p.h index b82f7f914..81dbb6b68 100644 --- a/kwin/lib/kdecoration_plugins_p.h +++ b/kwin/lib/kdecoration_plugins_p.h @@ -30,9 +30,9 @@ DEALINGS IN THE SOFTWARE. // This header file is internal. I mean it. // -#include <qcstring.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcstring.h> +#include <tqstring.h> +#include <tqwidget.h> #include "kdecoration.h" @@ -48,22 +48,22 @@ class KWIN_EXPORT KDecorationPlugins public: KDecorationPlugins( KConfig* cfg ); virtual ~KDecorationPlugins(); - bool loadPlugin( QString name ); + bool loadPlugin( TQString name ); void destroyPreviousPlugin(); KDecorationFactory* factory(); KDecoration* createDecoration( KDecorationBridge* ); - QString currentPlugin() { return pluginStr; } + TQString currentPlugin() { return pluginStr; } bool reset( unsigned long changed ); // returns true if decorations need to be recreated protected: - virtual void error( const QString& error_msg ); - QCString defaultPlugin; // FRAME normalne protected? + virtual void error( const TQString& error_msg ); + TQCString defaultPlugin; // FRAME normalne protected? private: KDecorationFactory* (*create_ptr)(); KLibrary *library; KDecorationFactory* fact; KLibrary *old_library; KDecorationFactory* old_fact; - QString pluginStr; + TQString pluginStr; KConfig* config; }; diff --git a/kwin/lib/kdecorationfactory.cpp b/kwin/lib/kdecorationfactory.cpp index 74508501b..7ad1aefbe 100644 --- a/kwin/lib/kdecorationfactory.cpp +++ b/kwin/lib/kdecorationfactory.cpp @@ -51,9 +51,9 @@ void KDecorationFactory::checkRequirements( KDecorationProvides* ) { } -QValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() const +TQValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes() const { - return QValueList< BorderSize >() << BorderNormal; + return TQValueList< BorderSize >() << BorderNormal; } bool KDecorationFactory::exists( const KDecoration* deco ) const @@ -73,7 +73,7 @@ void KDecorationFactory::removeDecoration( KDecoration* deco ) void KDecorationFactory::resetDecorations( unsigned long changed ) { - for( QValueList< KDecoration* >::ConstIterator it = _decorations.begin(); + for( TQValueList< KDecoration* >::ConstIterator it = _decorations.begin(); it != _decorations.end(); ++it ) (*it)->reset( changed ); diff --git a/kwin/lib/kdecorationfactory.h b/kwin/lib/kdecorationfactory.h index 08e733c8b..7396ad987 100644 --- a/kwin/lib/kdecorationfactory.h +++ b/kwin/lib/kdecorationfactory.h @@ -68,7 +68,7 @@ class KWIN_EXPORT KDecorationFactory * sizes, ordered from the smallest to the largest one. By default, only * BorderNormal is returned. */ - virtual QValueList< BorderSize > borderSizes() const; + virtual TQValueList< BorderSize > borderSizes() const; virtual bool supports( Ability ability ); @@ -108,7 +108,7 @@ class KWIN_EXPORT KDecorationFactory */ NET::WindowType windowType( unsigned long supported_types, KDecorationBridge* bridge ) const; private: - QValueList< KDecoration* > _decorations; + TQValueList< KDecoration* > _decorations; KDecorationFactoryPrivate* d; }; |