Class SBGUIPushButtonPixmap#
ClassList > SBGUIPushButtonPixmap
#include <SBGUIPushButtonPixmap.hpp>
Inherits the following classes: QPushButton
Public Functions#
Type | Name |
---|---|
SBGUIPushButtonPixmap (QWidget * parent=nullptr) Constructs the pixmap push button. |
|
SBGUIPushButtonPixmap (const QString & text, QWidget * parent=nullptr) Constructs the pixmap push button, discards the text. |
|
QPixmap | getScaledPixmap () const Returns the pixmap scaled to the size of the button with the margin subtracted from each side. |
void | setIcon (const QPixmap & pixmap) Sets pixmap as the icon. |
void | setMargin (unsigned int margin) Sets the margin between the button border and the icon border. |
virtual | ~SBGUIPushButtonPixmap () Destructs the button. |
Protected Attributes#
Type | Name |
---|---|
unsigned int | margin The margin between the button border and the icon border. |
QPixmap | originalPixmap The original pixmap. |
Protected Functions#
Type | Name |
---|---|
void | resizeEvent (QResizeEvent * event) |
Detailed Description#
The SBGUIPushButtonPixmap class extends QPushButton to have a button that is fully.
Short name: SBPushButtonPixmap
Public Functions Documentation#
function SBGUIPushButtonPixmap [1/2]#
Constructs the pixmap push button.
function SBGUIPushButtonPixmap [2/2]#
Constructs the pixmap push button, discards the text.
explicit SBGUIPushButtonPixmap::SBGUIPushButtonPixmap (
const QString & text,
QWidget * parent=nullptr
)
function getScaledPixmap#
Returns the pixmap scaled to the size of the button with the margin subtracted from each side.
function setIcon#
Sets pixmap
as the icon.
function setMargin#
Sets the margin between the button border and the icon border.
function ~SBGUIPushButtonPixmap#
Destructs the button.
Protected Attributes Documentation#
variable margin#
The margin between the button border and the icon border.
variable originalPixmap#
The original pixmap.