ImageButton Class Reference
A simple class for icon button.
More...
#include <imagebutton.h>
List of all members.
Public Member Functions |
| ImageButton (const QString &normalIconPictureFileName=QString(), const QString &selectedIconPictureFileName=QString(), const QString &disabledIconPictureFileName=QString(), QWidget *parent=0) |
| Constructor.
|
void | setButtonIcon (const QPixmap &image) |
| Set button icon.
|
Protected Member Functions |
void | paintEvent (QPaintEvent *event) |
| Event handler for paint events.
|
Private Member Functions |
void | initButton (const QSize &size, const QIcon &icon) |
| Initializes the button by setting graphics and alpha mask.
|
Detailed Description
A simple class for icon button.
- Author:
- Pekka Nissinen - pekka.nissinen (at) ixonos.com
Constructor & Destructor Documentation
ImageButton::ImageButton |
( |
const QString & |
normalIconPictureFileName = QString() , |
|
|
const QString & |
selectedIconPictureFileName = QString() , |
|
|
const QString & |
disabledIconPictureFileName = QString() , |
|
|
QWidget * |
parent = 0 | |
|
) |
| | |
Constructor.
- Parameters:
-
| normalIconPictureFileName | Normal state icon image file name |
| selectedIconPictureFileName | Selected state icon image file name (optional) |
| disabledIconPictureFileName | Disabled state icon image file name (optional) |
| parent | Parent |
Member Function Documentation
void ImageButton::initButton |
( |
const QSize & |
size, |
|
|
const QIcon & |
icon | |
|
) |
| | [private] |
Initializes the button by setting graphics and alpha mask.
- Parameters:
-
| size | Size of the button icon |
| icon | Image icon |
void ImageButton::paintEvent |
( |
QPaintEvent * |
event |
) |
[protected] |
Event handler for paint events.
Paints the button and its icon
- Parameters:
-
void ImageButton::setButtonIcon |
( |
const QPixmap & |
image |
) |
|
Set button icon.
- Parameters:
-
The documentation for this class was generated from the following files: