summaryrefslogtreecommitdiffstats
path: root/twin/clients/plastik
diff options
context:
space:
mode:
Diffstat (limited to 'twin/clients/plastik')
-rw-r--r--twin/clients/plastik/CMakeLists.txt4
-rw-r--r--twin/clients/plastik/Makefile.am12
-rw-r--r--twin/clients/plastik/config/config.cpp20
-rw-r--r--twin/clients/plastik/config/config.h2
-rw-r--r--twin/clients/plastik/config/configdialog.ui3
-rw-r--r--twin/clients/plastik/misc.cpp4
-rw-r--r--twin/clients/plastik/plastik.cpp24
-rw-r--r--twin/clients/plastik/plastik.desktop2
-rw-r--r--twin/clients/plastik/plastik.h8
-rw-r--r--twin/clients/plastik/plastikbutton.cpp24
-rw-r--r--twin/clients/plastik/plastikbutton.h4
-rw-r--r--twin/clients/plastik/plastikclient.cpp6
12 files changed, 55 insertions, 58 deletions
diff --git a/twin/clients/plastik/CMakeLists.txt b/twin/clients/plastik/CMakeLists.txt
index 695468994..8e920bdc2 100644
--- a/twin/clients/plastik/CMakeLists.txt
+++ b/twin/clients/plastik/CMakeLists.txt
@@ -34,9 +34,9 @@ tde_create_translated_desktop(
)
-##### twin3_plastik (module) ####################
+##### twin_plastik (module) ####################
-tde_add_kpart( twin3_plastik AUTOMOC
+tde_add_kpart( twin_plastik AUTOMOC
SOURCES plastik.cpp plastikclient.cpp plastikbutton.cpp misc.cpp
LINK tdecorations-shared tdeui-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
diff --git a/twin/clients/plastik/Makefile.am b/twin/clients/plastik/Makefile.am
index c1757891d..0afee676a 100644
--- a/twin/clients/plastik/Makefile.am
+++ b/twin/clients/plastik/Makefile.am
@@ -9,11 +9,11 @@ INCLUDES = -I$(srcdir)/../../lib $(all_includes)
twindir = $(kde_datadir)/twin/
twin_DATA = plastik.desktop
-kde_module_LTLIBRARIES = twin3_plastik.la
-twin3_plastik_la_SOURCES = plastik.cpp plastikclient.cpp plastikbutton.cpp misc.cpp
-twin3_plastik_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
-twin3_plastik_la_LIBADD = $(LIB_TDEUI) ../../lib/libtdecorations.la
-twin3_plastik_la_METASOURCES = AUTO
+kde_module_LTLIBRARIES = twin_plastik.la
+twin_plastik_la_SOURCES = plastik.cpp plastikclient.cpp plastikbutton.cpp misc.cpp
+twin_plastik_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+twin_plastik_la_LIBADD = $(LIB_TDEUI) ../../lib/libtdecorations.la
+twin_plastik_la_METASOURCES = AUTO
-DISTCLEANFILES = $(twin3_plastik_la_METASOURCES)
+DISTCLEANFILES = $(twin_plastik_la_METASOURCES)
diff --git a/twin/clients/plastik/config/config.cpp b/twin/clients/plastik/config/config.cpp
index 04658796c..81192f699 100644
--- a/twin/clients/plastik/config/config.cpp
+++ b/twin/clients/plastik/config/config.cpp
@@ -49,16 +49,16 @@ PlastikConfig::PlastikConfig(TDEConfig* config, TQWidget* parent)
load(config);
// setup the connections
- connect(m_dialog->titleAlign, TQT_SIGNAL(clicked(int)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->animateButtons, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->menuClose, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->titleShadow, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
- connect(m_dialog->coloredBorder, TQT_SIGNAL(toggled(bool)),
- this, TQT_SIGNAL(changed()));
+ connect(m_dialog->titleAlign, TQ_SIGNAL(clicked(int)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->animateButtons, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->menuClose, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->titleShadow, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
+ connect(m_dialog->coloredBorder, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SIGNAL(changed()));
}
PlastikConfig::~PlastikConfig()
diff --git a/twin/clients/plastik/config/config.h b/twin/clients/plastik/config/config.h
index 73231c50f..d83ebf149 100644
--- a/twin/clients/plastik/config/config.h
+++ b/twin/clients/plastik/config/config.h
@@ -32,7 +32,7 @@ class ConfigDialog;
class PlastikConfig : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
PlastikConfig(TDEConfig* config, TQWidget* parent);
~PlastikConfig();
diff --git a/twin/clients/plastik/config/configdialog.ui b/twin/clients/plastik/config/configdialog.ui
index f751d8024..505d91b06 100644
--- a/twin/clients/plastik/config/configdialog.ui
+++ b/twin/clients/plastik/config/configdialog.ui
@@ -66,9 +66,6 @@
<property name="text">
<string>Colored window border</string>
</property>
- <property name="accel">
- <string></string>
- </property>
<property name="whatsThis" stdset="0">
<string>Check this option if the window border should be painted in the titlebar color. Otherwise it will be painted in the background color.</string>
</property>
diff --git a/twin/clients/plastik/misc.cpp b/twin/clients/plastik/misc.cpp
index 1b259d383..053cf15ea 100644
--- a/twin/clients/plastik/misc.cpp
+++ b/twin/clients/plastik/misc.cpp
@@ -54,8 +54,8 @@ TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const i
{
// normal button...
- QRgb rgb = bgColor.rgb();
- QRgb rgb_b = fgColor.rgb();
+ TQRgb rgb = bgColor.rgb();
+ TQRgb rgb_b = fgColor.rgb();
int alpha = a;
if(alpha>255) alpha = 255;
if(alpha<0) alpha = 0;
diff --git a/twin/clients/plastik/plastik.cpp b/twin/clients/plastik/plastik.cpp
index b5cdeb85b..b5a4808d7 100644
--- a/twin/clients/plastik/plastik.cpp
+++ b/twin/clients/plastik/plastik.cpp
@@ -185,9 +185,9 @@ void PlastikHandler::readConfig()
m_titleHeightTool++;
TQString value = config.readEntry("TitleAlignment", "AlignLeft");
- if (value == "AlignLeft") m_titleAlign = Qt::AlignLeft;
- else if (value == "AlignHCenter") m_titleAlign = Qt::AlignHCenter;
- else if (value == "AlignRight") m_titleAlign = Qt::AlignRight;
+ if (value == "AlignLeft") m_titleAlign = TQt::AlignLeft;
+ else if (value == "AlignHCenter") m_titleAlign = TQt::AlignHCenter;
+ else if (value == "AlignRight") m_titleAlign = TQt::AlignRight;
m_coloredBorder = config.readBoolEntry("ColoredBorder", true);
m_animateButtons = config.readBoolEntry("AnimateButtons", true);
@@ -210,27 +210,27 @@ TQColor PlastikHandler::getColor(KWinPlastik::ColorType type, const bool active)
break;
case ShadeTitleLight:
return alphaBlendColors(KDecoration::options()->color(ColorTitleBar, active),
- Qt::white, active?205:215);
+ TQt::white, active?205:215);
break;
case ShadeTitleDark:
return alphaBlendColors(KDecoration::options()->color(ColorTitleBar, active),
- Qt::black, active?205:215);
+ TQt::black, active?205:215);
break;
case Border:
return KDecoration::options()->color(ColorFrame, active);
case TitleFont:
return KDecoration::options()->color(ColorFont, active);
default:
- return Qt::black;
+ return TQt::black;
}
}
-void PlastikHandler::pretile( TQPixmap *&pix, int size, Qt::Orientation dir ) const
+void PlastikHandler::pretile( TQPixmap *&pix, int size, TQt::Orientation dir ) const
{
TQPixmap *newpix;
TQPainter p;
- if ( dir == Qt::Horizontal )
+ if ( dir == TQt::Horizontal )
newpix = new TQPixmap( size, pix->height() );
else
newpix = new TQPixmap( pix->width(), size );
@@ -300,7 +300,7 @@ const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindo
painter.end();
}
- pretile(pm, 64, Qt::Horizontal);
+ pretile(pm, 64, TQt::Horizontal);
break;
}
@@ -399,7 +399,7 @@ const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindo
painter.end();
- pretile(pm, 64, Qt::Vertical);
+ pretile(pm, 64, TQt::Vertical);
break;
}
@@ -433,7 +433,7 @@ const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindo
}
painter.end();
- pretile(pm, 64, Qt::Vertical);
+ pretile(pm, 64, TQt::Vertical);
break;
}
@@ -523,7 +523,7 @@ const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindo
painter.drawPoint(0, h-1);
painter.end();
- pretile(pm, 64, Qt::Horizontal);
+ pretile(pm, 64, TQt::Horizontal);
break;
}
diff --git a/twin/clients/plastik/plastik.desktop b/twin/clients/plastik/plastik.desktop
index cbe609785..564f33e5c 100644
--- a/twin/clients/plastik/plastik.desktop
+++ b/twin/clients/plastik/plastik.desktop
@@ -1,3 +1,3 @@
[Desktop Entry]
Name=Plastik
-X-TDE-Library=twin3_plastik
+X-TDE-Library=twin_plastik
diff --git a/twin/clients/plastik/plastik.h b/twin/clients/plastik/plastik.h
index a4c1bc5b7..558ac848a 100644
--- a/twin/clients/plastik/plastik.h
+++ b/twin/clients/plastik/plastik.h
@@ -73,7 +73,7 @@ enum ButtonIcon {
class PlastikHandler: public TQObject, public KDecorationFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
PlastikHandler();
~PlastikHandler();
@@ -93,7 +93,7 @@ public:
int borderSize() { return m_borderSize; }
bool animateButtons() { return m_animateButtons; }
bool menuClose() { return m_menuClose; }
- TQ_Alignment titleAlign() { return m_titleAlign; }
+ TQt::AlignmentFlags titleAlign() { return m_titleAlign; }
bool reverseLayout() { return m_reverse; }
TQColor getColor(KWinPlastik::ColorType type, const bool active = true);
@@ -101,7 +101,7 @@ public:
private:
void readConfig();
- void pretile(TQPixmap *&pix, int size, Qt::Orientation dir) const;
+ void pretile(TQPixmap *&pix, int size, TQt::Orientation dir) const;
bool m_coloredBorder;
bool m_titleShadow;
@@ -113,7 +113,7 @@ private:
int m_titleHeightTool;
TQFont m_titleFont;
TQFont m_titleFontTool;
- TQ_Alignment m_titleAlign;
+ TQt::AlignmentFlags m_titleAlign;
// pixmap cache
TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state...
diff --git a/twin/clients/plastik/plastikbutton.cpp b/twin/clients/plastik/plastikbutton.cpp
index 3a097be15..3f3f81f62 100644
--- a/twin/clients/plastik/plastikbutton.cpp
+++ b/twin/clients/plastik/plastikbutton.cpp
@@ -51,7 +51,7 @@ PlastikButton::PlastikButton(ButtonType type, PlastikClient *parent, const char
// no need to reset here as the button will be resetted on first resize.
animTmr = new TQTimer(this);
- connect(animTmr, TQT_SIGNAL(timeout() ), this, TQT_SLOT(animate() ) );
+ connect(animTmr, TQ_SIGNAL(timeout() ), this, TQ_SLOT(animate() ) );
animProgress = 0;
}
@@ -170,17 +170,17 @@ void PlastikButton::drawButton(TQPainter *painter)
if(type() == CloseButton) {
highlightColor = TQColor(255,64,0);
} else {
- highlightColor = Qt::white;
+ highlightColor = TQt::white;
}
TQColor contourTop = alphaBlendColors(Handler()->getColor(TitleGradient2, active),
- Qt::black, 215);
+ TQt::black, 215);
TQColor contourBottom = alphaBlendColors(Handler()->getColor(TitleGradient3, active),
- Qt::black, 215);
+ TQt::black, 215);
TQColor sourfaceTop = alphaBlendColors(Handler()->getColor(TitleGradient2, active),
- Qt::white, 210);
+ TQt::white, 210);
TQColor sourfaceBottom = alphaBlendColors(Handler()->getColor(TitleGradient3, active),
- Qt::white, 210);
+ TQt::white, 210);
int highlightAlpha = static_cast<int>(255-((60/static_cast<double>(ANIMATIONSTEPS))*
static_cast<double>(animProgress) ) );
@@ -190,10 +190,10 @@ void PlastikButton::drawButton(TQPainter *painter)
sourfaceBottom = alphaBlendColors(sourfaceBottom, highlightColor, highlightAlpha);
if (isDown() ) {
- contourTop = alphaBlendColors(contourTop, Qt::black, 200);
- contourBottom = alphaBlendColors(contourBottom, Qt::black, 200);
- sourfaceTop = alphaBlendColors(sourfaceTop, Qt::black, 200);
- sourfaceBottom = alphaBlendColors(sourfaceBottom, Qt::black, 200);
+ contourTop = alphaBlendColors(contourTop, TQt::black, 200);
+ contourBottom = alphaBlendColors(contourBottom, TQt::black, 200);
+ sourfaceTop = alphaBlendColors(sourfaceTop, TQt::black, 200);
+ sourfaceBottom = alphaBlendColors(sourfaceBottom, TQt::black, 200);
}
TQPixmap buffer;
@@ -291,10 +291,10 @@ TQBitmap IconEngine::icon(ButtonIcon icon, int size)
--size;
TQBitmap bitmap(size,size);
- bitmap.fill(Qt::color0);
+ bitmap.fill(TQt::color0);
TQPainter p(&bitmap);
- p.setPen(Qt::color1);
+ p.setPen(TQt::color1);
TQRect r = bitmap.rect();
diff --git a/twin/clients/plastik/plastikbutton.h b/twin/clients/plastik/plastikbutton.h
index dbebcf63f..6deaa56f6 100644
--- a/twin/clients/plastik/plastikbutton.h
+++ b/twin/clients/plastik/plastikbutton.h
@@ -37,7 +37,7 @@ class PlastikClient;
class PlastikButton : public KCommonDecorationButton
{
- Q_OBJECT
+ TQ_OBJECT
public:
PlastikButton(ButtonType type, PlastikClient *parent, const char *name);
~PlastikButton();
@@ -65,7 +65,7 @@ private:
/**
* This class creates bitmaps which can be used as icons on buttons. The icons
* are "hardcoded".
- * Over the previous "Gimp->xpm->QImage->recolor->SmoothScale->TQPixmap" solution
+ * Over the previous "Gimp->xpm->TQImage->recolor->SmoothScale->TQPixmap" solution
* it has the important advantage that icons are more scalable and at the same
* time sharp and not blurred.
*/
diff --git a/twin/clients/plastik/plastikclient.cpp b/twin/clients/plastik/plastikclient.cpp
index 31c9e2ad9..bb2c465a6 100644
--- a/twin/clients/plastik/plastikclient.cpp
+++ b/twin/clients/plastik/plastikclient.cpp
@@ -394,7 +394,7 @@ TQRect PlastikClient::captionRect() const
buttonsLeftWidth() - buttonsRightWidth() -
marginLeft - marginRight;
- TQ_Alignment a = Handler()->titleAlign();
+ TQt::AlignmentFlags a = Handler()->titleAlign();
int tX, tW; // position/width of the title buffer
if (caption.width() > titleWidth) {
@@ -402,10 +402,10 @@ TQRect PlastikClient::captionRect() const
} else {
tW = caption.width();
}
- if (a == Qt::AlignLeft || (caption.width() > titleWidth) ) {
+ if (a == TQt::AlignLeft || (caption.width() > titleWidth) ) {
// Align left
tX = titleLeft;
- } else if (a == Qt::AlignHCenter) {
+ } else if (a == TQt::AlignHCenter) {
// Align center
tX = titleLeft+(titleWidth- caption.width() )/2;
} else {