summaryrefslogtreecommitdiffstats
path: root/twin/lib
diff options
context:
space:
mode:
Diffstat (limited to 'twin/lib')
-rw-r--r--twin/lib/kcommondecoration.cpp56
-rw-r--r--twin/lib/kcommondecoration.h4
-rw-r--r--twin/lib/kdecoration.cpp10
-rw-r--r--twin/lib/kdecoration.h6
-rw-r--r--twin/lib/kdecoration_p.h2
-rw-r--r--twin/lib/kdecoration_plugins_p.cpp5
6 files changed, 40 insertions, 43 deletions
diff --git a/twin/lib/kcommondecoration.cpp b/twin/lib/kcommondecoration.cpp
index 54ee415e2..d8a22458b 100644
--- a/twin/lib/kcommondecoration.cpp
+++ b/twin/lib/kcommondecoration.cpp
@@ -122,8 +122,8 @@ void KCommonDecoration::init()
resetLayout();
- connect(this, TQT_SIGNAL(keepAboveChanged(bool) ), TQT_SLOT(keepAboveChange(bool) ) );
- connect(this, TQT_SIGNAL(keepBelowChanged(bool) ), TQT_SLOT(keepBelowChange(bool) ) );
+ connect(this, TQ_SIGNAL(keepAboveChanged(bool) ), TQ_SLOT(keepAboveChange(bool) ) );
+ connect(this, TQ_SIGNAL(keepBelowChanged(bool) ), TQ_SLOT(keepBelowChange(bool) ) );
updateCaption();
}
@@ -203,7 +203,7 @@ void KCommonDecoration::updateLayout() const
if (*it) {
if (!(*it)->isHidden() ) {
moveWidget(x,y, *it);
- x += layoutMetric(LM_ButtonWidth, true, ::tqqt_cast<KCommonDecorationButton*>(*it) );
+ x += layoutMetric(LM_ButtonWidth, true, ::tqt_cast<KCommonDecorationButton*>(*it) );
elementLayouted = true;
}
} else {
@@ -226,7 +226,7 @@ void KCommonDecoration::updateLayout() const
if (*it) {
if (!(*it)->isHidden() ) {
moveWidget(x,y, *it);
- x += layoutMetric(LM_ButtonWidth, true, ::tqqt_cast<KCommonDecorationButton*>(*it) );;
+ x += layoutMetric(LM_ButtonWidth, true, ::tqt_cast<KCommonDecorationButton*>(*it) );;
elementLayouted = true;
}
} else {
@@ -349,9 +349,9 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(MenuButton);
if (!btn) break;
btn->setTipText(i18n("Menu") );
- btn->setRealizeButtons(Qt::LeftButton|Qt::RightButton);
- connect(btn, TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed()));
- connect(btn, TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased()));
+ btn->setRealizeButtons(TQt::LeftButton|TQt::RightButton);
+ connect(btn, TQ_SIGNAL(pressed()), TQ_SLOT(menuButtonPressed()));
+ connect(btn, TQ_SIGNAL(released()), this, TQ_SLOT(menuButtonReleased()));
m_button[MenuButton] = btn;
}
@@ -366,7 +366,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(oad?i18n("Not on all desktops"):i18n("On all desktops") );
btn->setToggleButton(true);
btn->setOn( oad );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(toggleOnAllDesktops()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(toggleOnAllDesktops()));
m_button[OnAllDesktopsButton] = btn;
}
@@ -377,7 +377,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(HelpButton);
if (!btn) break;
btn->setTipText(i18n("Help") );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(showContextHelp()));
m_button[HelpButton] = btn;
}
@@ -387,7 +387,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(MinButton);
if (!btn) break;
btn->setTipText(i18n("Minimize") );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(minimize()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(minimize()));
m_button[MinButton] = btn;
}
@@ -396,12 +396,12 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
if ((!m_button[MaxButton]) && isMaximizable()){
btn = createButton(MaxButton);
if (!btn) break;
- btn->setRealizeButtons(Qt::LeftButton|Qt::MidButton|Qt::RightButton);
+ btn->setRealizeButtons(TQt::LeftButton|TQt::MidButton|TQt::RightButton);
const bool max = maximizeMode()==MaximizeFull;
btn->setTipText(max?i18n("Restore"):i18n("Maximize") );
btn->setToggleButton(true);
btn->setOn( max );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMaximize()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotMaximize()));
m_button[MaxButton] = btn;
}
@@ -411,7 +411,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn = createButton(CloseButton);
if (!btn) break;
btn->setTipText(i18n("Close") );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(closeWindow()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(closeWindow()));
m_button[CloseButton] = btn;
}
@@ -424,7 +424,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(above?i18n("Do not keep above others"):i18n("Keep above others") );
btn->setToggleButton(true);
btn->setOn( above );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepAbove()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotKeepAbove()));
m_button[AboveButton] = btn;
}
@@ -437,7 +437,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(below?i18n("Do not keep below others"):i18n("Keep below others") );
btn->setToggleButton(true);
btn->setOn( below );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBelow()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotKeepBelow()));
m_button[BelowButton] = btn;
}
@@ -450,7 +450,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString
btn->setTipText(shaded?i18n("Unshade"):i18n("Shade") );
btn->setToggleButton(true);
btn->setOn( shaded );
- connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotShade()));
+ connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotShade()));
m_button[ShadeButton] = btn;
}
@@ -710,7 +710,7 @@ void KCommonDecoration::resizeWidget(int w, int h, TQWidget *widget) const
void KCommonDecoration::mouseDoubleClickEvent(TQMouseEvent *e)
{
- if( e->button() != Qt::LeftButton )
+ if( e->button() != TQt::LeftButton )
return;
int tb = layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)+layoutMetric(LM_TitleEdgeBottom);
@@ -844,24 +844,24 @@ void KCommonDecoration::updateWindowShape()
bool KCommonDecoration::eventFilter( TQObject* o, TQEvent* e )
{
- if( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()))
+ if( o != widget())
return false;
switch( e->type())
{
case TQEvent::Resize:
- resizeEvent(TQT_TQRESIZEEVENT(e) );
+ resizeEvent(static_cast<TQResizeEvent*>(e) );
return true;
case TQEvent::Paint:
- paintEvent(TQT_TQPAINTEVENT( e ));
+ paintEvent(static_cast<TQPaintEvent*>( e ));
return true;
case TQEvent::MouseButtonDblClick:
- mouseDoubleClickEvent(TQT_TQMOUSEEVENT( e ));
+ mouseDoubleClickEvent(static_cast<TQMouseEvent*>( e ));
return true;
case TQEvent::MouseButtonPress:
- processMousePressEvent(TQT_TQMOUSEEVENT( e ));
+ processMousePressEvent(static_cast<TQMouseEvent*>( e ));
return true;
case TQEvent::Wheel:
- wheelEvent(TQT_TQWHEELEVENT( e ));
+ wheelEvent(static_cast<TQWheelEvent*>( e ));
return true;
default:
return false;
@@ -881,7 +881,7 @@ bool KCommonDecoration::isToolWindow() const
TQRect KCommonDecoration::titleRect() const
{
int r_x, r_y, r_x2, r_y2;
- TQT_TQRECT_OBJECT(widget()->rect()).coords(&r_x, &r_y, &r_x2, &r_y2);
+ widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
const int titleEdgeLeft = layoutMetric(LM_TitleEdgeLeft);
const int titleEdgeTop = layoutMetric(LM_TitleEdgeTop);
const int titleEdgeRight = layoutMetric(LM_TitleEdgeRight);
@@ -900,8 +900,8 @@ KCommonDecorationButton::KCommonDecorationButton(ButtonType type, KCommonDecorat
: TQButton(parent->widget(), name),
m_decoration(parent),
m_type(type),
- m_realizeButtons(Qt::LeftButton),
- m_lastMouse(Qt::NoButton),
+ m_realizeButtons(TQt::LeftButton),
+ m_lastMouse(TQt::NoButton),
m_isLeft(true)
{
setCursor(ArrowCursor);
@@ -975,7 +975,7 @@ void KCommonDecorationButton::mousePressEvent(TQMouseEvent* e)
m_lastMouse = e->button();
// pass on event after changing button to LeftButton
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
- (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state());
+ (e->button()&m_realizeButtons)?TQt::LeftButton:TQt::NoButton, e->state());
TQButton::mousePressEvent(&me);
}
@@ -985,7 +985,7 @@ void KCommonDecorationButton::mouseReleaseEvent(TQMouseEvent* e)
m_lastMouse = e->button();
// pass on event after changing button to LeftButton
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),
- (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state());
+ (e->button()&m_realizeButtons)?TQt::LeftButton:TQt::NoButton, e->state());
TQButton::mouseReleaseEvent(&me);
}
diff --git a/twin/lib/kcommondecoration.h b/twin/lib/kcommondecoration.h
index c914628e6..1ef9b1bba 100644
--- a/twin/lib/kcommondecoration.h
+++ b/twin/lib/kcommondecoration.h
@@ -58,7 +58,7 @@ class KCommonDecorationPrivate;
*/
class KWIN_EXPORT KCommonDecoration : public KDecoration
{
- Q_OBJECT
+ TQ_OBJECT
public:
KCommonDecoration(KDecorationBridge* bridge, KDecorationFactory* factory);
@@ -293,7 +293,7 @@ class KWIN_EXPORT KCommonDecorationButton : public TQButton
{
friend class KCommonDecoration;
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/twin/lib/kdecoration.cpp b/twin/lib/kdecoration.cpp
index b2332c514..b9a8e7a36 100644
--- a/twin/lib/kdecoration.cpp
+++ b/twin/lib/kdecoration.cpp
@@ -28,7 +28,7 @@ DEALINGS IN THE SOFTWARE.
#include <tqapplication.h>
#include <tdeglobal.h>
#include <assert.h>
-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if defined TQ_WS_X11 && ! defined K_WS_QTONLY
#include <X11/Xlib.h>
#include <fixx11h.h>
#endif
@@ -393,9 +393,9 @@ const TQColorGroup& KDecorationOptions::colorGroup(ColorType type, bool active)
int idx = type + (active ? 0 : NUM_COLORS);
if(d->cg[idx])
return(*d->cg[idx]);
- d->cg[idx] = new TQColorGroup(Qt::black, d->colors[idx], d->colors[idx].light(150),
+ d->cg[idx] = new TQColorGroup(TQt::black, d->colors[idx], d->colors[idx].light(150),
d->colors[idx].dark(), d->colors[idx].dark(120),
- Qt::black, TQApplication::palette().active().
+ TQt::black, TQApplication::palette().active().
base());
return(*d->cg[idx]);
}
@@ -436,8 +436,8 @@ bool KDecorationOptions::moveResizeMaximizedWindows() const
KDecorationDefines::WindowOperation KDecorationOptions::operationMaxButtonClick( TQt::ButtonState button ) const
{
- return button == Qt::RightButton? d->OpMaxButtonRightClick :
- button == Qt::MidButton? d->OpMaxButtonMiddleClick :
+ return button == TQt::RightButton? d->OpMaxButtonRightClick :
+ button == TQt::MidButton? d->OpMaxButtonMiddleClick :
d->OpMaxButtonLeftClick;
}
diff --git a/twin/lib/kdecoration.h b/twin/lib/kdecoration.h
index 693007a03..ee8e66eef 100644
--- a/twin/lib/kdecoration.h
+++ b/twin/lib/kdecoration.h
@@ -37,7 +37,7 @@ class KDecorationBridge;
class KDecorationPrivate;
class KDecorationFactory;
-#define KWIN_EXPORT KDE_EXPORT
+#define KWIN_EXPORT TDE_EXPORT
/**
* This class provides a namespace for all decoration related classes.
@@ -51,7 +51,7 @@ public:
* These values represent positions inside an area
*/
enum Position
- { // without prefix, they'd conflict with Qt::TopLeft etc. :(
+ { // without prefix, they'd conflict with TQt::TopLeft etc. :(
PositionCenter = 0x00,
PositionLeft = 0x01,
PositionRight = 0x02,
@@ -313,7 +313,7 @@ protected:
class KWIN_EXPORT KDecoration
: public TQObject, public KDecorationDefines
{
- Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a KDecoration object. Both the arguments are passed from
diff --git a/twin/lib/kdecoration_p.h b/twin/lib/kdecoration_p.h
index 2634ea140..b396509b6 100644
--- a/twin/lib/kdecoration_p.h
+++ b/twin/lib/kdecoration_p.h
@@ -103,7 +103,7 @@ class KDecorationBridge : public KDecorationDefines
// not part of public API
virtual int currentDesktop() const = 0;
virtual TQWidget* initialParentWidget() const = 0;
- virtual Qt::WFlags initialWFlags() const = 0;
+ virtual TQt::WFlags initialWFlags() const = 0;
virtual void helperShowHide( bool ) = 0;
virtual void grabXServer( bool grab ) = 0;
};
diff --git a/twin/lib/kdecoration_plugins_p.cpp b/twin/lib/kdecoration_plugins_p.cpp
index 0e2bc0d04..31de52e6d 100644
--- a/twin/lib/kdecoration_plugins_p.cpp
+++ b/twin/lib/kdecoration_plugins_p.cpp
@@ -42,7 +42,7 @@ KDecorationPlugins::KDecorationPlugins( TDEConfig* cfg )
fact( NULL ),
old_library( NULL ),
old_fact( NULL ),
- pluginStr( "twin3_undefined " ),
+ pluginStr( "twin_undefined " ),
config( cfg )
{
}
@@ -98,9 +98,6 @@ bool KDecorationPlugins::loadPlugin( TQString nameStr )
TDEConfigGroupSaver saver( config, "Style" );
nameStr = config->readEntry("PluginLib", defaultPlugin );
}
- // make sure people can switch between HEAD and twin_iii branch
- if( nameStr.startsWith( "twin_" ))
- nameStr = "twin3_" + nameStr.mid( 5 );
KLibrary *oldLibrary = library;
KDecorationFactory* oldFactory = fact;