Eneboo - Documentación para desarrolladores
|
The QSGIStyle class provides SGI/Irix look and feel. Más...
#include <qsgistyle.h>
Métodos públicos | |
QSGIStyle (bool useHighlightCols=FALSE) | |
virtual | ~QSGIStyle () |
void | polish (QWidget *) |
void | unPolish (QWidget *) |
void | polish (QApplication *) |
void | unPolish (QApplication *) |
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 |
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 |
QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl sc, const QStyleOption &=QStyleOption::Default) const |
QSGIStyle (bool useHighlightCols=FALSE) | |
virtual | ~QSGIStyle () |
void | polish (QWidget *) |
void | unPolish (QWidget *) |
void | polish (QApplication *) |
void | unPolish (QApplication *) |
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 |
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 |
QRect | querySubControlMetrics (ComplexControl control, const QWidget *widget, SubControl sc, const QStyleOption &=QStyleOption::Default) const |
Métodos protegidos | |
bool | eventFilter (QObject *, QEvent *) |
bool | eventFilter (QObject *, QEvent *) |
The QSGIStyle class provides SGI/Irix look and feel.
This class implements the SGI look and feel. It resembles the SGI/Irix Motif GUI style as closely as QStyle allows.
QSGIStyle::QSGIStyle | ( | bool | useHighlightCols = FALSE | ) |
Constructs a QSGIStyle.
If useHighlightCols is FALSE (default value), 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.
QSGIStyle::~QSGIStyle | ( | ) | [virtual] |
Destroys the style.
QSGIStyle::QSGIStyle | ( | bool | useHighlightCols = FALSE | ) |
virtual QSGIStyle::~QSGIStyle | ( | ) | [virtual] |
void QSGIStyle::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 QSGIStyle::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 QSGIStyle::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 QSGIStyle::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 QSGIStyle::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 QSGIStyle::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 QSGIStyle::pixelMetric | ( | PixelMetric | metric, |
const QWidget * | widget = 0 |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
int QSGIStyle::pixelMetric | ( | PixelMetric | metric, |
const QWidget * | widget = 0 |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
void QSGIStyle::polish | ( | QWidget * | w | ) | [virtual] |
Installs an event filter for several widget classes to enable hovering.
Reimplementado de QMotifStyle.
void QSGIStyle::polish | ( | QApplication * | app | ) | [virtual] |
Changes some application-wide settings to be SGI-like, e.g. sets a bold italic font for menu options.
Reimplementado de QMotifStyle.
void QSGIStyle::polish | ( | QWidget * | w | ) | [virtual] |
Reimplementado de QMotifStyle.
void QSGIStyle::polish | ( | QApplication * | a | ) | [virtual] |
Reimplementado de QMotifStyle.
QRect QSGIStyle::querySubControlMetrics | ( | ComplexControl | control, |
const QWidget * | widget, | ||
SubControl | sub, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
QRect QSGIStyle::querySubControlMetrics | ( | ComplexControl | control, |
const QWidget * | widget, | ||
SubControl | sc, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
QSize QSGIStyle::sizeFromContents | ( | ContentsType | contents, |
const QWidget * | widget, | ||
const QSize & | contentsSize, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
QSize QSGIStyle::sizeFromContents | ( | ContentsType | contents, |
const QWidget * | widget, | ||
const QSize & | contentsSize, | ||
const QStyleOption & | opt = QStyleOption::Default |
||
) | const [virtual] |
Reimplementado de QMotifStyle.
Reimplementado de QMotifStyle.
Reimplementado de QMotifStyle.
void QSGIStyle::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 QSGIStyle::unPolish | ( | QApplication * | ) | [virtual] |
void QSGIStyle::unPolish | ( | QApplication * | ) | [virtual] |
Reimplementado de QStyle.