LibEngsas
Public Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
EPushButton Class Reference

QPushButton replacement, which handles "iconsAndText"-option and QIcon::fromTheme. More...

#include <epushbutton.h>

+ Inheritance diagram for EPushButton:
+ Collaboration diagram for EPushButton:

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. More...
 
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. More...
 
void setText (const QString &text)
 

Properties

bool showText
 

Private Member Functions

void init (QString text=QString())
 

Private Attributes

bool myShowText
 
bool iconsAndText
 
QString myText
 

Detailed Description

QPushButton replacement, which handles "iconsAndText"-option and QIcon::fromTheme.

This button hides the text, if:

Constructor & Destructor Documentation

EPushButton::EPushButton ( QWidget *  parent = 0)

+ Here is the call graph for this function:

EPushButton::EPushButton ( const QString &  text,
QWidget *  parent = 0 
)

+ Here is the call graph for this function:

EPushButton::EPushButton ( QString  standardIconName,
QString  iconPath,
const QString &  text,
QWidget *  parent = 0 
)
See also
setIcon(QString, QString)

+ Here is the call graph for this function:

Member Function Documentation

void EPushButton::init ( QString  text = QString())
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EPushButton::setIcon ( const QIcon &  icon)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:

void EPushButton::setShowText ( bool  anytime = true)

Determines, if the text is hidden (Default), when an icon is there or not.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EPushButton::setText ( const QString &  text)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EPushButton::showText ( ) const

+ Here is the caller graph for this function:

Member Data Documentation

bool EPushButton::iconsAndText
private
bool EPushButton::myShowText
private
QString EPushButton::myText
private

Property Documentation

bool EPushButton::showText
readwriteprivate

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: