diff options
author | Mavridis Philippe <[email protected]> | 2024-03-10 19:56:27 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2024-03-10 20:04:10 +0200 |
commit | db5c38267db65110beb4ad895a1fe38b42d8001f (patch) | |
tree | 66e0eb45b6db27d468589aa56b089408600baf77 /client/polyester.h | |
parent | bf8023245ca81129b27778d9e38f4cbdcdd1dc5b (diff) | |
download | tde-style-polyester-db5c38267db65110beb4ad895a1fe38b42d8001f.tar.gz tde-style-polyester-db5c38267db65110beb4ad895a1fe38b42d8001f.zip |
Port to TQt
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'client/polyester.h')
-rwxr-xr-x | client/polyester.h | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/client/polyester.h b/client/polyester.h index 52535f9..2d12f7f 100755 --- a/client/polyester.h +++ b/client/polyester.h @@ -30,7 +30,7 @@ #ifndef polyester_H #define polyester_H -#include <qbutton.h> +#include <tqbutton.h> #include <kdecoration.h> #include <kdecorationfactory.h> @@ -41,8 +41,8 @@ #define BUTTON_REVGRADIENT 2 #define BUTTON_FLAT 3 -class QSpacerItem; -class QPoint; +class TQSpacerItem; +class TQPoint; namespace polyester { @@ -77,7 +77,7 @@ public: virtual KDecoration *createDecoration(KDecorationBridge *b); virtual bool reset(unsigned long changed); static bool initialized(); - static Qt::AlignmentFlags titleAlign(); + static TQt::AlignmentFlags titleAlign(); static int contrast(); static bool roundedCorners(); static int titleSize(); @@ -85,7 +85,7 @@ public: static bool squareButton(); static int frameSize(); static int roundSize(); - static QFont titleFontTool() { return m_titleFontTool; } + static TQFont titleFontTool() { return m_titleFontTool; } static bool titleShadow(); static int titleBarStyle() { return titleBarStyle_;} static int buttonStyle() { return buttonStyle_;} @@ -100,7 +100,7 @@ private: private: static bool initialized_; - static Qt::AlignmentFlags titlealign_; + static TQt::AlignmentFlags titlealign_; static int contrast_; static bool cornerflags_; static int titlesize_; @@ -111,7 +111,7 @@ private: static int titleBarStyle_; static int buttonStyle_; static int roundsize_; - static QFont m_titleFontTool; + static TQFont m_titleFontTool; static bool titleshadow_; static bool animatebuttons; static bool nomodalbuttons; @@ -122,7 +122,7 @@ private: inline bool polyesterFactory::initialized() { return initialized_; } -inline Qt::AlignmentFlags polyesterFactory::titleAlign() { +inline TQt::AlignmentFlags polyesterFactory::titleAlign() { return titlealign_; } @@ -154,11 +154,11 @@ inline bool polyesterFactory::titleShadow() { // polyesterButton ////////////////////////////////////////////////////////// -class polyesterButton : public QButton { - Q_OBJECT +class polyesterButton : public TQButton { + TQ_OBJECT public: polyesterButton(polyesterClient *parent=0, const char *name=0, - const QString &tip=NULL, + const TQString &tip=NULL, ButtonType type=ButtonHelp, int button_size=18, bool squareButton = true, @@ -167,10 +167,10 @@ public: ~polyesterButton(); void setBitmap(const unsigned char *bitmap); - QSize sizeHint() const; + TQSize sizeHint() const; ButtonState lastMousePress() const; void reset(); - QImage getButtonImage(ButtonType type); + TQImage getButtonImage(ButtonType type); virtual void setOn(bool on); virtual void setDown(bool on); @@ -180,11 +180,11 @@ protected slots: void buttonReleased(); 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); void genButtonPix( bool active ); private: @@ -192,20 +192,20 @@ private: ButtonType type_; int size_; double buttonProportions_; - QBitmap *deco_; - QPixmap *pixmap[2][4]; - QImage *buttonImgActive; - QImage *buttonImgInactive; + TQBitmap *deco_; + TQPixmap *pixmap[2][4]; + TQImage *buttonImgActive; + TQImage *buttonImgInactive; ButtonState lastmouse_; bool buttonImgActive_created; bool buttonImgInactive_created; bool hover_; bool m_clicked; - QTimer *animTmr; + TQTimer *animTmr; uint animProgress; }; -inline Qt::ButtonState polyesterButton::lastMousePress() const { +inline TQt::ButtonState polyesterButton::lastMousePress() const { return lastmouse_; } inline void polyesterButton::reset() { @@ -215,7 +215,7 @@ inline void polyesterButton::reset() { // polyesterClient ////////////////////////////////////////////////////////// class polyesterClient : public KDecoration { - Q_OBJECT + TQ_OBJECT public: polyesterClient(KDecorationBridge *b, KDecorationFactory *f); virtual ~polyesterClient(); @@ -231,37 +231,37 @@ public: 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; - QPixmap getTitleBarTile(bool active) const + TQPixmap getTitleBarTile(bool active) const { return active ? *aTitleBarTile : *iTitleBarTile; } private: - void addButtons(QBoxLayout* layout, const QString& buttons, int buttonSize = 18); - bool eventFilter(QObject *obj, QEvent *e); - void mouseDoubleClickEvent(QMouseEvent *e); - void wheelEvent(QWheelEvent *e); - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent *); - void showEvent(QShowEvent *); + void addButtons(TQBoxLayout* layout, const TQString& buttons, int buttonSize = 18); + bool eventFilter(TQObject *obj, TQEvent *e); + void mouseDoubleClickEvent(TQMouseEvent *e); + void wheelEvent(TQWheelEvent *e); + void paintEvent(TQPaintEvent *e); + void resizeEvent(TQResizeEvent *); + void showEvent(TQShowEvent *); void updateMask(); void _resetLayout(); int frameSize, titleSize, buttonSize; bool roundedCorners; - QVBoxLayout *mainLayout_; - QHBoxLayout *titleLayout_; - QSpacerItem *topSpacer_, + TQVBoxLayout *mainLayout_; + TQHBoxLayout *titleLayout_; + TQSpacerItem *topSpacer_, *titleSpacer_, *leftTitleSpacer_, *rightTitleSpacer_, *decoSpacer_, *leftSpacer_, *rightSpacer_, *bottomSpacer_, *windowSpacer_; - QPixmap *aCaptionBuffer, *iCaptionBuffer; + TQPixmap *aCaptionBuffer, *iCaptionBuffer; private slots: void maxButtonPressed(); @@ -278,16 +278,16 @@ signals: void keepBelowChanged(bool); private: - QPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile; + TQPixmap *aTitleBarTile, *iTitleBarTile, *aTitleBarTopTile, *iTitleBarTopTile; polyesterButton *button[ButtonTypeCount]; - QSpacerItem *titlebar_; + TQSpacerItem *titlebar_; bool pixmaps_created; bool closing; int s_titleHeight; - QFont s_titleFont; + TQFont s_titleFont; int handlebar; bool maskDirty, aDoubleBufferDirty, iDoubleBufferDirty; - QPixmap activeBuff, inactiveBuff; + TQPixmap activeBuff, inactiveBuff; void create_pixmaps(); void delete_pixmaps(); |