summaryrefslogtreecommitdiffstats
path: root/kwin/clients/quartz
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kwin/clients/quartz
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-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/clients/quartz')
-rw-r--r--kwin/clients/quartz/config/config.cpp24
-rw-r--r--kwin/clients/quartz/config/config.h12
-rw-r--r--kwin/clients/quartz/quartz.cpp76
-rw-r--r--kwin/clients/quartz/quartz.h20
4 files changed, 66 insertions, 66 deletions
diff --git a/kwin/clients/quartz/config/config.cpp b/kwin/clients/quartz/config/config.cpp
index 8c7070b9d..d15eb4da1 100644
--- a/kwin/clients/quartz/config/config.cpp
+++ b/kwin/clients/quartz/config/config.cpp
@@ -9,13 +9,13 @@
#include "config.h"
#include <kglobal.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new QuartzConfig(conf, parent));
}
@@ -26,31 +26,31 @@ extern "C"
* 'conf' is a pointer to the kwindecoration modules open kwin config,
* and is by default set to the "Style" group.
*
- * 'parent' is the parent of the QObject, which is a VBox inside the
+ * 'parent' is the parent of the TQObject, which is a VBox inside the
* Configure tab in kwindecoration
*/
-QuartzConfig::QuartzConfig( KConfig* conf, QWidget* parent )
- : QObject( parent )
+QuartzConfig::QuartzConfig( KConfig* conf, TQWidget* parent )
+ : TQObject( parent )
{
quartzConfig = new KConfig("kwinquartzrc");
KGlobal::locale()->insertCatalogue("kwin_clients");
- gb = new QVBox( parent );
- cbColorBorder = new QCheckBox(
+ gb = new TQVBox( parent );
+ cbColorBorder = new TQCheckBox(
i18n("Draw window frames using &titlebar colors"), gb );
- QWhatsThis::add( cbColorBorder,
+ TQWhatsThis::add( cbColorBorder,
i18n("When selected, the window decoration borders "
"are drawn using the titlebar colors; otherwise, they are "
"drawn using normal border colors instead.") );
- cbExtraSmall = new QCheckBox( i18n("Quartz &extra slim"), gb );
- QWhatsThis::add( cbExtraSmall,
+ cbExtraSmall = new TQCheckBox( i18n("Quartz &extra slim"), gb );
+ TQWhatsThis::add( cbExtraSmall,
i18n("Quartz window decorations with extra-small title bar.") );
// Load configuration options
load( conf );
// Ensure we track user changes properly
- connect( cbColorBorder, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) );
- connect( cbExtraSmall, SIGNAL(clicked()), this, SLOT(slotSelectionChanged()) );
+ connect( cbColorBorder, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
+ connect( cbExtraSmall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) );
// Make the widgets visible in kwindecoration
gb->show();
diff --git a/kwin/clients/quartz/config/config.h b/kwin/clients/quartz/config/config.h
index 815cc9644..0a952c4e9 100644
--- a/kwin/clients/quartz/config/config.h
+++ b/kwin/clients/quartz/config/config.h
@@ -10,8 +10,8 @@
#ifndef __KDE_QUARTZCONFIG_H
#define __KDE_QUARTZCONFIG_H
-#include <qcheckbox.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
#include <kconfig.h>
class QuartzConfig: public QObject
@@ -19,7 +19,7 @@ class QuartzConfig: public QObject
Q_OBJECT
public:
- QuartzConfig( KConfig* conf, QWidget* parent );
+ QuartzConfig( KConfig* conf, TQWidget* parent );
~QuartzConfig();
// These public signals/slots work similar to KCM modules
@@ -36,9 +36,9 @@ class QuartzConfig: public QObject
private:
KConfig* quartzConfig;
- QCheckBox* cbColorBorder;
- QCheckBox* cbExtraSmall;
- QVBox* gb;
+ TQCheckBox* cbColorBorder;
+ TQCheckBox* cbExtraSmall;
+ TQVBox* gb;
};
diff --git a/kwin/clients/quartz/quartz.cpp b/kwin/clients/quartz/quartz.cpp
index 857971780..82caabb45 100644
--- a/kwin/clients/quartz/quartz.cpp
+++ b/kwin/clients/quartz/quartz.cpp
@@ -19,10 +19,10 @@
#include <kglobal.h>
#include <klocale.h>
#include <kpixmapeffect.h>
-#include <qbitmap.h>
-#include <qdrawutil.h>
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
+#include <tqimage.h>
+#include <tqapplication.h>
#include "quartz.h"
@@ -208,7 +208,7 @@ void QuartzHandler::readConfig()
// A small hack to make the on all desktops button look nicer
onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().contains( 'S' );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
onAllDesktopsButtonOnLeft = !onAllDesktopsButtonOnLeft;
switch(options()->preferredBorderSize(this)) {
case BorderLarge:
@@ -232,13 +232,13 @@ void QuartzHandler::readConfig()
borderWidth = extraSlim?2:4;
}
- normalTitleHeight = QFontMetrics(options()->font(true)).height();
+ normalTitleHeight = TQFontMetrics(options()->font(true)).height();
int nTH_limit=extraSlim?14:18;
- normalTitleHeight = QFontMetrics(options()->font(true)).height()-(extraSlim?1:0);
+ normalTitleHeight = TQFontMetrics(options()->font(true)).height()-(extraSlim?1:0);
if (normalTitleHeight < nTH_limit) normalTitleHeight = nTH_limit;
if (normalTitleHeight < borderWidth) normalTitleHeight = borderWidth;
- toolTitleHeight = QFontMetrics(options()->font(true, true)).height();
+ toolTitleHeight = TQFontMetrics(options()->font(true, true)).height();
if (toolTitleHeight < 12) toolTitleHeight = 12;
if (toolTitleHeight < borderWidth) toolTitleHeight = borderWidth;
}
@@ -246,9 +246,9 @@ void QuartzHandler::readConfig()
// This does the colour transition magic. (You say "Oh, is that it?")
// This may be made configurable at a later stage
-void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const QColor &c1, const QColor &c2 )
+void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const TQColor &c1, const TQColor &c2 )
{
- QPainter px;
+ TQPainter px;
px.begin( pi );
@@ -291,10 +291,10 @@ void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const QColor &c1, const
void QuartzHandler::createPixmaps()
{
// Obtain titlebar blend colours, and create the block stuff on pixmaps.
- QColorGroup g2 = options()->colorGroup(ColorTitleBlend, true);
- QColor c2 = g2.background();
+ TQColorGroup g2 = options()->colorGroup(ColorTitleBlend, true);
+ TQColor c2 = g2.background();
g2 = options()->colorGroup(ColorTitleBar, true );
- QColor c = g2.background().light(130);
+ TQColor c = g2.background().light(130);
titleBlocks = new KPixmap();
titleBlocks->resize( normalTitleHeight*25/18, normalTitleHeight );
@@ -310,8 +310,8 @@ void QuartzHandler::createPixmaps()
drawBlocks( ititleBlocks, *ititleBlocks, c, c2 );
// Set the on all desktops pin pixmaps;
- QColorGroup g;
- QPainter p;
+ TQColorGroup g;
+ TQPainter p;
g = options()->colorGroup( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, true );
c = onAllDesktopsButtonOnLeft ? g.background().light(130) : g.background();
@@ -370,9 +370,9 @@ void QuartzHandler::freePixmaps()
}
-QValueList< QuartzHandler::BorderSize > QuartzHandler::borderSizes() const
+TQValueList< QuartzHandler::BorderSize > QuartzHandler::borderSizes() const
{ // the list must be sorted
- return QValueList< BorderSize >() << BorderNormal << BorderLarge <<
+ return TQValueList< BorderSize >() << BorderNormal << BorderLarge <<
BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized;
}
@@ -381,7 +381,7 @@ QuartzButton::QuartzButton(ButtonType type, QuartzClient *parent, const char *na
: KCommonDecorationButton(type, parent, name)
{
// Eliminate any possible background flicker
- setBackgroundMode( QWidget::NoBackground );
+ setBackgroundMode( TQWidget::NoBackground );
deco = 0;
}
@@ -435,19 +435,19 @@ void QuartzButton::setBitmap(const unsigned char *bitmap)
deco = 0;
if (bitmap) {
- deco = new QBitmap(10, 10, bitmap, true);
+ deco = new TQBitmap(10, 10, bitmap, true);
deco->setMask( *deco );
repaint( false );
}
}
-void QuartzButton::drawButton(QPainter *p)
+void QuartzButton::drawButton(TQPainter *p)
{
// Never paint if the pixmaps have not been created
if (!quartz_initialized)
return;
- QColor c;
+ TQColor c;
if (isLeft() )
c = KDecoration::options()->color(KDecoration::ColorTitleBar, decoration()->isActive()).light(130);
@@ -469,7 +469,7 @@ void QuartzButton::drawButton(QPainter *p)
p->drawPixmap(isDown() ? xOff+1: xOff, isDown() ? yOff+1 : yOff, *deco);
} else
{
- QPixmap btnpix;
+ TQPixmap btnpix;
int Offset = 0;
if (type() == OnAllDesktopsButton)
@@ -484,12 +484,12 @@ void QuartzButton::drawButton(QPainter *p)
btnpix = isOn() ? *ipinDownPix : *ipinUpPix;
} else
- btnpix = decoration()->icon().pixmap( QIconSet::Small, QIconSet::Normal);
+ btnpix = decoration()->icon().pixmap( TQIconSet::Small, TQIconSet::Normal);
// Shrink the miniIcon for tiny titlebars.
if ( height() < 16)
{
- QPixmap tmpPix;
+ TQPixmap tmpPix;
// Smooth scale the image
tmpPix.convertFromImage( btnpix.convertToImage().smoothScale(height(), height()));
@@ -508,17 +508,17 @@ QuartzClient::QuartzClient(KDecorationBridge* bridge, KDecorationFactory* factor
{
}
-QString QuartzClient::visibleName() const
+TQString QuartzClient::visibleName() const
{
return i18n("Quartz");
}
-QString QuartzClient::defaultButtonsLeft() const
+TQString QuartzClient::defaultButtonsLeft() const
{
return "M";
}
-QString QuartzClient::defaultButtonsRight() const
+TQString QuartzClient::defaultButtonsRight() const
{
return "HIAX";
}
@@ -652,7 +652,7 @@ void QuartzClient::reset( unsigned long changed )
// Quartz Paint magic goes here.
-void QuartzClient::paintEvent( QPaintEvent* )
+void QuartzClient::paintEvent( TQPaintEvent* )
{
// Never paint if the pixmaps have not been created
if (!quartz_initialized)
@@ -660,11 +660,11 @@ void QuartzClient::paintEvent( QPaintEvent* )
const bool maxFull = (maximizeMode()==MaximizeFull) && !options()->moveResizeMaximizedWindows();
- QColorGroup g;
- QPainter p(widget());
+ TQColorGroup g;
+ TQPainter p(widget());
// Obtain widget bounds.
- QRect r(widget()->rect());
+ TQRect r(widget()->rect());
int x = r.x();
int y = r.y();
int x2 = r.width() - 1;
@@ -688,7 +688,7 @@ void QuartzClient::paintEvent( QPaintEvent* )
p.drawLine( x, y2, x2, y2 );
// Fill out the border edges
- QColor frameColor;
+ TQColor frameColor;
if ( coloredFrame)
frameColor = g.background().light(130);
else
@@ -730,19 +730,19 @@ void QuartzClient::paintEvent( QPaintEvent* )
const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom);
const int ttlHeight = layoutMetric(LM_TitleHeight);
const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1;
- r = QRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
+ r = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop,
r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()),
titleEdgeBottomBottom-(r_y+titleEdgeTop) );
// Obtain titlebar blend colours
- QColor c1 = options()->color(ColorTitleBar, isActive() ).light(130);
- QColor c2 = options()->color(ColorTitleBlend, isActive() );
+ TQColor c1 = options()->color(ColorTitleBar, isActive() ).light(130);
+ TQColor c2 = options()->color(ColorTitleBlend, isActive() );
// Create a disposable pixmap buffer for the titlebar
KPixmap* titleBuffer = new KPixmap;
titleBuffer->resize( maxFull?w-2:(w-2*(borderSize-1)), titleHeight );
- QPainter p2( titleBuffer, this );
+ TQPainter p2( titleBuffer, this );
// subtract titleBlocks pixmap width and some
int rightoffset = r.x()+r.width()-titleBlocks->width()-borderSize;
@@ -758,12 +758,12 @@ void QuartzClient::paintEvent( QPaintEvent* )
// Draw the title text on the pixmap, and with a smaller font
// for toolwindows than the default.
- QFont fnt;
+ TQFont fnt;
if ( largeButtons ) {
fnt = options()->font(true, false); // font not small
} else {
fnt = options()->font(true, true); // font small
- fnt.setWeight( QFont::Normal ); // and disable bold
+ fnt.setWeight( TQFont::Normal ); // and disable bold
}
p2.setFont( fnt );
diff --git a/kwin/clients/quartz/quartz.h b/kwin/clients/quartz/quartz.h
index 37f3dff6e..1133a7ae4 100644
--- a/kwin/clients/quartz/quartz.h
+++ b/kwin/clients/quartz/quartz.h
@@ -16,7 +16,7 @@
#ifndef __KDEGALLIUM_QUARTZ_H
#define __KDEGALLIUM_QUARTZ_H
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kpixmap.h>
#include "../../lib/kcommondecoration.h"
#include "../../lib/kdecorationfactory.h"
@@ -28,7 +28,7 @@ namespace Quartz {
class QuartzClient;
-class QuartzHandler: public QObject, public KDecorationFactory
+class QuartzHandler: public TQObject, public KDecorationFactory
{
Q_OBJECT
public:
@@ -38,13 +38,13 @@ class QuartzHandler: public QObject, public KDecorationFactory
virtual KDecoration* createDecoration( KDecorationBridge* );
virtual bool reset(unsigned long changed);
virtual bool supports( Ability ability );
- virtual QValueList< BorderSize > borderSizes() const;
+ virtual TQValueList< BorderSize > borderSizes() const;
private:
void readConfig();
void createPixmaps();
void freePixmaps();
- void drawBlocks(KPixmap* pi, KPixmap &p, const QColor &c1, const QColor &c2);
+ void drawBlocks(KPixmap* pi, KPixmap &p, const TQColor &c1, const TQColor &c2);
};
@@ -58,9 +58,9 @@ class QuartzButton : public KCommonDecorationButton
void reset(unsigned long changed);
protected:
- void drawButton(QPainter *p);
+ void drawButton(TQPainter *p);
- QBitmap* deco;
+ TQBitmap* deco;
};
@@ -70,9 +70,9 @@ class QuartzClient : public KCommonDecoration
QuartzClient(KDecorationBridge* bridge, KDecorationFactory* factory);
~QuartzClient() {;}
- virtual QString visibleName() const;
- virtual QString defaultButtonsLeft() const;
- virtual QString defaultButtonsRight() const;
+ virtual TQString visibleName() const;
+ virtual TQString defaultButtonsLeft() const;
+ virtual TQString defaultButtonsRight() const;
virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
virtual KCommonDecorationButton *createButton(ButtonType type);
@@ -81,7 +81,7 @@ class QuartzClient : public KCommonDecoration
protected:
virtual void reset( unsigned long changed );
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
private:
int titleHeight, borderSize;