23 #ifndef STYLE_SALOME_H
24 #define STYLE_SALOME_H
28 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
29 #include <QWindowsStyle>
30 #define BaseStyle QWindowsStyle
32 #include <QCommonStyle>
33 #define BaseStyle QCommonStyle
52 static void initialize(
QtxResourceMgr* = 0,
const QString& = QString() );
54 static void restore();
56 static bool isActive();
63 virtual void polish(
QWidget* );
64 virtual void unpolish(
QWidget* );
65 virtual void drawComplexControl( ComplexControl,
const QStyleOptionComplex*,
66 QPainter*,
const QWidget* = 0 )
const;
68 virtual void drawControl( ControlElement,
const QStyleOption*, QPainter*,
const QWidget* )
const;
69 virtual void drawPrimitive( PrimitiveElement,
const QStyleOption*,
70 QPainter*,
const QWidget* = 0 )
const;
71 virtual int pixelMetric( PixelMetric,
const QStyleOption* = 0,
73 virtual QSize sizeFromContents ( ContentsType,
const QStyleOption*,
74 const QSize&,
const QWidget* = 0 )
const;
75 virtual QPixmap standardPixmap( StandardPixmap,
const QStyleOption*,
77 virtual int styleHint( StyleHint,
const QStyleOption* = 0,
78 const QWidget* = 0, QStyleHintReturn* = 0 )
const;
79 virtual QRect subControlRect( ComplexControl,
const QStyleOptionComplex*,
80 SubControl,
const QWidget* = 0 )
const;
81 virtual QRect subElementRect( SubElement,
const QStyleOption*,
const QWidget* = 0 )
const;
84 QIcon standardIconImplementation( StandardPixmap,
const QStyleOption* = 0,
87 void updatePaletteColors();
89 bool hasHover()
const;
90 void drawHoverRect( QPainter*,
const QRect&,
const QColor&,
const double,
91 const int,
const bool )
const;
92 void drawHandle( QPainter*,
const QRect&,
bool,
bool =
true )
const;
93 void drawBackground( QPainter*,
const QRect&,
const QColor&,
const bool,
94 const bool =
false,
const bool =
true )
const;
95 void drawBorder( QPainter*,
const QRect&,
bool )
const;
97 QString titleText(
const QString&,
const int,
const int, QFont& )
const;
103 #endif // STYLE_SALOME_H