Class SBGUIPushButtonHover#
ClassList > SBGUIPushButtonHover
The SBGUIPushButtonHover class extends QPushButton to create a transparent (without background) button with an icon that changes on hover.More...
#include "SBGUIPushButtonHover.hpp"
Inherits the following classes: QPushButton
Public Types#
Type | Name |
---|---|
enum | IconType Available icon types. |
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 Handles enter events. |
void | leaveEvent (QEvent * event) override Handles leave events. |
Detailed Description#
Short name: SBPushButtonHover
Public Types Documentation#
enum IconType#
Available icon types.
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.
function ~SBGUIPushButtonHover#
Protected Functions Documentation#
function enterEvent#
Handles enter events.
function leaveEvent#
Handles leave events.