QPushButton replacement, which handles "iconsAndText"-option and QIcon::fromTheme.
More...
#include <epushbutton.h>
Public Member Functions |
| EPushButton (QWidget *parent=0) |
| EPushButton (const QString &text, QWidget *parent=0) |
| EPushButton (QString standardIconName, QString iconPath, const QString &text, QWidget *parent=0) |
void | setShowText (bool anytime=true) |
| Determines, if the text is hidden (Default), when an icon is there or not.
|
bool | showText () const |
void | setIcon (const QIcon &icon) |
void | setIcon (QString standardIconName, QString iconPath) |
| Tries to use QIcon::fromTheme(standardIconName ) if possible, otherwise QIcon(iconPath ) is used.
|
void | setText (const QString &text) |
Private Member Functions |
void | init (QString text=QString()) |
Detailed Description
QPushButton replacement, which handles "iconsAndText"-option and QIcon::fromTheme.
This button hides the text, if:
- iconAndText is false
- and icon is not null
- and showText is false (Default)
- See Also
- EAction
Constructor & Destructor Documentation
EPushButton::EPushButton |
( |
QWidget * |
parent = 0 | ) |
|
EPushButton::EPushButton |
( |
const QString & |
text, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
EPushButton::EPushButton |
( |
QString |
standardIconName, |
|
|
QString |
iconPath, |
|
|
const QString & |
text, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
Member Function Documentation
void EPushButton::init |
( |
QString |
text = QString() | ) |
|
|
private |
void EPushButton::setIcon |
( |
const QIcon & |
icon | ) |
|
void EPushButton::setIcon |
( |
QString |
standardIconName, |
|
|
QString |
iconPath |
|
) |
| |
Tries to use QIcon::fromTheme(standardIconName
) if possible, otherwise QIcon(iconPath
) is used.
The QIcon::fromTheme requires at least Qt 4.6.
void EPushButton::setShowText |
( |
bool |
anytime = true | ) |
|
Determines, if the text is hidden (Default), when an icon is there or not.
void EPushButton::setText |
( |
const QString & |
text | ) |
|
bool EPushButton::showText |
( |
| ) |
const |
Member Data Documentation
bool EPushButton::iconsAndText |
|
private |
bool EPushButton::myShowText |
|
private |
QString EPushButton::myText |
|
private |
Property Documentation
bool EPushButton::showText |
|
readwrite |
if set to true, the text will be shown in any case if set to false (default), the text will only be shown, if no icon is set or iconsAndText is true
The documentation for this class was generated from the following files: