Update to latest style API

pull/1/head
Timothy Pearson 12 years ago
parent 5155456304
commit 21bf17ced2

@ -1158,7 +1158,7 @@ static TQString getFile(const TQString &f)
return d; return d;
} }
void QtCurveStyle::applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) void QtCurveStyle::applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{ {
if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQAPPLICATION_OBJECT_NAME_STRING)) {
TQApplication *app = reinterpret_cast<TQApplication*>(ptr); TQApplication *app = reinterpret_cast<TQApplication*>(ptr);
@ -1466,7 +1466,7 @@ TQColorGroup QtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorG
static const char * kdeToolbarWidget="kde toolbar widget"; static const char * kdeToolbarWidget="kde toolbar widget";
void QtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) void QtCurveStyle::polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{ {
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -1851,7 +1851,7 @@ void QtCurveStyle::polish(TQStyleControlElementData ceData, ControlElementFlags
BASE_STYLE::polish(ceData, elementFlags, ptr); BASE_STYLE::polish(ceData, elementFlags, ptr);
} }
void QtCurveStyle::unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr) void QtCurveStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
{ {
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
@ -2008,7 +2008,7 @@ bool QtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
return false; return false;
} }
bool QtCurveStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) bool QtCurveStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *event )
{ {
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {
TQObject* object = reinterpret_cast<TQObject*>(source); TQObject* object = reinterpret_cast<TQObject*>(source);
@ -3185,7 +3185,7 @@ void QtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &
::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small); ::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small);
} }
void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, void QtCurveStyle::drawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const
{ {
switch(pe) switch(pe)
@ -4477,7 +4477,7 @@ static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetric
return title; return title;
} }
void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &opt, const TQWidget *widget) const const TQStyleOption &opt, const TQWidget *widget) const
{ {
@ -4634,7 +4634,7 @@ void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, TQStyl
} }
} }
void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleOption &data, const TQWidget *widget) const const TQStyleOption &data, const TQWidget *widget) const
{ {
@ -5539,7 +5539,7 @@ void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, TQStyleCont
} }
} }
void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const
{ {
switch(control) switch(control)
@ -5565,7 +5565,7 @@ void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, TQStyle
} }
} }
void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const
{ {
switch (control) switch (control)
@ -5580,7 +5580,7 @@ void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p,
} }
} }
TQRect QtCurveStyle::subRect(SubRect subrect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget)const TQRect QtCurveStyle::subRect(SubRect subrect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget)const
{ {
TQRect rect, TQRect rect,
wrect(ceData.rect); wrect(ceData.rect);
@ -5637,7 +5637,7 @@ class TQTitleBar : public TQWidget
TQWidget *window() const; TQWidget *window() const;
}; };
void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQRect &r, const TQColorGroup &cg, SFlags flags,
SCFlags controls, SCFlags active, SCFlags controls, SCFlags active,
const TQStyleOption &data, const TQWidget *widget) const const TQStyleOption &data, const TQWidget *widget) const
@ -6498,7 +6498,7 @@ void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, TQSt
} }
} }
TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleControlElementData ceData, ControlElementFlags elementFlags, TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
SubControl sc, const TQStyleOption &data, const TQWidget *widget) const SubControl sc, const TQStyleOption &data, const TQWidget *widget) const
{ {
bool reverse(TQApplication::reverseLayout()); bool reverse(TQApplication::reverseLayout());
@ -6792,7 +6792,7 @@ TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, TQStyleCo
return BASE_STYLE::querySubControlMetrics(control, ceData, elementFlags, sc, data, widget); return BASE_STYLE::querySubControlMetrics(control, ceData, elementFlags, sc, data, widget);
} }
int QtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const int QtCurveStyle::pixelMetric(PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{ {
switch(metric) switch(metric)
{ {
@ -6885,7 +6885,7 @@ int QtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceDa
} }
} }
int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const
{ {
switch(kpm) switch(kpm)
{ {
@ -6896,7 +6896,7 @@ int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData
} }
} }
TQSize QtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlElementData ceData, ControlElementFlags elementFlags, TQSize QtCurveStyle::sizeFromContents(ContentsType contents, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
const TQSize &contentsSize, const TQStyleOption &data, const TQWidget *widget) const const TQSize &contentsSize, const TQStyleOption &data, const TQWidget *widget) const
{ {
switch(contents) switch(contents)
@ -7007,7 +7007,7 @@ TQSize QtCurveStyle::sizeFromContents(ContentsType contents, TQStyleControlEleme
return BASE_STYLE::sizeFromContents(contents, ceData, elementFlags, contentsSize, data, widget); return BASE_STYLE::sizeFromContents(contents, ceData, elementFlags, contentsSize, data, widget);
} }
int QtCurveStyle::styleHint(StyleHint stylehint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption &option, int QtCurveStyle::styleHint(StyleHint stylehint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &option,
TQStyleHintReturn *returnData, const TQWidget *widget) const TQStyleHintReturn *returnData, const TQWidget *widget) const
{ {
switch(stylehint) switch(stylehint)
@ -7737,7 +7737,7 @@ void QtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColor
} }
void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg, void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
SFlags flags, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const SFlags flags, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const
{ {
TQRect groove(r); TQRect groove(r);
bool horiz(TQt::Horizontal==ceData.orientation), bool horiz(TQt::Horizontal==ceData.orientation),

@ -134,11 +134,11 @@ class QtCurveStyle : public BASE_STYLE
virtual ~QtCurveStyle(); virtual ~QtCurveStyle();
void applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *); void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void polish(TQPalette &pal); void polish(TQPalette &pal);
TQColorGroup setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis=false); TQColorGroup setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis=false);
void polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *); void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *); void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
int round, const TQColor &fill, const TQColor *custom=NULL, int round, const TQColor &fill, const TQColor *custom=NULL,
bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const bool doBorder=true, bool doCorners=true, EWidget w=WIDGET_OTHER) const
@ -158,27 +158,27 @@ class QtCurveStyle : public BASE_STYLE
EntryColor coloration, int round, EWidget=WIDGET_ENTRY) const; EntryColor coloration, int round, EWidget=WIDGET_ENTRY) const;
void drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, void drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
TQ_PrimitiveElement pe, bool small=false, bool checkActive=false) const; TQ_PrimitiveElement pe, bool small=false, bool checkActive=false) const;
void drawPrimitive(TQ_PrimitiveElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, void drawPrimitive(TQ_PrimitiveElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const;
void drawKStylePrimitive(KStylePrimitive kpe, TQPainter* p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, void drawKStylePrimitive(KStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget* widget = 0 ) const; const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget* widget = 0 ) const;
void drawControl(ControlElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, void drawControl(ControlElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
void drawControlMask(ControlElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, void drawControlMask(ControlElement, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
void drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, void drawComplexControlMask(ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags,
const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const; const TQRect &r, const TQStyleOption &data, const TQWidget *widget) const;
TQRect subRect(SubRect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget * = 0) const; TQRect subRect(SubRect, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget * = 0) const;
void drawComplexControl(ComplexControl, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, void drawComplexControl(ComplexControl, TQPainter *, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &,
const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All,
SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
TQRect querySubControlMetrics(TQ_ComplexControl, TQStyleControlElementData ceData, ControlElementFlags elementFlags, SubControl, TQRect querySubControlMetrics(TQ_ComplexControl, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
int pixelMetric(PixelMetric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget= 0) const; int pixelMetric(PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget= 0) const;
int kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const; int kPixelMetric(KStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const;
TQSize sizeFromContents(ContentsType, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQSize &, TQSize sizeFromContents(ContentsType, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQSize &,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const;
int styleHint(StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default, int styleHint(StyleHint, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default,
TQStyleHintReturn *returnData= 0, const TQWidget *widget= 0) const; TQStyleHintReturn *returnData= 0, const TQWidget *widget= 0) const;
void drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled, void drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
const TQPixmap *pixmap, const TQString &text, int len=-1, const TQColor *penColor=0) const; const TQPixmap *pixmap, const TQString &text, int len=-1, const TQColor *penColor=0) const;
@ -186,7 +186,7 @@ class QtCurveStyle : public BASE_STYLE
protected: protected:
bool appIsNotEmbedded(TQDialog *dlg); bool appIsNotEmbedded(TQDialog *dlg);
virtual bool objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
void drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, void drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const; bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const;
void drawProgress(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round, void drawProgress(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, int round,
@ -199,7 +199,7 @@ class QtCurveStyle : public BASE_STYLE
void drawSbSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, bool slider=false) const; void drawSbSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, bool slider=false) const;
void drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, TQSlider *slider, bool tb=false) const; void drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, TQSlider *slider, bool tb=false) const;
void drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, void drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const; const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget) const;
void drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool menu=true, bool horiz=true) const; void drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool menu=true, bool horiz=true) const;
void drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb, ELine handles) const; void drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb, ELine handles) const;
void drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const; void drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const;

Loading…
Cancel
Save