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)
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)

File diff suppressed because it is too large Load Diff

@ -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;

Loading…
Cancel
Save