Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos protegidos
Referencia de la Clase QSGIStyle

The QSGIStyle class provides SGI/Irix look and feel. Más...

#include <qsgistyle.h>

Diagrama de herencias de QSGIStyle
QMotifStyle QMotifStyle QCommonStyle QCommonStyle QCommonStyle QCommonStyle QStyle QStyle QStyle QStyle QStyle QStyle QStyle QStyle

Lista de todos los miembros.

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 *)

Descripción detallada

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.


Documentación del constructor y destructor

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.

Ver también:
QMotifStyle::useHighlightColors()
QSGIStyle::~QSGIStyle ( ) [virtual]

Destroys the style.

QSGIStyle::QSGIStyle ( bool  useHighlightCols = FALSE)
virtual QSGIStyle::~QSGIStyle ( ) [virtual]

Documentación de las funciones miembro

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.

bool QSGIStyle::eventFilter ( QObject o,
QEvent e 
) [protected, virtual]

Reimplementado de QObject.

bool QSGIStyle::eventFilter ( QObject ,
QEvent  
) [protected, virtual]

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.

Atención:
If you delete the receiver object in this function, be sure to return TRUE. Otherwise, Qt will forward the event to the deleted object and the program might crash.
Ver también:
installEventFilter()

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.

QRect QSGIStyle::subRect ( SubRect  r,
const QWidget widget 
) const [virtual]

Reimplementado de QMotifStyle.

QRect QSGIStyle::subRect ( SubRect  r,
const QWidget widget 
) const [virtual]

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.

Ver también:
polish()

Reimplementado de QStyle.

void QSGIStyle::unPolish ( 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. Undoes the application polish.

Ver también:
polish()

Reimplementado de QStyle.

void QSGIStyle::unPolish ( QWidget w) [virtual]

Reimplementado de QStyle.

void QSGIStyle::unPolish ( QApplication ) [virtual]

Reimplementado de QStyle.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'