|
|
|
@ -51,22 +51,26 @@ public:
|
|
|
|
|
MandrivaStyle();
|
|
|
|
|
virtual ~MandrivaStyle();
|
|
|
|
|
|
|
|
|
|
void polish( TQWidget* widget );
|
|
|
|
|
void unPolish( TQWidget* widget );
|
|
|
|
|
void polish( TQApplication *app );
|
|
|
|
|
void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
|
void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
|
void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
|
void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
|
|
|
|
|
const TQPopupMenu* popup ) const;
|
|
|
|
|
|
|
|
|
|
void drawTDEStylePrimitive( TDEStylePrimitive kpe,
|
|
|
|
|
TQPainter* p,
|
|
|
|
|
const TQWidget* widget,
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQRect &r,
|
|
|
|
|
const TQColorGroup &cg,
|
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ) const;
|
|
|
|
|
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,
|
|
|
|
@ -74,54 +78,72 @@ public:
|
|
|
|
|
|
|
|
|
|
void drawControl( ControlElement element,
|
|
|
|
|
TQPainter *p,
|
|
|
|
|
const TQWidget *widget,
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQRect &r,
|
|
|
|
|
const TQColorGroup &cg,
|
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ) const;
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
const TQWidget *widget = 0 ) const;
|
|
|
|
|
|
|
|
|
|
void drawControlMask( ControlElement element,
|
|
|
|
|
TQPainter *p,
|
|
|
|
|
const TQWidget *widget,
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQRect &r,
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ) const;
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
const TQWidget *widget = 0 ) const;
|
|
|
|
|
|
|
|
|
|
void drawComplexControl( ComplexControl control,
|
|
|
|
|
TQPainter *p,
|
|
|
|
|
const TQWidget *widget,
|
|
|
|
|
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;
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ,
|
|
|
|
|
const TQWidget *widget = 0 ) const;
|
|
|
|
|
|
|
|
|
|
void drawComplexControlMask( ComplexControl control,
|
|
|
|
|
TQPainter *p,
|
|
|
|
|
const TQWidget *widget,
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQRect &r,
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ) const;
|
|
|
|
|
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 TQWidget *widget,
|
|
|
|
|
const TQSize &contentSize,
|
|
|
|
|
const TQStyleOption& opt ) const;
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQSize &contentSize,
|
|
|
|
|
const TQStyleOption& opt,
|
|
|
|
|
const TQWidget *widget = 0 ) const;
|
|
|
|
|
|
|
|
|
|
TQRect subRect( SubRect r,
|
|
|
|
|
const TQWidget *widget ) const;
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
const ControlElementFlags elementFlags,
|
|
|
|
|
const TQWidget *widget ) const;
|
|
|
|
|
|
|
|
|
|
// Fix TQt3's wacky image positions
|
|
|
|
|
TQPixmap stylePixmap( StylePixmap stylepixmap,
|
|
|
|
|
const TQWidget *widget = 0,
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default ) const;
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQStyleOption& = TQStyleOption::Default,
|
|
|
|
|
const TQWidget *widget = 0 ) const;
|
|
|
|
|
|
|
|
|
|
TQRect querySubControlMetrics( ComplexControl control,
|
|
|
|
|
const TQWidget* widget,
|
|
|
|
|
SubControl subcontrol,
|
|
|
|
|
const TQStyleOption& opt = TQStyleOption::Default ) const;
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
SubControl subcontrol,
|
|
|
|
|
const TQStyleOption& opt = TQStyleOption::Default,
|
|
|
|
|
const TQWidget* widget = 0 ) const;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
enum Hover
|
|
|
|
@ -141,7 +163,7 @@ protected:
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool eventFilter( TQObject *object, TQEvent *event );
|
|
|
|
|
virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
|
|
|
|
|
|
|
|
|
|
void renderGradient(TQPainter* p,
|
|
|
|
|
const TQRect& r,
|
|
|
|
@ -225,11 +247,13 @@ private:
|
|
|
|
|
bool active) const;
|
|
|
|
|
|
|
|
|
|
void drawComboboxArrow( TQPainter *p,
|
|
|
|
|
const TQWidget *widget,
|
|
|
|
|
const TQStyleControlElementData &ceData,
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
|
const TQRect &r,
|
|
|
|
|
const TQColorGroup &cg,
|
|
|
|
|
SFlags flags,
|
|
|
|
|
SCFlags active)const;
|
|
|
|
|
SCFlags active,
|
|
|
|
|
const TQWidget *widget)const;
|
|
|
|
|
|
|
|
|
|
void drawMandrivaArrow( TQPointArray a, TQPainter *p,
|
|
|
|
|
const TQRect &r,
|
|
|
|
@ -243,7 +267,7 @@ private:
|
|
|
|
|
bool isFormWidget(const TQWidget* widget) const;
|
|
|
|
|
bool excludeColor(const TQColor &col, bool active) const;
|
|
|
|
|
void getShade (const TQColorGroup &cg, int shadenr, TQColor &res) const;
|
|
|
|
|
void updateHoverControl(const TQPoint &pos);
|
|
|
|
|
void updateHoverControl(const TQPoint &pos, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags);
|
|
|
|
|
TQIntCache<MandrivaColorData> m_dataCache;
|
|
|
|
|
static const double shading[8];
|
|
|
|
|
mutable bool formMode;
|
|
|
|
|