Eneboo - Documentación para desarrolladores
|
The QMotifStyle class provides Motif look and feel. Más...
#include <qmotifstyle.h>
Métodos públicos | |
QMotifStyle (bool useHighlightCols=FALSE) | |
virtual | ~QMotifStyle () |
void | setUseHighlightColors (bool) |
bool | useHighlightColors () const |
void | polish (QPalette &) |
void | polish (QWidget *) |
void | polish (QApplication *) |
void | polishPopupMenu (QPopupMenu *) |
void | drawPrimitive (PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption &=QStyleOption::Default) const |
void | drawControl (ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, const QStyleOption &=QStyleOption::Default) const |
void | drawComplexControl (ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags sub=(uint) SC_All, SCFlags subActive=SC_None, const QStyleOption &=QStyleOption::Default) const |
QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl sc, const QStyleOption &=QStyleOption::Default) const |
int | pixelMetric (PixelMetric metric, const QWidget *widget=0) const |
QSize | sizeFromContents (ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption &=QStyleOption::Default) const |
QRect | subRect (SubRect r, const QWidget *widget) const |
QPixmap | stylePixmap (StylePixmap, const QWidget *=0, const QStyleOption &=QStyleOption::Default) const |
int | styleHint (StyleHint sh, const QWidget *, const QStyleOption &=QStyleOption::Default, QStyleHintReturn *=0) const |
QMotifStyle (bool useHighlightCols=FALSE) | |
virtual | ~QMotifStyle () |
void | setUseHighlightColors (bool) |
bool | useHighlightColors () const |
void | polish (QPalette &) |
void | polish (QWidget *) |
void | polish (QApplication *) |
void | polishPopupMenu (QPopupMenu *) |
void | drawPrimitive (PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption &=QStyleOption::Default) const |
void | drawControl (ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, const QStyleOption &=QStyleOption::Default) const |
void | drawComplexControl (ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags sub=(uint) SC_All, SCFlags subActive=SC_None, const QStyleOption &=QStyleOption::Default) const |
QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl sc, const QStyleOption &=QStyleOption::Default) const |
int | pixelMetric (PixelMetric metric, const QWidget *widget=0) const |
QSize | sizeFromContents (ContentsType contents, const QWidget *widget, const QSize &contentsSize, const QStyleOption &=QStyleOption::Default) const |
QRect | subRect (SubRect r, const QWidget *widget) const |
QPixmap | stylePixmap (StylePixmap, const QWidget *=0, const QStyleOption &=QStyleOption::Default) const |
int | styleHint (StyleHint sh, const QWidget *, const QStyleOption &=QStyleOption::Default, QStyleHintReturn *=0) const |
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.
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] |
QMotifStyle::QMotifStyle | ( | bool | useHighlightCols = FALSE | ) |
virtual QMotifStyle::~QMotifStyle | ( | ) | [virtual] |
void QMotifStyle::drawComplexControl | ( | ComplexControl | control, |
QPainter * | p, | ||
const QWidget * | widget, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
SCFlags | sub = (uint)SC_All , |
||
SCFlags | subActive = SC_None , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::drawComplexControl | ( | ComplexControl | control, |
QPainter * | p, | ||
const QWidget * | widget, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
SCFlags | controls = (uint)SC_All , |
||
SCFlags | active = SC_None , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::drawControl | ( | ControlElement | element, |
QPainter * | p, | ||
const QWidget * | widget, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QCDEStyle, QMotifPlusStyle, QSGIStyle, QCDEStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::drawControl | ( | ControlElement | element, |
QPainter * | p, | ||
const QWidget * | widget, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QCDEStyle, QMotifPlusStyle, QSGIStyle, QCDEStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::drawPrimitive | ( | PrimitiveElement | pe, |
QPainter * | p, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QCDEStyle, QMotifPlusStyle, QSGIStyle, QCDEStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::drawPrimitive | ( | PrimitiveElement | pe, |
QPainter * | p, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QCDEStyle, QMotifPlusStyle, QSGIStyle, QCDEStyle, QMotifPlusStyle y QSGIStyle.
int QMotifStyle::pixelMetric | ( | PixelMetric | metric, |
const QWidget * | widget = 0 |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QCDEStyle, QMotifPlusStyle, QSGIStyle, QCDEStyle, QMotifPlusStyle y QSGIStyle.
int QMotifStyle::pixelMetric | ( | PixelMetric | m, |
const QWidget * | widget = 0 |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QCDEStyle, QMotifPlusStyle, QSGIStyle, QCDEStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::polish | ( | QWidget * | w | ) | [virtual] |
Reimplementado de QStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::polish | ( | QPalette & | ) | [virtual] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. The style may have certain requirements for color palettes. In this function it has the chance to change the palette according to these requirements.
Reimplementado de QStyle.
Reimplementado en QMotifPlusStyle y QMotifPlusStyle.
void QMotifStyle::polish | ( | QWidget * | ) | [virtual] |
Initializes the appearance of a widget.
This function is called for every widget at some point after it has been fully created but just before it is shown the very first time.
Reasonable actions in this function might be to call QWidget::setBackgroundMode() for the widget. An example of highly unreasonable use would be setting the geometry! Reimplementing this function gives you a back-door through which you can change the appearance of a widget. With Qt 3.0's style engine you will rarely need to write your own polish(); instead reimplement drawItem(), drawPrimitive(), etc.
The QWidget::inherits() function may provide enough information to allow class-specific customizations. But be careful not to hard-code things too much because new QStyle subclasses are expected to work reasonably with all current and future widgets.
Reimplementado de QStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::polish | ( | QApplication * | ) | [virtual] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Late initialization of the QApplication object.
Reimplementado de QStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::polish | ( | QApplication * | a | ) | [virtual] |
Reimplementado de QStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::polish | ( | QPalette & | pal | ) | [virtual] |
Reimplementado de QStyle.
Reimplementado en QMotifPlusStyle y QMotifPlusStyle.
void QMotifStyle::polishPopupMenu | ( | QPopupMenu * | ) | [virtual] |
Polishes the popup menu according to the GUI style. This usually means setting the mouse tracking ({QPopupMenu::setMouseTracking()}) and whether the menu is checkable by default ({QPopupMenu::setCheckable()}).
Implementa QStyle.
void QMotifStyle::polishPopupMenu | ( | QPopupMenu * | p | ) | [virtual] |
Implementa QStyle.
QRect QMotifStyle::querySubControlMetrics | ( | ComplexControl | control, |
const QWidget * | widget, | ||
SubControl | sc, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
QRect QMotifStyle::querySubControlMetrics | ( | ComplexControl | control, |
const QWidget * | widget, | ||
SubControl | sc, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
void QMotifStyle::setUseHighlightColors | ( | bool | ) |
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.
QSize QMotifStyle::sizeFromContents | ( | ContentsType | contents, |
const QWidget * | widget, | ||
const QSize & | contentsSize, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
QSize QMotifStyle::sizeFromContents | ( | ContentsType | contents, |
const QWidget * | widget, | ||
const QSize & | contentsSize, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
int QMotifStyle::styleHint | ( | StyleHint | sh, |
const QWidget * | w, | ||
const QStyleOption & | = QStyleOption::Default , |
||
QStyleHintReturn * | = 0 |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle y QMotifPlusStyle.
int QMotifStyle::styleHint | ( | StyleHint | hint, |
const QWidget * | widget, | ||
const QStyleOption & | opt = QStyleOption::Default , |
||
QStyleHintReturn * | returnData = 0 |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle y QMotifPlusStyle.
QPixmap QMotifStyle::stylePixmap | ( | StylePixmap | sp, |
const QWidget * | widget = 0 , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
QPixmap QMotifStyle::stylePixmap | ( | StylePixmap | sp, |
const QWidget * | widget = 0 , |
||
const QStyleOption & | = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QCommonStyle.
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
Reimplementado de QCommonStyle.
Reimplementado en QMotifPlusStyle, QSGIStyle, QMotifPlusStyle y QSGIStyle.
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.
bool QMotifStyle::useHighlightColors | ( | ) | const |