From 21a1d3cffb820b001b0901f8e82d4c8bfc5e1683 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 21:17:46 +0000 Subject: TQt4 port kwin-style-crystal This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kwin-style-crystal@1239032 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- client/crystalclient.h | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) (limited to 'client/crystalclient.h') diff --git a/client/crystalclient.h b/client/crystalclient.h index 12b2bab..403a22f 100644 --- a/client/crystalclient.h +++ b/client/crystalclient.h @@ -27,22 +27,22 @@ #ifndef CRYSTALCLIENT_H #define CRYSTALCLIENT_H -#include +#include #include #include -#include -#include +#include +#include #include -class QSpacerItem; -class QPoint; +class TQSpacerItem; +class TQPoint; class CrystalClient; class CrystalFactory; class CrystalButton; class CrystalTray; -class QImageHolder; +class TQImageHolder; class ButtonImage; extern CrystalFactory *factory; @@ -58,9 +58,9 @@ struct WND_CONFIG double amount; int outlineMode,inlineMode; - QColor frameColor,inlineColor; - QPixmap overlay; - QImage userdefinedPicture; // Userdefined background image, instead of wallpaper + TQColor frameColor,inlineColor; + TQPixmap overlay; + TQImage userdefinedPicture; // Userdefined background image, instead of wallpaper int blur; }; @@ -108,43 +108,44 @@ public: virtual bool supports(Ability ability); static bool initialized() { return initialized_; } - static Qt::AlignmentFlags titleAlign() { return titlealign_; } + static TQt::AlignmentFlags titleAlign() { return titlealign_; } public: - QImageHolder *image_holder; + TQImageHolder *image_holder; - QPixmap logo; + TQPixmap logo; int logoEnabled,logoStretch,logoActive,logoDistance; int titlesize; bool hovereffect,tintButtons,animateHover,menuImage,wheelTask; - QColor buttonColor_normal,buttonColor_hovered,buttonColor_pressed; - QColor minColor_normal,minColor_hovered,minColor_pressed; - QColor maxColor_normal,maxColor_hovered,maxColor_pressed; - QColor closeColor_normal,closeColor_hovered,closeColor_pressed; + TQColor buttonColor_normal,buttonColor_hovered,buttonColor_pressed; + TQColor minColor_normal,minColor_hovered,minColor_pressed; + TQColor maxColor_normal,maxColor_hovered,maxColor_pressed; + TQColor closeColor_normal,closeColor_hovered,closeColor_pressed; int borderwidth; bool drawcaption,textshadow,captiontooltip; bool trackdesktop,transparency; int roundCorners; - int repaintMode,repaintTime; + int tqrepaintMode,tqrepaintTime; WND_CONFIG active,inactive; int buttontheme; ButtonImage *buttonImages[ButtonImageCount]; - QPtrList clients; + TQPtrList clients; private: bool readConfig(); void CreateButtonImages(); private: static bool initialized_; - static Qt::AlignmentFlags titlealign_; + static TQt::AlignmentFlags titlealign_; }; class CrystalClient : public KDecoration { Q_OBJECT + TQ_OBJECT public: CrystalClient(KDecorationBridge *b,CrystalFactory *f); virtual ~CrystalClient(); @@ -159,24 +160,24 @@ public: virtual void shadeChange(); virtual void borders(int &l, int &r, int &t, int &b) const; - virtual void resize(const QSize &size); - virtual QSize minimumSize() const; - virtual Position mousePosition(const QPoint &point) const; + virtual void resize(const TQSize &size); + virtual TQSize tqminimumSize() const; + virtual Position mousePosition(const TQPoint &point) const; void ClientWindows(Window* frame,Window* wrapper,Window* client); private: - CrystalButton* addButtons(QBoxLayout* layout, const QString& buttons); + CrystalButton* addButtons(TQBoxLayout* tqlayout, const TQString& buttons); void updateMask(); int borderSpacing(); void updateLayout(); - bool eventFilter(QObject *obj, QEvent *e); - void mouseDoubleClickEvent(QMouseEvent *e); - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent *); - void moveEvent(QMoveEvent *); - void showEvent(QShowEvent *); - void mouseWheelEvent(QWheelEvent *e); + bool eventFilter(TQObject *obj, TQEvent *e); + void mouseDoubleClickEvent(TQMouseEvent *e); + void paintEvent(TQPaintEvent *e); + void resizeEvent(TQResizeEvent *); + void moveEvent(TQMoveEvent *); + void showEvent(TQShowEvent *); + void mouseWheelEvent(TQWheelEvent *e); private slots: void Repaint(); @@ -193,12 +194,12 @@ private slots: void menuPopUp(); private: CrystalButton *button[ButtonTypeCount]; - QGridLayout *mainlayout; - QHBoxLayout *titlelayout; - QTimer timer; + TQGridLayout *maintqlayout; + TQHBoxLayout *titletqlayout; + TQTimer timer; public: bool FullMax; - QSpacerItem *titlebar_; + TQSpacerItem *titlebar_; }; #endif -- cgit v1.2.1