QtScrollWheel Class Reference

The QtScrollWheel class provides a scroll wheel to set values. More...

#include <qtscrollwheel.h>

Collaboration diagram for QtScrollWheel:
[legend]

List of all members.

Public Member Functions

 QtScrollWheel (QWidget *parent=NULL)
 ~QtScrollWheel ()
void setSkin (const QString &skin)
QString skin () const

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseMoveEvent (QMouseEvent *event)
virtual void wheelEvent (QWheelEvent *event)
virtual void paintEvent (QPaintEvent *event)
virtual QSize sizeHint () const
void init ()
void changeValue (int delta)

Properties

QString skin

Detailed Description

The QtScrollWheel class provides a scroll wheel to set values.

The description of the QtScrollWheel.

The QtScrollWheel is an example to show the capabilities of the Qt Framework related to customized controls.

Here is a possible implementation shown

        // Create a QtScrollWheel
        QWidget * widget = new QWidget(this)
        QtScrollWheel * wheel = new QtScrollWheel(widget);
        wheel->setSkin("Beryl");
        widget->addWidget(wheel);
        widget->show();

It is important to call the function setSkin() to load a skin. If setSkin() is not called the QtScrollWheel will not have any visible content. The parameter skin has the skin name. The skins are in the resource file defined in the project file. The name scheme in the resource file is "Skin Name"/"unique picture name.svg".

The setSkin() function loads the diffrent skins over the "Skin name". The needed realised graphics for this control are "normal.svg", "hovered.svg" and "pressed.svg". If you want to add new skins, they have to follow the name scheme to work.

The actual skin can be read over the skin() function.

See also:
skin(), setSkin()

No Signals defined.

No Slots defined.


Constructor & Destructor Documentation

QtScrollWheel::QtScrollWheel ( QWidget *  parent = NULL  ) 

Constructor of the QAbstractSlider with parent as Parent.

QtScrollWheel::~QtScrollWheel (  ) 

Destructor


Member Function Documentation

void QtScrollWheel::mouseMoveEvent ( QMouseEvent *  event  )  [protected, virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void QtScrollWheel::mousePressEvent ( QMouseEvent *  event  )  [protected, virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void QtScrollWheel::setSkin ( const QString &  skin  ) 

With this function you can set the skin that will be displayed in the widget.

        QtScrollWheel * scroll = new QtScrollWheel(this);
        scroll->setSkin("Beryl");

This function has to be called before using the QtScrollWheel.

See also:
skin()

Referenced by ScrollDialPopup::setSkin().

void QtScrollWheel::wheelEvent ( QWheelEvent *  event  )  [protected, virtual]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


Property Documentation

QString QtScrollWheel::skin [read, write]

This function returns the actual skin name. If no skin has been set the return value is "".

        QtScrollWheel * scroll = new QtScrollWheel(this);
        scroll->setSkin("Beryl");
        qDebug() << scroll->skin();
See also:
setSkin()

The documentation for this class was generated from the following files:

Generated on Wed Nov 25 17:57:34 2009 for Embedded Widgets by  doxygen 1.6.1