Freeciv21
Develop your civilization from humble roots to a global empire
fcIcons Class Reference

#include <icons.h>

+ Collaboration diagram for fcIcons:

Public Member Functions

QIcon getIcon (const QString &id)
 Returns icon by given name. More...
 
QPixmap * getPixmap (const QString &id)
 Returns pixmap by given name, pixmap needs to be deleted by someone else. More...
 
QString getPath (const QString &id)
 Returns path for icon. More...
 

Static Public Member Functions

static fcIconsinstance ()
 Returns instance of fc_icons. More...
 
static void drop ()
 Deletes fc_icons instance. More...
 

Private Member Functions

 Q_DISABLE_COPY (fcIcons)
 
 fcIcons ()
 Icon provider constructor. More...
 

Static Private Attributes

static fcIconsm_instance = nullptr
 

Detailed Description

Definition at line 17 of file icons.h.

Constructor & Destructor Documentation

◆ fcIcons()

fcIcons::fcIcons ( )
explicitprivatedefault

Icon provider constructor.

Referenced by instance().

Member Function Documentation

◆ drop()

void fcIcons::drop ( )
static

Deletes fc_icons instance.

Definition at line 47 of file icons.cpp.

◆ getIcon()

QIcon fcIcons::getIcon ( const QString &  id)

Returns icon by given name.

Definition at line 125 of file icons.cpp.

Referenced by chat_widget::chat_widget(), move_widget::move_widget(), pageGame::pageGame(), and page_pregame::update_start_page().

◆ getPath()

QString fcIcons::getPath ( const QString &  id)

Returns path for icon.

Definition at line 194 of file icons.cpp.

◆ getPixmap()

QPixmap * fcIcons::getPixmap ( const QString &  id)

Returns pixmap by given name, pixmap needs to be deleted by someone else.

Definition at line 166 of file icons.cpp.

Referenced by close_widget::close_widget(), qfc_dialog::qfc_dialog(), and scale_widget::scale_widget().

◆ instance()

◆ Q_DISABLE_COPY()

fcIcons::Q_DISABLE_COPY ( fcIcons  )
private

Member Data Documentation

◆ m_instance

fcIcons * fcIcons::m_instance = nullptr
staticprivate

Definition at line 22 of file icons.h.

Referenced by drop(), and instance().