Update to new style API

Signed-off-by: François Andriot <francois.andriot@free.fr>
pull/1/head
François Andriot 9 years ago committed by Slávek Banko
parent 3ae9f9432e
commit d4a24866b5

@ -21,6 +21,6 @@ BUILT_SOURCES = ia_ora.moc
CLEANFILES = $(BUILT_SOURCES) CLEANFILES = $(BUILT_SOURCES)
ia_oradata_DATA = ia_ora.themerc ia_oradata_DATA = ia_ora.themerc
ia_oradatadir = $(kde_datadir)/kstyle/themes ia_oradatadir = $(kde_datadir)/tdestyle/themes
EXTRA_DIST = ia_ora.cpp ia_ora.h $(ia_oradata_DATA) EXTRA_DIST = ia_ora.cpp ia_ora.h $(ia_oradata_DATA)

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save