QMotifStyle Class Reference
The QMotifStyle class provides Motif look and feel. More...
#include <QMotifStyle> Inherits: QCommonStyle .
Inherited by: QCDEStyle .
Public Functions
Reimplemented Public Functions
virtual void drawComplexControl ( ComplexControl cc , const QStyleOptionComplex * opt , QPainter * p , const QWidget * widget = 0 ) const virtual void drawControl ( ControlElement element , const QStyleOption * opt , QPainter * p , const QWidget * widget = 0 ) const virtual void drawPrimitive ( PrimitiveElement pe , const QStyleOption * opt , QPainter * p , const QWidget * w = 0 ) const virtual bool event ( QEvent * e ) virtual int pixelMetric ( PixelMetric pm , const QStyleOption * opt = 0, const QWidget * widget = 0 ) const virtual void polish ( QPalette & pal ) virtual QSize sizeFromContents ( ContentsType ct , const QStyleOption * opt , const QSize & contentsSize , const QWidget * widget = 0 ) const virtual QPalette standardPalette () const virtual QPixmap standardPixmap ( StandardPixmap standardPixmap , const QStyleOption * opt , const QWidget * widget = 0 ) const virtual int styleHint ( StyleHint hint , const QStyleOption * opt = 0, const QWidget * widget = 0, QStyleHintReturn * returnData = 0 ) const virtual QRect subControlRect ( ComplexControl cc , const QStyleOptionComplex * opt , SubControl sc , const QWidget * widget = 0 ) const virtual QRect subElementRect ( SubElement sr , const QStyleOption * opt , const QWidget * widget = 0 ) const
16 public functions inherited from QCommonStyle
24 public functions inherited from QStyle
29 public functions inherited from QObject
Reimplemented Protected Functions
8 protected functions inherited from QObject
Additional Inherited Members
1 property inherited from QObject
1 public slot inherited from QObject
1 signal inherited from QObject
6 static public members inherited from QStyle
7 static public members inherited from QObject
8 protected functions inherited from QObject
2 protected slots inherited from QStyle
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.
See also QWindowsXPStyle , QMacStyle , QWindowsStyle , QPlastiqueStyle , and QCDEStyle .
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]
This is an overloaded function.
Destroys the style.
void QMotifStyle::drawComplexControl ( ComplexControl cc , const QStyleOptionComplex * opt , QPainter * p , const QWidget * widget = 0 ) const [virtual]
Reimplemented from QStyle::drawComplexControl ().
void QMotifStyle::drawControl ( ControlElement element , const QStyleOption * opt , QPainter * p , const QWidget * widget = 0 ) const [virtual]
Reimplemented from QStyle::drawControl ().
void QMotifStyle::drawPrimitive ( PrimitiveElement pe , const QStyleOption * opt , QPainter * p , const QWidget * w = 0 ) const [virtual]
Reimplemented from QStyle::drawPrimitive ().
bool QMotifStyle::event ( QEvent * e ) [virtual]
Reimplemented from QObject::event ().
int QMotifStyle::pixelMetric ( PixelMetric pm , const QStyleOption * opt = 0, const QWidget * widget = 0 ) const [virtual]
Reimplemented from QStyle::pixelMetric ().
void QMotifStyle::polish ( QPalette & pal ) [virtual]
Reimplemented from QStyle::polish ().
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 useHighlightColors () and QStyle::polish ().
QSize QMotifStyle::sizeFromContents ( ContentsType ct , const QStyleOption * opt , const QSize & contentsSize , const QWidget * widget = 0 ) const [virtual]
Reimplemented from QStyle::sizeFromContents ().
QPalette QMotifStyle::standardPalette () const [virtual]
Reimplemented from QStyle::standardPalette ().
QPixmap QMotifStyle::standardPixmap ( StandardPixmap standardPixmap , const QStyleOption * opt , const QWidget * widget = 0 ) const [virtual]
Reimplemented from QStyle::standardPixmap ().
int QMotifStyle::styleHint ( StyleHint hint , const QStyleOption * opt = 0, const QWidget * widget = 0, QStyleHintReturn * returnData = 0 ) const [virtual]
Reimplemented from QStyle::styleHint ().
Reimplemented from QStyle::subControlRect ().
QRect QMotifStyle::subElementRect ( SubElement sr , const QStyleOption * opt , const QWidget * widget = 0 ) const [virtual]
Reimplemented from QStyle::subElementRect ().
void QMotifStyle::timerEvent ( QTimerEvent * event ) [virtual protected]
Reimplemented from QObject::timerEvent ().
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.
See also setUseHighlightColors ().
Best Of
Actualités les plus lues
Le Qt Labs au hasard
Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur.
Lire l'article.
Communauté
Ressources
Liens utiles
Contact
Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).
Qt dans le magazine