diff options
Diffstat (limited to 'style/baghira.h')
-rw-r--r-- | style/baghira.h | 300 |
1 files changed, 150 insertions, 150 deletions
diff --git a/style/baghira.h b/style/baghira.h index 1336ac2..adbe60d 100644 --- a/style/baghira.h +++ b/style/baghira.h @@ -1,32 +1,32 @@ #ifndef __LIQUID_STYLE_H #define __LIQUID_STYLE_H -#include <qcstring.h> -#include <qdir.h> -#include <qintdict.h> -#include <qprogressbar.h> -#include <qtimer.h> -#include <qwmatrix.h> +#include <tqcstring.h> +#include <tqdir.h> +#include <tqintdict.h> +#include <tqprogressbar.h> +#include <tqtimer.h> +#include <tqwmatrix.h> #include <kpixmap.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kstyle.h> // #define BITMAP_ITEMS 75 // Don't worry, they're demand loaded ;-) #define LIQUID_MENU_CHANGE 667 #define MOSFET_BUTTON_CHANGE 661 -class QColor; -class QHeader; -class QImage; -class QMenuBar; -class QPalette; -class QPoint; -class QPushButton; -class QRect; -class QScrollBar; -class QSize; -class QString; -class QTabBar; +class TQColor; +class TQHeader; +class TQImage; +class TQMenuBar; +class TQPalette; +class TQPoint; +class TQPushButton; +class TQRect; +class TQScrollBar; +class TQSize; +class TQString; +class TQTabBar; class LiquidStyle; enum BitmapData{RadioOn = 0, RadioOff, RadioOnHover, RadioOffHover, RadioOnPressed, RadioOffPressed, @@ -80,32 +80,32 @@ class ButtonTile for ( int i = 0;i < 9;++i ) if ( pixmaps[ i ] ) delete pixmaps[ i ]; } - QPixmap* pixmap( Tile pos ) + TQPixmap* pixmap( Tile pos ) { return ( pixmaps[ ( int ) pos ] ); } - void setPixmap( Tile pos, QPixmap *pix ) + void setPixmap( Tile pos, TQPixmap *pix ) { pixmaps[ ( int ) pos ] = pix; } protected: - QPixmap *pixmaps[ 9 ]; + TQPixmap *pixmaps[ 9 ]; }; -class OptionHandler : public QObject +class OptionHandler : public TQObject { Q_OBJECT public: - OptionHandler( QObject *parent ); + OptionHandler( TQObject *parent ); void reloadSettings(); inline static bool useShadowText() { return ( shadowText ); } - const QColor& textColor(); - const QColor& bgColor(); - const QColor& buttonColor(); + const TQColor& textColor(); + const TQColor& bgColor(); + const TQColor& buttonColor(); static int custCols[8]; inline void reset() @@ -123,17 +123,17 @@ public: return (drawMenuStripe_); } - inline static QColor menuStripeColor() + inline static TQColor menuStripeColor() { return menuStripeColor_; } - inline static QColor textColorHigh() + inline static TQColor textColorHigh() { return fgColorHigh; } - inline static QColor menuColorHigh() + inline static TQColor menuColorHigh() { return colorHigh; } @@ -167,7 +167,7 @@ public: { return ( customWidgetColor ); } - inline static const QColor& customColor( int idx ) + inline static const TQColor& customColor( int idx ) { return ( customColors[ idx ] ); } @@ -224,19 +224,19 @@ public: { return (useCustomExpanderColor); } - inline static QColor CustomExpanderColor() + inline static TQColor CustomExpanderColor() { return (expanderColor); } - inline static QColor DotlineColor() + inline static TQColor DotlineColor() { return (dotlineColor); } - inline QColor InactiveButtonColor() + inline TQColor InactiveButtonColor() { switch (inactiveButtonColor) { - case 0 : return (QColor(232,232,232)); + case 0 : return (TQColor(232,232,232)); case 1 : return (bgColor()); case 2 : return (buttonColor()); case 3 : return (customInactiveButtonColor); @@ -310,12 +310,12 @@ public: return scrollerActive; } - inline static QColor Color() + inline static TQColor Color() { return color; } - inline static QColor Color2() + inline static TQColor Color2() { return color2; } @@ -330,7 +330,7 @@ public: return tabStyle_; } - inline static QColor & BrushTint() + inline static TQColor & BrushTint() { return brushTint; } @@ -348,7 +348,7 @@ public: { return animateProgress; } - inline static QColor CustomButtonColor() + inline static TQColor CustomButtonColor() { return customButtonColor; } @@ -358,28 +358,28 @@ public: return animateButton; } - inline static QColor aDecoColor1() + inline static TQColor aDecoColor1() { return aDecoColor1_; } - inline static QColor aDecoColor2() + inline static TQColor aDecoColor2() { return aDecoColor2_; } - inline static QColor titleColor( int i ) + inline static TQColor titleColor( int i ) { return titleColor_[i]; } - inline static QColor titleButtonColor( int i ) + inline static TQColor titleButtonColor( int i ) { return titleButtonColor_[i]; } - QMenuBar *currentMenu; - QPixmap *indicatedMenuItemPix; - QRect *indicatedMenuItemRect; - QPixmap *lastIndicatedMenuItemPix; - QRect *lastIndicatedMenuItemRect; + TQMenuBar *currentMenu; + TQPixmap *indicatedMenuItemPix; + TQRect *indicatedMenuItemRect; + TQPixmap *lastIndicatedMenuItemPix; + TQRect *lastIndicatedMenuItemRect; bool mouseOverMenu; WId lastIndicatedMenuItemID; static unsigned long wmDesign; @@ -388,12 +388,12 @@ public: public slots: inline void warningSlot() { - qWarning("widget destroyed"); + tqWarning("widget destroyed"); } protected: - static QColor titleColor_[2]; - static QColor titleButtonColor_[3]; + static TQColor titleColor_[2]; + static TQColor titleButtonColor_[3]; // menu static int menuBackground; @@ -402,19 +402,19 @@ protected: static bool animateButton; static bool shadowText; static bool drawMenuStripe_; - static QColor menuStripeColor_; + static TQColor menuStripeColor_; static bool glossyMenus_; //color - static QColor customButtonColor; + static TQColor customButtonColor; //widgets static bool customWidgetColor; - static QColor customColors[ 10 ]; + static TQColor customColors[ 10 ]; //menu static bool useCustomMenuColor; - static QColor color, color2, colorHigh, fgColor, fgColorHigh; + static TQColor color, color2, colorHigh, fgColor, fgColorHigh; //incativeButton static int inactiveButtonColor; - static QColor customInactiveButtonColor; + static TQColor customInactiveButtonColor; //Design //stipples @@ -427,7 +427,7 @@ protected: //istviews; static bool drawDotlines, useCustomExpanderColor; static int expanderStyle; - static QColor expanderColor, dotlineColor; + static TQColor expanderColor, dotlineColor; static int dotlineStyle; //slider static bool squeezesbslider; @@ -450,31 +450,31 @@ protected: static bool drawProgressLabel; static tabStyle tabStyle_; - QString colorStr, fgColorStr/*, panelColorStr*/; - static QColor brushTint; - static QColor aDecoColor1_; - static QColor aDecoColor2_; + TQString colorStr, fgColorStr/*, panelColorStr*/; + static TQColor brushTint; + static TQColor aDecoColor1_; + static TQColor aDecoColor2_; static bool tintBrush; static bool animateSlider; static bool animateProgress; }; -class EventKiller : public QObject +class EventKiller : public TQObject { Q_OBJECT public: - bool eventFilter( QObject *, QEvent *) + bool eventFilter( TQObject *, TQEvent *) { return TRUE; } }; -class BMShower : public QObject +class BMShower : public TQObject { Q_OBJECT public: - BMShower(QObject *parent); - bool eventFilter( QObject *object, QEvent *event ); + BMShower(TQObject *parent); + bool eventFilter( TQObject *object, TQEvent *event ); }; class ButtonFadeInfo @@ -499,96 +499,96 @@ public: virtual ~LiquidStyle(); bool isPlain() const; - virtual void polish( QWidget *w ); -// virtual void polishPopupMenu( QPopupMenu *w ); - virtual void unPolish( QWidget *w ); - virtual void polish( QPalette &p ); - virtual void unPolish( QApplication *a ); - int styleHint(StyleHint sh, const QWidget * w, const QStyleOption & opt, QStyleHintReturn * shr) const; - void drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, const QWidget* widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; - void drawPrimitive( PrimitiveElement pe, QPainter* p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; - void drawControl( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; -// void drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; - void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, const QStyleOption& = QStyleOption::Default ) const; -// void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; - - int pixelMetric( PixelMetric m, const QWidget *widget = 0 ) const; - - QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentSize, const QStyleOption& opt ) const; - QRect subRect( SubRect r, const QWidget *widget ) const; - QRect querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &opt = QStyleOption::Default ) const; - // Fix Qt3's wacky image positions - QPixmap stylePixmap( StylePixmap stylepixmap, const QWidget *widget = 0, const QStyleOption& = QStyleOption::Default ) const; - bool eventFilter( QObject *object, QEvent *event ); + virtual void polish( TQWidget *w ); +// virtual void polishPopupMenu( TQPopupMenu *w ); + virtual void unPolish( TQWidget *w ); + virtual void polish( TQPalette &p ); + virtual void unPolish( TQApplication *a ); + int styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * shr) const; + void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; + void drawPrimitive( PrimitiveElement pe, TQPainter* p, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; + void drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; +// void drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; + void drawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; +// void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; + + int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; + + TQSize sizeFromContents( ContentsType contents, const TQWidget *widget, const TQSize &contentSize, const TQStyleOption& opt ) const; + TQRect subRect( SubRect r, const TQWidget *widget ) const; + TQRect querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl subcontrol, const TQStyleOption &opt = TQStyleOption::Default ) const; + // Fix TQt3's wacky image positions + TQPixmap stylePixmap( StylePixmap stylepixmap, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default ) const; + bool eventFilter( TQObject *object, TQEvent *event ); private slots: void updateProgressPos(); void updateSliderPos(); - void progressBarDestroyed(QObject*); + void progressBarDestroyed(TQObject*); void fakeMouse(); protected: - void clearImage( QImage &img ) const; - ButtonTile* createButtonTile( const QColor &c, const QColor &bgColor, QImage *buttonImage, QImage *shadowImage, QImage *glowImage, QIntDict <ButtonTile>*buttonDict, QIntDict<ButtonTile>*shadowDict, QIntDict<ButtonTile>*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; - ButtonTile* createRoundFrameTile(QImage &img, const QColor &color, const QColor *bg, const QColor &baseColor ) const; - QPixmap* createSliderEnd( const QColor &c, const QColor &bgColor, bool top/*, bool vertical*/ ) const; - ButtonTile* separateTiles( QPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; + void clearImage( TQImage &img ) const; + ButtonTile* createButtonTile( const TQColor &c, const TQColor &bgColor, TQImage *buttonImage, TQImage *shadowImage, TQImage *glowImage, TQIntDict <ButtonTile>*buttonDict, TQIntDict<ButtonTile>*shadowDict, TQIntDict<ButtonTile>*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; + ButtonTile* createRoundFrameTile(TQImage &img, const TQColor &color, const TQColor *bg, const TQColor &baseColor ) const; + TQPixmap* createSliderEnd( const TQColor &c, const TQColor &bgColor, bool top/*, bool vertical*/ ) const; + ButtonTile* separateTiles( TQPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; - QPixmap* getPixmap( BitmapData item ) const; - QPixmap* adjustHSV( QImage &img, const QColor &c, const QColor *bg = NULL ) const; - QImage* adjustHSVImage( QImage &img, const QColor &c, const QColor *bg = NULL ) const; - void adjustHSV( QPixmap &pix, const QColor &c ) const; - QImage* tintBrush( const QImage &img, const QColor &c ) const; - QPixmap* processEmbedded( const char *label, const QColor &c, bool blend = false, const QColor *bg = NULL ) const; - void drawRoundButton( QPainter *p, const QColorGroup &cg, const QColor &c, /*const QColor &bg,*/ int x, int y, int w, int h, bool pushedDown = false, bool hover = false, int bgX = -1, int bgY = -1) const; - void drawRectangularButton( QPainter *p, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool sunken = false, bool hover = false, bool isCombo = false, int position = full, bool isHtml = false) const; - void drawCombo( QPainter *painter, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position = full, bool isHTML = false ) const; - void drawEditFrame( QPainter *p, const QRect &r, const QColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = false*/ ) const; - void drawRoundFrame( QPainter *p, const QRect &r, const QColorGroup &cg, bool focused, QPoint offset ) const; - void drawHTMLCBBorder( const QPixmap &pix, const QColor &c ) const; - bool isHTMLWidget( const QWidget *w ) const; + TQPixmap* getPixmap( BitmapData item ) const; + TQPixmap* adjustHSV( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const; + TQImage* adjustHSVImage( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const; + void adjustHSV( TQPixmap &pix, const TQColor &c ) const; + TQImage* tintBrush( const TQImage &img, const TQColor &c ) const; + TQPixmap* processEmbedded( const char *label, const TQColor &c, bool blend = false, const TQColor *bg = NULL ) const; + void drawRoundButton( TQPainter *p, const TQColorGroup &cg, const TQColor &c, /*const TQColor &bg,*/ int x, int y, int w, int h, bool pushedDown = false, bool hover = false, int bgX = -1, int bgY = -1) const; + void drawRectangularButton( TQPainter *p, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool sunken = false, bool hover = false, bool isCombo = false, int position = full, bool isHtml = false) const; + void drawCombo( TQPainter *painter, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position = full, bool isHTML = false ) const; + void drawEditFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = false*/ ) const; + void drawRoundFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool focused, TQPoint offset ) const; + void drawHTMLCBBorder( const TQPixmap &pix, const TQColor &c ) const; + bool isHTMLWidget( const TQWidget *w ) const; private: LiquidStyle( const LiquidStyle & ); LiquidStyle& operator=( const LiquidStyle & ); int getBrightness(unsigned int rgb) const; - QImage fetchImage( const char *name ); - QColor mapFadeColor(QColor &color, int index) const; - void fadeIn(QPushButton *button); - void fadeOut(QPushButton *button); - QColor brushedMetalColor(QColor &c) const; - QColor originalBgColor; + TQImage fetchImage( const char *name ); + TQColor mapFadeColor(TQColor &color, int index) const; + void fadeIn(TQPushButton *button); + void fadeOut(TQPushButton *button); + TQColor brushedMetalColor(TQColor &c) const; + TQColor originalBgColor; - QBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; - QImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; - QPixmap *btnBlendPix, *menuPix, *groupShadow ; - QPixmap plainBrush, gradBrush; - QBrush pagerBrush, pagerHoverBrush; - - QPixmap *pixmaps[ BITMAP_ITEMS ]; - QPixmap sbBuffer; - QScrollBar *currentScrollBar; - QWMatrix lMatrix; - QWMatrix rMatrix; - QWMatrix iMatrix; - QWMatrix mMatrix; - QWMatrix m2Matrix; + TQBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; + TQImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; + TQPixmap *btnBlendPix, *menuPix, *groupShadow ; + TQPixmap plainBrush, gradBrush; + TQBrush pagerBrush, pagerHoverBrush; + + TQPixmap *pixmaps[ BITMAP_ITEMS ]; + TQPixmap sbBuffer; + TQScrollBar *currentScrollBar; + TQWMatrix lMatrix; + TQWMatrix rMatrix; + TQWMatrix iMatrix; + TQWMatrix mMatrix; + TQWMatrix m2Matrix; bool isKicker, isOOO, isHTMLButton, initialPaletteLoaded, inExitPolish; - QHeader *currentHeader; - QTabBar *currentTabBar; + TQHeader *currentHeader; + TQTabBar *currentTabBar; int headerHoverID; int headerSortID; - QPoint btnOffset; - QPoint cursorPos_; - QWidget *currentTaskContainer; + TQPoint btnOffset; + TQPoint cursorPos_; + TQWidget *currentTaskContainer; KPixmap activeToolbarPix; bool isTaskContainer, taskContainerHover; - QPalette polishedPalette, tooltipPalette; + TQPalette polishedPalette, tooltipPalette; unsigned int qtrcModificationTime; int progAnimShift; @@ -599,29 +599,29 @@ private: OptionHandler *optionHandler; - QIntDict<ButtonTile>btnDict; - QIntDict<ButtonFadeInfo>bfi; - QIntDict<QRgb*>fadeColorMap; - QIntDict<ButtonTile>btnShadowedDict; - QIntDict<ButtonTile>buttonGlowDict; - QIntDict<ButtonTile>comboDict; - QIntDict<ButtonTile>comboShadowedDict; - QIntDict<ButtonTile>tabDict; - QIntDict<ButtonTile>inverseTabDict; - QIntDict<ButtonTile>rectBtnDict; - QIntDict<ButtonTile>progress2Dict; - QMap<QWidget*, int> progAnimWidgets; - - QPixmap *tmpBtnPix; + TQIntDict<ButtonTile>btnDict; + TQIntDict<ButtonFadeInfo>bfi; + TQIntDict<TQRgb*>fadeColorMap; + TQIntDict<ButtonTile>btnShadowedDict; + TQIntDict<ButtonTile>buttonGlowDict; + TQIntDict<ButtonTile>comboDict; + TQIntDict<ButtonTile>comboShadowedDict; + TQIntDict<ButtonTile>tabDict; + TQIntDict<ButtonTile>inverseTabDict; + TQIntDict<ButtonTile>rectBtnDict; + TQIntDict<ButtonTile>progress2Dict; + TQMap<TQWidget*, int> progAnimWidgets; + + TQPixmap *tmpBtnPix; ButtonTile *inactiveRoundFrame; ButtonTile *activeRoundFrame; - QWidget *highlightWidget; - QScrollBar *activeScroller; + TQWidget *highlightWidget; + TQScrollBar *activeScroller; EventKiller *eventKiller; BMShower *bmShower; - static QPixmap popupBack; - QWidget *paintWidget; + static TQPixmap popupBack; + TQWidget *paintWidget; }; #endif |