diff options
Diffstat (limited to 'deco/baghiraclient.h')
-rw-r--r-- | deco/baghiraclient.h | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/deco/baghiraclient.h b/deco/baghiraclient.h index c77ea0d..28c4963 100644 --- a/deco/baghiraclient.h +++ b/deco/baghiraclient.h @@ -27,8 +27,8 @@ #ifndef BAGHIRACLIENT_H #define BAGHIRACLIENT_H -#include <qcolor.h> -#include <qbutton.h> +#include <tqcolor.h> +#include <tqbutton.h> #include <kdecoration.h> #include <kdecorationfactory.h> #include <kpixmap.h> @@ -40,9 +40,9 @@ #define TITLESIZESMALL 18; #define MARGIN 4;*/ -class QSpacerItem; -class QPoint; -class QBitmap; +class TQSpacerItem; +class TQPoint; +class TQBitmap; class KWinModule; namespace Baghira { @@ -106,7 +106,7 @@ enum TitlebarType{ class BaghiraClient; // #if KDE_IS_VERSION(3,3,91) -class ResizeHandle : public QWidget +class ResizeHandle : public TQWidget { //#if KDE_IS_VERSION(3,3,91) friend class BaghiraClient; @@ -115,20 +115,20 @@ friend class BaghiraClient; public: ResizeHandle(BaghiraClient *parent); protected: - virtual void mousePressEvent ( QMouseEvent * ); - virtual void mouseReleaseEvent ( QMouseEvent * ); - virtual void paintEvent ( QPaintEvent * ); + virtual void mousePressEvent ( TQMouseEvent * ); + virtual void mouseReleaseEvent ( TQMouseEvent * ); + virtual void paintEvent ( TQPaintEvent * ); void updateLook(bool rp = FALSE); private: - bool eventFilter(QObject *obj, QEvent *e); + bool eventFilter(TQObject *obj, TQEvent *e); void shape(); BaghiraClient *client; - QPixmap pix; + TQPixmap pix; #endif }; // #endif -class DeMaximizer : public QWidget +class DeMaximizer : public TQWidget { friend class BaghiraClient; friend class BaghiraFactory; @@ -137,14 +137,14 @@ public: DeMaximizer(); void setClient(BaghiraClient *); protected: - void mouseReleaseEvent( QMouseEvent * e ); - void mousePressEvent ( QMouseEvent * e ); - void enterEvent ( QEvent * e ); - void leaveEvent ( QEvent * e ); - void setPixmap(int i, QImage &image); + void mouseReleaseEvent( TQMouseEvent * e ); + void mousePressEvent ( TQMouseEvent * e ); + void enterEvent ( TQEvent * e ); + void leaveEvent ( TQEvent * e ); + void setPixmap(int i, TQImage &image); private: BaghiraClient *client_; - QPixmap pixmap[5]; + TQPixmap pixmap[5]; void setState(int i); }; @@ -157,22 +157,22 @@ public: virtual ~BaghiraFactory(); virtual KDecoration *createDecoration(KDecorationBridge *b); virtual bool reset(unsigned long changed); - virtual QValueList<BorderSize> borderSizes() const; - static QPixmap &ButtonPixmap(Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int current, bool small); - QImage* DecoImage(QPixmap *pix, int x, int y, int width, int height); + virtual TQValueList<BorderSize> borderSizes() const; + static TQPixmap &ButtonPixmap(Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int current, bool small); + TQImage* DecoImage(TQPixmap *pix, int x, int y, int width, int height); - static QBitmap helpMask, jaguarDownMask, jaguarMenuDownMask, + static TQBitmap helpMask, jaguarDownMask, jaguarMenuDownMask, jaguarMenuMask, jaguarMask, milkMenuDownMask, milkMenuMask, milkMask, pantherMenuMask, pantherMask, milkDownMask, arrowUp, arrowDown; static bool initialized(); static bool noModalDeco(); static bool delAppname(); - static QColor &color(int current, Baghira::ColorType c, bool active=true); + static TQColor &color(int current, Baghira::ColorType c, bool active=true); static KPixmap &pix(int current, PixmapType p, bool active=true, bool small=false); static TitlebarType &effect(int current, bool active); static ButtonStyle buttonStyle(int current); - static Qt::AlignmentFlags titleAlign(); + static TQt::AlignmentFlags titleAlign(); static int borderSize(int current); static int contrast(); static int _3DImpact(int current); @@ -193,17 +193,17 @@ public: TitlebarType titleEffect(); static DeMaximizer &deMaximizer(); static bool fullSpec(); - static QColor &BrushedMetalColor(); + static TQColor &BrushedMetalColor(); private: -// bool blend( const QImage & upper, const QImage & lower, QImage & output); +// bool blend( const TQImage & upper, const TQImage & lower, TQImage & output); unsigned long readConfig(); void createPixmaps(); - void createGradient(KPixmap &pix, const QColor &light, const QColor &dark, Baghira::TitlebarType effect); + void createGradient(KPixmap &pix, const TQColor &light, const TQColor &dark, Baghira::TitlebarType effect); void createOS8Buttons(int style); - QString indexedString(QString s, int index); - QImage* tintBrush( const QImage &img, const QColor &c ) const; - QImage* tintGlossy(const QImage &src, const QColor &c ) const; + TQString indexedString(TQString s, int index); + TQImage* tintBrush( const TQImage &img, const TQColor &c ) const; + TQImage* tintGlossy(const TQImage &src, const TQColor &c ) const; private: @@ -220,13 +220,13 @@ private: static bool drawIcon_[5]; static ButtonStyle buttonStyle_[5]; static TitlebarType effect_[5][2]; - static Qt::AlignmentFlags titlealign_; - static QColor colors_[5][ColorTypeCount][2]; + static TQt::AlignmentFlags titlealign_; + static TQColor colors_[5][ColorTypeCount][2]; static KPixmap pix_[5][PixmapTypeCount][2][2]; - static QPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; - static QColor ButtonColor_[ButtonTypeAmount+1]; - static QColor brushedMetalColor; - static QPixmap nostalgia_[5][3][2]; + static TQPixmap ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; + static TQColor ButtonColor_[ButtonTypeAmount+1]; + static TQColor brushedMetalColor; + static TQPixmap nostalgia_[5][3][2]; static int contrast_; static int bordersize_[5]; @@ -237,7 +237,7 @@ private: static bool tintBrush_; static bool showTitle_; - static QColor brushTint; + static TQColor brushTint; static DeMaximizer deMaximizer_; static bool fullSpec_; @@ -304,10 +304,10 @@ inline ButtonStyle BaghiraFactory::buttonStyle(int current) inline bool BaghiraFactory::initialized() { return initialized_; } -inline QColor &BaghiraFactory::BrushedMetalColor() +inline TQColor &BaghiraFactory::BrushedMetalColor() { return brushedMetalColor; } -inline QColor &BaghiraFactory::color(int current, Baghira::ColorType c, bool active) +inline TQColor &BaghiraFactory::color(int current, Baghira::ColorType c, bool active) { return colors_[current][c][active]; } inline KPixmap &BaghiraFactory::pix(int current, PixmapType p, bool active, bool small) @@ -316,7 +316,7 @@ inline KPixmap &BaghiraFactory::pix(int current, PixmapType p, bool active, bool inline Baghira::TitlebarType &BaghiraFactory::effect(int current, bool active) { return effect_[current][active]; } -inline Qt::AlignmentFlags BaghiraFactory::titleAlign() +inline TQt::AlignmentFlags BaghiraFactory::titleAlign() { return titlealign_; } inline int BaghiraFactory::borderSize(int current) @@ -324,29 +324,29 @@ inline int BaghiraFactory::borderSize(int current) // BaghiraButton /////////////////////////////////////////////////////////////// -class BaghiraButton : public QButton +class BaghiraButton : public TQButton { Q_OBJECT public: - BaghiraButton(BaghiraClient *parent=0, const char *name=0, const QString &tip=NULL, bool small=false, ButtonType type=MinButton, int style=0); + BaghiraButton(BaghiraClient *parent=0, const char *name=0, const TQString &tip=NULL, bool small=false, ButtonType type=MinButton, int style=0); ~BaghiraButton(); - QSize sizeHint() const; + TQSize sizeHint() const; int lastMousePress() const; void reset(); - inline void setMasks(QBitmap *bitmask, QBitmap *bitmaskDown); + inline void setMasks(TQBitmap *bitmask, TQBitmap *bitmaskDown); Baghira::ButtonState state(); inline void setType(Baghira::ButtonType type) {type_ = type; } - QBitmap *mask; - QBitmap *maskDown; + TQBitmap *mask; + TQBitmap *maskDown; private: - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); - void drawButton(QPainter *painter); + void enterEvent(TQEvent *e); + void leaveEvent(TQEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); + void drawButton(TQPainter *painter); private slots: void delayedEnterEvent(); @@ -355,8 +355,8 @@ private: bool _blocked; BaghiraClient *client_; ButtonType type_; - QBitmap *deco_; - QPixmap *pixmap[2][5]; + TQBitmap *deco_; + TQPixmap *pixmap[2][5]; KPixmap icon_; bool small_; int lastmouse_; @@ -382,7 +382,7 @@ public: virtual ~BaghiraClient(); virtual void init(); - QString caption() const; + TQString caption() const; virtual void activeChange(); virtual void desktopChange(); @@ -393,9 +393,9 @@ public: void demaxButtonPressed(); 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 minimumSize() const; + virtual Position mousePosition(const TQPoint &point) const; uint currentStyle; signals: @@ -406,14 +406,14 @@ protected: int titleheight_; private: - void addButtons(QBoxLayout* layout, const QString& buttons); + void addButtons(TQBoxLayout* layout, const TQString& buttons); - bool eventFilter(QObject *obj, QEvent *e); - void mouseDoubleClickEvent(QMouseEvent *e); - void wheelEvent(QWheelEvent *e); - void paintEvent(QPaintEvent *); - void resizeEvent(QResizeEvent *); - void showEvent(QShowEvent *); + bool eventFilter(TQObject *obj, TQEvent *e); + void mouseDoubleClickEvent(TQMouseEvent *e); + void wheelEvent(TQWheelEvent *e); + void paintEvent(TQPaintEvent *); + void resizeEvent(TQResizeEvent *); + void showEvent(TQShowEvent *); private slots: void doShape(); @@ -425,8 +425,8 @@ private slots: private: BaghiraButton *button[ButtonTypeAmount]; - QSpacerItem *titlebar_; - QPixmap HandlePix; + TQSpacerItem *titlebar_; + TQPixmap HandlePix; int excursion; // skewness because of unequality of left/right buttons - bad for center aligned titles... int plusminus; bool isFaded; @@ -434,10 +434,10 @@ private: bool rightClose; bool performEasyClose; bool noDeco_; - QHBoxLayout *windowlayout; + TQHBoxLayout *windowlayout; int ICONX, ICONY; ResizeHandle *grip; - QString caption_; + TQString caption_; }; } // namespace Baghira |