diff options
Diffstat (limited to 'style/baghira.h')
-rw-r--r-- | style/baghira.h | 146 |
1 files changed, 102 insertions, 44 deletions
diff --git a/style/baghira.h b/style/baghira.h index 340738a..e0ee8a5 100644 --- a/style/baghira.h +++ b/style/baghira.h @@ -107,7 +107,7 @@ public: const TQColor& bgColor(); const TQColor& buttonColor(); static int custCols[8]; - + inline void reset() { menusProcessed = false; @@ -154,7 +154,7 @@ public: { return ( contrast ); } - inline static bool useReverseBtnColor() + inline static bool useReverseBtnColor() { return ( reverseBtnColor ); } @@ -256,7 +256,7 @@ public: { return smootherLVH; } - + inline static bool IcyButtons() { return icyButtons; @@ -319,27 +319,27 @@ public: { return color2; } - + inline static bool DrawProgressLabel() { return drawProgressLabel; } - + inline static tabStyle TabStyle() { return tabStyle_; } - + inline static TQColor & BrushTint() { return brushTint; } - + inline static bool TintBrush() { return tintBrush; } - + inline static bool AnimateSlider() { return animateSlider; @@ -352,12 +352,12 @@ public: { return customButtonColor; } - + inline static bool AnimateButton() { return animateButton; } - + inline static TQColor aDecoColor1() { return aDecoColor1_; @@ -374,7 +374,7 @@ public: { return titleButtonColor_[i]; } - + TQMenuBar *currentMenu; TQPixmap *indicatedMenuItemPix; TQRect *indicatedMenuItemRect; @@ -384,13 +384,13 @@ public: WId lastIndicatedMenuItemID; static unsigned long wmDesign; - + public slots: inline void warningSlot() { tqWarning("widget destroyed"); } - + protected: static TQColor titleColor_[2]; static TQColor titleButtonColor_[3]; @@ -449,7 +449,7 @@ protected: static Style _toolbuttonStyle; static bool drawProgressLabel; static tabStyle tabStyle_; - + TQString colorStr, fgColorStr/*, panelColorStr*/; static TQColor brushTint; static TQColor aDecoColor1_; @@ -458,7 +458,7 @@ protected: static bool animateSlider; static bool animateProgress; }; - + class EventKiller : public TQObject { Q_OBJECT @@ -468,7 +468,7 @@ public: return TRUE; } }; - + class BMShower : public TQObject { Q_OBJECT @@ -476,8 +476,8 @@ public: BMShower(TQObject *parent); bool eventFilter( TQObject *object, TQEvent *event ); }; - -class ButtonFadeInfo + +class ButtonFadeInfo { public: ButtonFadeInfo() @@ -498,42 +498,100 @@ public: LiquidStyle(); virtual ~LiquidStyle(); bool isPlain() const; - - virtual void polish( TQWidget *w ); -// virtual void polishPopupMenu( TQPopupMenu *w ); - virtual void unPolish( TQWidget *w ); + + virtual void polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); +// virtual void polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, TQPopupMenu *w ); + virtual void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); virtual void polish( TQPalette &p ); - virtual void unPolish( TQApplication *a ); - int styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * shr) const; - void drawTDEStylePrimitive( TDEStylePrimitive 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; + virtual void applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ); + int styleHint(StyleHint, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQStyleOption & opt, + TQStyleHintReturn * shr, + const TQWidget * = 0) const; + void drawTDEStylePrimitive( TDEStylePrimitive kpe, + TQPainter* p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* widget = 0 ) const; + void drawPrimitive( PrimitiveElement pe, + TQPainter* p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const; + void drawControl( ControlElement element, + TQPainter *p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; +// void drawControlMask( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& = TQStyleOption::Default, const TQWidget *widget = 0 ) const; + void drawComplexControl( ComplexControl control, + TQPainter *p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + SCFlags controls = SC_All, + SCFlags active = SC_None, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; +// void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQStyleOption& = TQStyleOption::Default, const TQWidget *widget =0 ) const; + + int pixelMetric( PixelMetric m, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQWidget *widget = 0 ) const; + + TQSize sizeFromContents( ContentsType contents, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQSize &contentSize, + const TQStyleOption& opt, + const TQWidget *widget = 0 ) const; + TQRect subRect( SubRect r, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQWidget *widget ) const; + TQRect querySubControlMetrics( ComplexControl control, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + SubControl subcontrol, + const TQStyleOption &opt = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; // Fix TQt3's wacky image positions - TQPixmap stylePixmap( StylePixmap stylepixmap, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default ) const; + TQPixmap stylePixmap( StylePixmap stylepixmap, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; bool eventFilter( TQObject *object, TQEvent *event ); - + private slots: void updateProgressPos(); void updateSliderPos(); void progressBarDestroyed(TQObject*); void fakeMouse(); - + protected: 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; - + 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; @@ -559,8 +617,8 @@ private: void fadeOut(TQPushButton *button); TQColor brushedMetalColor(TQColor &c) const; TQColor originalBgColor; - - + + 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 ; @@ -590,7 +648,7 @@ private: TQPalette polishedPalette, tooltipPalette; unsigned int qtrcModificationTime; - + int progAnimShift; int prog2AnimShift; int sliderAnimShift; @@ -623,5 +681,5 @@ private: static TQPixmap popupBack; TQWidget *paintWidget; }; - + #endif |