Class SBGUIPushButtonHover#
ClassList > SBGUIPushButtonHover
#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]#
function SBGUIPushButtonHover [2/2]#
explicit SBGUIPushButtonHover::SBGUIPushButtonHover (
const QString & text,
QWidget * parent=nullptr
)
function getIconType#
Returns the icon type.
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.
function setIcons [1/2]#
Sets two icons: non-hover and on-hover icons. The icon type is set to Custom.
function setIcons [2/2]#
Sets two icons: non-hover and on-hover icons. The icon type is set to Custom.