QMotifStyle Class Reference
The QMotifStyle class provides Motif look and feel. More...
#include <QMotifStyle>
Inherits QCommonStyle.
Inherited by QCDEStyle, QMotifPlusStyle, and QSGIStyle.
Writable Properties
- 1 writable property inherited from QObject
Public Functions
- QMotifStyle ( bool useHighlightCols = false )
- virtual ~QMotifStyle ()
- void drawComplexControl ( ComplexControl control, QPainter * p, const QWidget * widget, const QRect & r, const QPalette & pal, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None /*const Q3StyleOption& = Q3StyleOption::Default*/ ) const
- void drawControl ( ControlElement element, QPainter * p, const QWidget * widget, const QRect & r, const QPalette & pal, SFlags how = Style_Default /*const Q3StyleOption& = Q3StyleOption::Default*/ ) const
- void drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QPalette & pal, SFlags flags = Style_Default /*const Q3StyleOption& = Q3StyleOption::Default*/ ) const
- QRect querySubControlMetrics ( ComplexControl control, const QWidget * widget, SubControl sc ) const
- void setUseHighlightColors ( bool arg )
- QSize sizeFromContents ( ContentsType contents, const QWidget * widget, const QSize & contentsSize ) const
- int styleHint ( StyleHint sh, const QWidget * ) const
- QPixmap stylePixmap ( StylePixmap , const QWidget * = 0 /*, const Q3StyleOption& = Q3StyleOption::Default*/ ) const
- QRect subRect ( SubRect r, const QWidget * widget ) const
- bool useHighlightColors () const
- 9 public functions inherited from QCommonStyle
- 23 public functions inherited from QStyle
- 24 public functions inherited from QObject
Public Slots
- 1 public slot inherited from QObject
Signals
Static Public Members
- 6 static public members inherited from QStyle
- 4 static public members inherited from QObject
Protected Functions
- 9 protected functions inherited from QObject
Detailed Description
The QMotifStyle class provides Motif look and feel.
This class implements the Motif look and feel. It closely resembles the original Motif look as defined by the Open Group, but with some minor improvements. The Motif style is Qt's default GUI style on UNIX platforms.
Most of the functions are documented in the base classes, QCommonStyle and QStyle, but the functions overloaded by QMotifStyle, drawComplexControl(), drawControl(), drawPrimitive(), querySubControlMetrics(), setUseHighlightColors(), sizeFromContents(), subRect(), and useHighlightColors(), are documented here.
Member Function Documentation
QMotifStyle::QMotifStyle ( bool useHighlightCols = false )
Constructs a QMotifStyle.
If useHighlightCols is false (the default), the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color.
QMotifStyle::~QMotifStyle () [virtual]
Destroys the style.
void QMotifStyle::drawComplexControl ( ComplexControl control, QPainter * p, const QWidget * widget, const QRect & r, const QPalette & pal, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None /*const Q3StyleOption& = Q3StyleOption::Default*/ ) const
void QMotifStyle::drawControl ( ControlElement element, QPainter * p, const QWidget * widget, const QRect & r, const QPalette & pal, SFlags how = Style_Default /*const Q3StyleOption& = Q3StyleOption::Default*/ ) const
void QMotifStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect & r, const QPalette & pal, SFlags flags = Style_Default /*const Q3StyleOption& = Q3StyleOption::Default*/ ) const
QRect QMotifStyle::querySubControlMetrics ( ComplexControl control, const QWidget * widget, SubControl sc ) const
void QMotifStyle::setUseHighlightColors ( bool arg )
If arg is false, the style will polish the application's color palette to emulate the Motif way of highlighting, which is a simple inversion between the base and the text color.
The effect will show up the next time an application palette is set via QApplication::setPalette(). The current color palette of the application remains unchanged.
See also QStyle::polish().
QSize QMotifStyle::sizeFromContents ( ContentsType contents, const QWidget * widget, const QSize & contentsSize ) const
int QMotifStyle::styleHint ( StyleHint sh, const QWidget * ) const
QPixmap QMotifStyle::stylePixmap ( StylePixmap , const QWidget * = 0 /*, const Q3StyleOption& = Q3StyleOption::Default*/ ) const
QRect QMotifStyle::subRect ( SubRect r, const QWidget * widget ) const
Returns the rectangle for the given sub-rectangle r. The widget is optional and may contain a widget that is useful for drawing the sub-rectangle.
bool QMotifStyle::useHighlightColors () const
Returns true if the style treats the highlight colors of the palette in a Motif-like manner, which is a simple inversion between the base and the text color; otherwise returns false. The default is false.