Web Analytics Made Easy - Statcounter
Skip to content

Class SBGUIPushButtonPixmap#

ClassList > SBGUIPushButtonPixmap

More...

  • #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.

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


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.

QPixmap SBGUIPushButtonPixmap::getScaledPixmap () const


function setIcon#

Sets pixmap as the icon.

void SBGUIPushButtonPixmap::setIcon (
    const QPixmap & pixmap
) 


function setMargin#

Sets the margin between the button border and the icon border.

void SBGUIPushButtonPixmap::setMargin (
    unsigned int margin
) 


function ~SBGUIPushButtonPixmap#

Destructs the button.

virtual SBGUIPushButtonPixmap::~SBGUIPushButtonPixmap () 


Protected Attributes Documentation#

variable margin#

The margin between the button border and the icon border.

unsigned int margin;


variable originalPixmap#

The original pixmap.

QPixmap originalPixmap;


Protected Functions Documentation#

function resizeEvent#

void SBGUIPushButtonPixmap::resizeEvent (
    QResizeEvent * event
)