Qt Utilities  6.0.6
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
QtUtilities::IconButton Class Reference

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

#include <iconbutton.h>

Inheritance diagram for QtUtilities::IconButton:
[legend]
Collaboration diagram for QtUtilities::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
 Returns the pixmap. More...
 
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
 

Detailed Description

A simple QAbstractButton implementation displaying a QPixmap.

Definition at line 11 of file iconbutton.h.

Constructor & Destructor Documentation

◆ IconButton()

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

Constructs an icon button.

Definition at line 18 of file iconbutton.cpp.

◆ ~IconButton()

QtUtilities::IconButton::~IconButton ( )
override

Destroys the icon button.

Definition at line 28 of file iconbutton.cpp.

Member Function Documentation

◆ keyPressEvent()

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

Definition at line 66 of file iconbutton.cpp.

◆ keyReleaseEvent()

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

Definition at line 75 of file iconbutton.cpp.

◆ paintEvent()

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

Definition at line 42 of file iconbutton.cpp.

◆ pixmap()

const QPixmap & QtUtilities::IconButton::pixmap ( ) const
inline

Returns the pixmap.

Definition at line 35 of file iconbutton.h.

◆ setPixmap()

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

Sets the pixmap.

Definition at line 43 of file iconbutton.h.

◆ sizeHint()

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

Definition at line 32 of file iconbutton.cpp.

Property Documentation

◆ pixmap

QPixmap QtUtilities::IconButton::pixmap
readwrite

Definition at line 43 of file iconbutton.h.


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