Web Analytics Made Easy - Statcounter
Skip to content

Class SBGUIPushButtonHover#

ClassList > SBGUIPushButtonHover

More...

  • #include <SBGUIPushButtonHover.hpp>

Inherits the following classes: QPushButton

Public Types#

Type Name
enum IconType

Public Functions#

Type Name
SBGUIPushButtonHover (QWidget * parent=nullptr)
SBGUIPushButtonHover (const QString & text, QWidget * parent=nullptr)
IconType getIconType () const
Returns the icon type.
void setIconType (IconType iconType)
Sets the icon type. This will also set the icons to the standard ones for the non Custom and non Undefined icon types.
void setIcons (const QString & iconPath, const QString & hoverIconPath)
Sets two icons: non-hover and on-hover icons. The icon type is set to Custom.
void setIcons (const QIcon & icon, const QIcon & hoverIcon)
Sets two icons: non-hover and on-hover icons. The icon type is set to Custom.
~SBGUIPushButtonHover ()

Protected Functions#

Type Name
void enterEvent (QEnterEvent * event) override
void leaveEvent (QEvent * event) override

Detailed Description#

The SBGUIPushButtonHover class extends QPushButton to create a transparent (without background) button with an icon that changes on hover.

Short name: SBPushButtonHover

Public Types Documentation#

enum IconType#

enum SBGUIPushButtonHover::IconType {
    Undefined,
    Add,
    Edit,
    Remove,
    Delete,
    Clear,
    Reset,
    Copy,
    Custom
};

Public Functions Documentation#

function SBGUIPushButtonHover [1/2]#

explicit SBGUIPushButtonHover::SBGUIPushButtonHover (
    QWidget * parent=nullptr
) 

function SBGUIPushButtonHover [2/2]#

explicit SBGUIPushButtonHover::SBGUIPushButtonHover (
    const QString & text,
    QWidget * parent=nullptr
) 

function getIconType#

Returns the icon type.

IconType SBGUIPushButtonHover::getIconType () const


function setIconType#

Sets the icon type. This will also set the icons to the standard ones for the non Custom and non Undefined icon types.

void SBGUIPushButtonHover::setIconType (
    IconType iconType
) 


function setIcons [1/2]#

Sets two icons: non-hover and on-hover icons. The icon type is set to Custom.

void SBGUIPushButtonHover::setIcons (
    const QString & iconPath,
    const QString & hoverIconPath
) 


function setIcons [2/2]#

Sets two icons: non-hover and on-hover icons. The icon type is set to Custom.

void SBGUIPushButtonHover::setIcons (
    const QIcon & icon,
    const QIcon & hoverIcon
) 


function ~SBGUIPushButtonHover#

SBGUIPushButtonHover::~SBGUIPushButtonHover () 

Protected Functions Documentation#

function enterEvent#

void SBGUIPushButtonHover::enterEvent (
    QEnterEvent * event
) override

function leaveEvent#

void SBGUIPushButtonHover::leaveEvent (
    QEvent * event
) override