Eneboo - Documentación para desarrolladores
|
The QMotifPlusStyle class provides a more sophisticated Motif-ish look and feel. Más...
#include <qmotifplusstyle.h>
Métodos públicos | |
QMotifPlusStyle (bool hoveringHighlight=TRUE) | |
virtual | ~QMotifPlusStyle () |
void | polish (QPalette &pal) |
void | polish (QWidget *widget) |
void | unPolish (QWidget *widget) |
void | polish (QApplication *app) |
void | unPolish (QApplication *app) |
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 |
QRect | subRect (SubRect r, const QWidget *widget) const |
void | drawComplexControl (ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags controls=(uint) SC_All, SCFlags active=SC_None, const QStyleOption &=QStyleOption::Default) const |
QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &=QStyleOption::Default) const |
int | pixelMetric (PixelMetric metric, const QWidget *widget=0) const |
int | styleHint (StyleHint sh, const QWidget *, const QStyleOption &=QStyleOption::Default, QStyleHintReturn *=0) const |
QMotifPlusStyle (bool hoveringHighlight=TRUE) | |
virtual | ~QMotifPlusStyle () |
void | polish (QPalette &pal) |
void | polish (QWidget *widget) |
void | unPolish (QWidget *widget) |
void | polish (QApplication *app) |
void | unPolish (QApplication *app) |
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 |
QRect | subRect (SubRect r, const QWidget *widget) const |
void | drawComplexControl (ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags how=Style_Default, SCFlags controls=(uint) SC_All, SCFlags active=SC_None, const QStyleOption &=QStyleOption::Default) const |
QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &=QStyleOption::Default) const |
int | pixelMetric (PixelMetric metric, const QWidget *widget=0) const |
int | styleHint (StyleHint sh, const QWidget *, const QStyleOption &=QStyleOption::Default, QStyleHintReturn *=0) const |
Métodos protegidos | |
bool | eventFilter (QObject *, QEvent *) |
bool | eventFilter (QObject *, QEvent *) |
The QMotifPlusStyle class provides a more sophisticated Motif-ish look and feel.
This class implements a Motif-ish look and feel with the more sophisticated bevelling as used by the GIMP Toolkit (GTK+) for Unix/X11.
QMotifPlusStyle::QMotifPlusStyle | ( | bool | hoveringHighlight = TRUE | ) |
Constructs a QMotifPlusStyle
If hoveringHighlight is TRUE (the default), then the style will not highlight push buttons, checkboxes, radiobuttons, comboboxes, scrollbars or sliders.
QMotifPlusStyle::~QMotifPlusStyle | ( | ) | [virtual] |
QMotifPlusStyle::QMotifPlusStyle | ( | bool | hoveringHighlight = TRUE | ) |
virtual QMotifPlusStyle::~QMotifPlusStyle | ( | ) | [virtual] |
void QMotifPlusStyle::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 QMotifStyle.
void QMotifPlusStyle::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 QMotifStyle.
void QMotifPlusStyle::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 QMotifStyle.
void QMotifPlusStyle::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 QMotifStyle.
void QMotifPlusStyle::drawPrimitive | ( | PrimitiveElement | pe, |
QPainter * | p, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::drawPrimitive | ( | PrimitiveElement | pe, |
QPainter * | p, | ||
const QRect & | r, | ||
const QColorGroup & | cg, | ||
SFlags | flags = Style_Default , |
||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
Reimplementado de QObject.
Filters events if this object has been installed as an event filter for the watched object.
In your reimplementation of this function, if you want to filter the event e, out, i.e. stop it being handled further, return TRUE; otherwise return FALSE.
Example:
class MyMainWindow : public QMainWindow { public: MyMainWindow( QWidget *parent = 0, const char *name = 0 ); protected: bool eventFilter( QObject *obj, QEvent *ev ); private: QTextEdit *textEdit; }; MyMainWindow::MyMainWindow( QWidget *parent, const char *name ) : QMainWindow( parent, name ) { textEdit = new QTextEdit( this ); setCentralWidget( textEdit ); textEdit->installEventFilter( this ); } bool MyMainWindow::eventFilter( QObject *obj, QEvent *ev ) { if ( obj == textEdit ) { if ( e->type() == QEvent::KeyPress ) { QKeyEvent *k = (QKeyEvent*)ev; qDebug( "Ate key press %d", k->key() ); return TRUE; } else { return FALSE; } } else { // pass the event on to the parent class return QMainWindow::eventFilter( obj, ev ); } }
Notice in the example above that unhandled events are passed to the base class's eventFilter() function, since the base class might have reimplemented eventFilter() for its own internal purposes.
Reimplementado de QObject.
int QMotifPlusStyle::pixelMetric | ( | PixelMetric | metric, |
const QWidget * | widget = 0 |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
int QMotifPlusStyle::pixelMetric | ( | PixelMetric | metric, |
const QWidget * | widget = 0 |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::polish | ( | QApplication * | app | ) | [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::polish | ( | QApplication * | a | ) | [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::polish | ( | QWidget * | w | ) | [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::polish | ( | QWidget * | widget | ) | [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::polish | ( | QPalette & | pal | ) | [virtual] |
Reimplementado de QMotifStyle.
void QMotifPlusStyle::polish | ( | QPalette & | pal | ) | [virtual] |
Reimplementado de QMotifStyle.
QRect QMotifPlusStyle::querySubControlMetrics | ( | ComplexControl | control, |
const QWidget * | widget, | ||
SubControl | sc, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
QRect QMotifPlusStyle::querySubControlMetrics | ( | ComplexControl | control, |
const QWidget * | widget, | ||
SubControl | subcontrol, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
int QMotifPlusStyle::styleHint | ( | StyleHint | hint, |
const QWidget * | widget, | ||
const QStyleOption & | opt = QStyleOption::Default , |
||
QStyleHintReturn * | returnData = 0 |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
int QMotifPlusStyle::styleHint | ( | StyleHint | hint, |
const QWidget * | widget, | ||
const QStyleOption & | opt = QStyleOption::Default , |
||
QStyleHintReturn * | returnData = 0 |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
Reimplementado de QMotifStyle.
Reimplementado de QMotifStyle.
void QMotifPlusStyle::unPolish | ( | QApplication * | ) | [virtual] |
void QMotifPlusStyle::unPolish | ( | QWidget * | ) | [virtual] |
Undoes the initialization of a widget's appearance.
This function is the counterpart to polish. It is called for every polished widget when the style is dynamically changed. The former style has to unpolish its settings before the new style can polish them again.
Reimplementado de QStyle.
void QMotifPlusStyle::unPolish | ( | QApplication * | app | ) | [virtual] |
Reimplementado de QStyle.