Qt Utilities  5.13.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Public Member Functions | Protected Member Functions | Properties | List of all members
Widgets::IconButton Class Reference

A simple QAbstractButton implementation displaying a QPixmap. More...

#include <iconbutton.h>

Inheritance diagram for Widgets::IconButton:
[legend]
Collaboration diagram for Widgets::IconButton:
[legend]

Public Member Functions

 IconButton (QWidget *parent=nullptr)
 Constructs an icon button. More...
 
 ~IconButton () override
 Destroys the icon button. More...
 
const QPixmap & pixmap () const
 
void setPixmap (const QPixmap &pixmap)
 Sets the pixmap. More...
 
QSize sizeHint () const override
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
void keyReleaseEvent (QKeyEvent *event) override
 

Properties

QPixmap pixmap
 Returns the pixmap. More...
 

Detailed Description

A simple QAbstractButton implementation displaying a QPixmap.

Definition at line 11 of file iconbutton.h.

Constructor & Destructor Documentation

◆ IconButton()

Widgets::IconButton::IconButton ( QWidget *  parent = nullptr)
explicit

Constructs an icon button.

Definition at line 18 of file iconbutton.cpp.

◆ ~IconButton()

Widgets::IconButton::~IconButton ( )
override

Destroys the icon button.

Definition at line 28 of file iconbutton.cpp.

Member Function Documentation

◆ keyPressEvent()

void Widgets::IconButton::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 66 of file iconbutton.cpp.

◆ keyReleaseEvent()

void Widgets::IconButton::keyReleaseEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 75 of file iconbutton.cpp.

◆ paintEvent()

void Widgets::IconButton::paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 42 of file iconbutton.cpp.

◆ pixmap()

const QPixmap& Widgets::IconButton::pixmap ( ) const

◆ setPixmap()

void Widgets::IconButton::setPixmap ( const QPixmap &  pixmap)
inline

Sets the pixmap.

Definition at line 43 of file iconbutton.h.

◆ sizeHint()

QSize Widgets::IconButton::sizeHint ( ) const
override

Definition at line 32 of file iconbutton.cpp.

Property Documentation

◆ pixmap

const QPixmap & Widgets::IconButton::pixmap
inlinereadwrite

Returns the pixmap.

Definition at line 13 of file iconbutton.h.


The documentation for this class was generated from the following files: