|
|
@ -34,165 +34,169 @@ class KPixmap;
|
|
|
|
|
|
|
|
|
|
|
|
class GradientSet
|
|
|
|
class GradientSet
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
enum GradientType {
|
|
|
|
enum GradientType {
|
|
|
|
Horizontal,
|
|
|
|
Horizontal,
|
|
|
|
Vertical,
|
|
|
|
Vertical,
|
|
|
|
HorizontalReverse,
|
|
|
|
HorizontalReverse,
|
|
|
|
VerticalReverse,
|
|
|
|
VerticalReverse,
|
|
|
|
GradientTypeCount
|
|
|
|
GradientTypeCount
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GradientSet(const TQColor &color, int size);
|
|
|
|
GradientSet(const TQColor &color, int size);
|
|
|
|
~GradientSet();
|
|
|
|
~GradientSet();
|
|
|
|
|
|
|
|
|
|
|
|
KPixmap* gradient(bool horizontal, bool reverse);
|
|
|
|
KPixmap* gradient(bool horizontal, bool reverse);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
KPixmap *set[GradientTypeCount];
|
|
|
|
KPixmap *set[GradientTypeCount];
|
|
|
|
TQColor color_;
|
|
|
|
TQColor color_;
|
|
|
|
int size_;
|
|
|
|
int size_;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class PhaseStyle : public KStyle
|
|
|
|
class PhaseStyle : public KStyle
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
PhaseStyle();
|
|
|
|
PhaseStyle();
|
|
|
|
virtual ~PhaseStyle();
|
|
|
|
virtual ~PhaseStyle();
|
|
|
|
|
|
|
|
|
|
|
|
void applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
void applicationPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
void polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
void polish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
void polish(TQPalette &pal);
|
|
|
|
void polish(TQPalette &pal);
|
|
|
|
void unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
void unPolish(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *);
|
|
|
|
|
|
|
|
|
|
|
|
void drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
void drawPrimitive(TQ_PrimitiveElement element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default) const;
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default) const;
|
|
|
|
|
|
|
|
|
|
|
|
void drawKStylePrimitive(KStylePrimitive element,
|
|
|
|
void drawKStylePrimitive(KStylePrimitive element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
void drawControl(TQ_ControlElement element,
|
|
|
|
void drawControl(TQ_ControlElement element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
SFlags flags = Style_Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
void drawControlMask(TQ_ControlElement element,
|
|
|
|
void drawControlMask(TQ_ControlElement element,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
void drawComplexControl(TQ_ComplexControl control,
|
|
|
|
void drawComplexControl(TQ_ComplexControl control,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
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 &option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
void drawComplexControlMask(TQ_ComplexControl control,
|
|
|
|
void drawComplexControlMask(TQ_ComplexControl control,
|
|
|
|
TQPainter *painter,
|
|
|
|
TQPainter *painter,
|
|
|
|
const TQStyleControlElementData ceData,
|
|
|
|
const TQStyleControlElementData ceData,
|
|
|
|
const ControlElementFlags elementFlags,
|
|
|
|
const ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
int pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
|
|
|
|
int pixelMetric(PixelMetric metric, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
TQRect subRect(SubRect rect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget = 0) const;
|
|
|
|
TQRect subRect(SubRect rect, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
TQRect querySubControlMetrics(TQ_ComplexControl control,
|
|
|
|
TQRect querySubControlMetrics(TQ_ComplexControl control,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
SubControl subcontrol,
|
|
|
|
SubControl subcontrol,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption &option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
TQSize sizeFromContents(ContentsType contents,
|
|
|
|
TQSize sizeFromContents(ContentsType contents,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQSize &contentsize,
|
|
|
|
const TQSize &contentsize,
|
|
|
|
const TQStyleOption& option = TQStyleOption::Default,
|
|
|
|
const TQStyleOption& option = TQStyleOption::Default,
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
const TQWidget *widget = 0) const;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
int styleHint(TQ_StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags,
|
|
|
|
PhaseStyle(const PhaseStyle &);
|
|
|
|
const TQStyleOption & = TQStyleOption::Default,
|
|
|
|
PhaseStyle& operator=(const PhaseStyle &);
|
|
|
|
TQStyleHintReturn * = 0, const TQWidget * = 0 ) const;
|
|
|
|
|
|
|
|
|
|
|
|
void drawPhaseBevel(TQPainter *painter,
|
|
|
|
private:
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
PhaseStyle(const PhaseStyle &);
|
|
|
|
const TQColorGroup &group,
|
|
|
|
PhaseStyle& operator=(const PhaseStyle &);
|
|
|
|
const TQColor &fill,
|
|
|
|
|
|
|
|
bool sunken=false,
|
|
|
|
void drawPhaseBevel(TQPainter *painter,
|
|
|
|
bool horizontal=true,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
bool reverse=false) const;
|
|
|
|
const TQColorGroup &group,
|
|
|
|
|
|
|
|
const TQColor &fill,
|
|
|
|
void drawPhaseButton(TQPainter *painter,
|
|
|
|
bool sunken=false,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
bool horizontal=true,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
bool reverse=false) const;
|
|
|
|
const TQColor &fill,
|
|
|
|
|
|
|
|
bool sunken=false) const;
|
|
|
|
void drawPhaseButton(TQPainter *painter,
|
|
|
|
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
void drawPhasePanel(TQPainter *painter,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
const TQColor &fill,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
bool sunken=false) const;
|
|
|
|
bool sunken=false,
|
|
|
|
|
|
|
|
const TQBrush *fill=NULL) const;
|
|
|
|
void drawPhasePanel(TQPainter *painter,
|
|
|
|
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
void drawPhaseTab(TQPainter *painter,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
bool sunken=false,
|
|
|
|
const TQColorGroup &group,
|
|
|
|
const TQBrush *fill=NULL) const;
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
void drawPhaseTab(TQPainter *painter,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
const SFlags flags) const;
|
|
|
|
const TQColorGroup &group,
|
|
|
|
|
|
|
|
TQStyleControlElementData ceData,
|
|
|
|
void drawPhaseGradient(TQPainter *painter,
|
|
|
|
ControlElementFlags elementFlags,
|
|
|
|
const TQRect &rect,
|
|
|
|
const TQStyleOption &option,
|
|
|
|
TQColor color,
|
|
|
|
const SFlags flags) const;
|
|
|
|
bool horizontal,
|
|
|
|
|
|
|
|
int px=0, int py=0,
|
|
|
|
void drawPhaseGradient(TQPainter *painter,
|
|
|
|
int pw=-1, int ph=-1,
|
|
|
|
const TQRect &rect,
|
|
|
|
bool reverse=false) const;
|
|
|
|
TQColor color,
|
|
|
|
|
|
|
|
bool horizontal,
|
|
|
|
bool flatToolbar(const TQToolBar *toolbar) const;
|
|
|
|
int px=0, int py=0,
|
|
|
|
|
|
|
|
int pw=-1, int ph=-1,
|
|
|
|
bool objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
|
|
|
|
bool reverse=false) const;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool flatToolbar(const TQToolBar *toolbar) const;
|
|
|
|
TQMap<unsigned int, TQIntDict<GradientSet> > * gradients;
|
|
|
|
|
|
|
|
bool gradients_;
|
|
|
|
bool objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
|
|
|
|
bool highlights_;
|
|
|
|
|
|
|
|
bool reverse_;
|
|
|
|
private:
|
|
|
|
bool kicker_;
|
|
|
|
TQMap<unsigned int, TQIntDict<GradientSet> > * gradients;
|
|
|
|
|
|
|
|
bool gradients_;
|
|
|
|
|
|
|
|
bool highlights_;
|
|
|
|
|
|
|
|
bool reverse_;
|
|
|
|
|
|
|
|
bool kicker_;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PHASESTYLE_H
|
|
|
|
#endif // PHASESTYLE_H
|
|
|
|