KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
Resources Class Reference

Central registry mapping integer IDs to Qt resource images. More...

#include <resources.h>

Public Types

enum  StandardImage {
  UnknownImage = 0 , BackDelete , CheckBox , DropDownDown ,
  DropDownUp , CloseButton , GreenPlus , Label ,
  NextTrack , Pause , Play , PreviousTrack ,
  RedMinus , Refresh , Search , Spinner ,
  Stop
}
 Built-in standard image identifiers. More...
 

Static Public Member Functions

static void registerImage (int id, const QString &resourcePath)
 Register a Qt resource path under an integer ID.
 
static QIcon getIcon (int id)
 Return a QIcon for the given image ID.
 
static QPixmap getPixmap (int id)
 Return a QPixmap for the given image ID.
 

Static Public Attributes

static const int FirstUserResource = 100000
 First ID safe for application-defined resources (avoid collisions with StandardImage).
 

Detailed Description

Central registry mapping integer IDs to Qt resource images.

Resources maintains a map of integer IDs to Qt resource paths and provides factory methods for retrieving QIcon and QPixmap instances by ID.

Standard images (play, pause, spinner, etc.) are pre-registered under the StandardImage enum values. Application-specific images should use IDs starting at FirstUserResource to avoid collisions.

Definition at line 25 of file resources.h.

Member Enumeration Documentation

◆ StandardImage

Built-in standard image identifiers.

Enumerator
UnknownImage 

Sentinel value for an unknown image.

BackDelete 

Back-delete / clear icon.

CheckBox 

Checkbox icon.

DropDownDown 

Drop-down arrow pointing down.

DropDownUp 

Drop-down arrow pointing up.

CloseButton 

Close / X button icon.

GreenPlus 

Green plus / add icon.

Label 

Label icon.

NextTrack 

Next track / skip-forward icon.

Pause 

Pause icon.

Play 

Play icon.

PreviousTrack 

Previous track / skip-back icon.

RedMinus 

Red minus / remove icon.

Refresh 

Refresh / reload icon.

Search 

Search / magnifier icon.

Spinner 

Spinner / busy indicator icon.

Stop 

Stop icon.

Definition at line 52 of file resources.h.

Member Function Documentation

◆ getIcon()

static QIcon Resources::getIcon ( int  id)
static

Return a QIcon for the given image ID.

Parameters
idRegistered image ID
Returns
QIcon loaded from the registered resource path

◆ getPixmap()

static QPixmap Resources::getPixmap ( int  id)
static

Return a QPixmap for the given image ID.

Parameters
idRegistered image ID
Returns
QPixmap loaded from the registered resource path

◆ registerImage()

static void Resources::registerImage ( int  id,
const QString &  resourcePath 
)
static

Register a Qt resource path under an integer ID.

Parameters
idInteger ID to associate with the image
resourcePathQt resource path (e.g. ":/icons/play.png")

Member Data Documentation

◆ FirstUserResource

const int Resources::FirstUserResource = 100000
static

First ID safe for application-defined resources (avoid collisions with StandardImage).

Definition at line 75 of file resources.h.


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