WSF
wizard::UiResources Class Reference

This class contains the loaded icons used by the application. More...

#include <UiResources.hpp>

Public Member Functions

virtual ~UiResources ()
 Virtual destructor.
QFont & GetFont ()
QIcon & GetIcon (const QString &aImageName, bool aScale=true)
QIcon & GetIconFromTheme (const QString &aImageName, bool aScale=true)
QIcon GetFileIcon (const QFileInfo &aInfo)
QImage & GetImageFromTheme (const QString &aImageName, bool aScale=true)
QImage & GetDimImageFromTheme (const QString &aImageName, bool aScale=true)
std::pair< unsigned int, unsigned int > ResizeImageWithFont ()
 Will vary image size based on font size between current limits of 24U and 6U found in wizard::EditorManager::AdjustFontSize.

Static Public Member Functions

static void Create ()
 Singleton instance.
static void Destroy ()
static UiResourcesGetInstance ()

Static Public Attributes

static constexpr unsigned int cBASE_ICON_SIZE = 16
static constexpr unsigned int cMIN_FONT_SIZE = 6
static constexpr unsigned int cMAX_FONT_SIZE = 24

Protected Member Functions

void Initialize ()
QImage ToScale (QImage aImage, int aWidth)
QPixmap ToScalePM (QImage aImage, int aWidth)
QIcon & AddIcon (const QString &aIconName, bool aScale)
QImage & AddImage (const QString &aImageName, bool aScale)
QImage & AddDimImage (const QString &aImageName, bool aScale)

Detailed Description

This class contains the loaded icons used by the application.

Constructor & Destructor Documentation

◆ ~UiResources()

wizard::UiResources::~UiResources ( )
virtual

Virtual destructor.

Member Function Documentation

◆ AddDimImage()

QImage & wizard::UiResources::AddDimImage ( const QString & aImageName,
bool aScale )
protected

References cBASE_ICON_SIZE, and ToScale().

Referenced by GetDimImageFromTheme().

◆ AddIcon()

QIcon & wizard::UiResources::AddIcon ( const QString & aIconName,
bool aScale )
protected

References cBASE_ICON_SIZE, and ToScale().

Referenced by GetIcon(), and GetIconFromTheme().

◆ AddImage()

QImage & wizard::UiResources::AddImage ( const QString & aImageName,
bool aScale )
protected

References cBASE_ICON_SIZE, and ToScale().

Referenced by GetImageFromTheme().

◆ Create()

void wizard::UiResources::Create ( )
static

Singleton instance.

References Initialize().

Referenced by wizard::Environment::Environment().

◆ Destroy()

void wizard::UiResources::Destroy ( )
static

◆ GetDimImageFromTheme()

QImage & wizard::UiResources::GetDimImageFromTheme ( const QString & aImageName,
bool aScale = true )

References AddDimImage().

◆ GetFileIcon()

QIcon wizard::UiResources::GetFileIcon ( const QFileInfo & aInfo)

◆ GetFont()

QFont & wizard::UiResources::GetFont ( )
inline

◆ GetIcon()

QIcon & wizard::UiResources::GetIcon ( const QString & aImageName,
bool aScale = true )

References AddIcon().

◆ GetIconFromTheme()

QIcon & wizard::UiResources::GetIconFromTheme ( const QString & aImageName,
bool aScale = true )

References AddIcon().

◆ GetImageFromTheme()

QImage & wizard::UiResources::GetImageFromTheme ( const QString & aImageName,
bool aScale = true )

References AddImage().

◆ GetInstance()

UiResources & wizard::UiResources::GetInstance ( )
inlinestatic

◆ Initialize()

void wizard::UiResources::Initialize ( )
protected

Referenced by Create().

◆ ResizeImageWithFont()

std::pair< unsigned int, unsigned int > wizard::UiResources::ResizeImageWithFont ( )

Will vary image size based on font size between current limits of 24U and 6U found in wizard::EditorManager::AdjustFontSize.

References cBASE_ICON_SIZE, cMAX_FONT_SIZE, and cMIN_FONT_SIZE.

◆ ToScale()

QImage wizard::UiResources::ToScale ( QImage aImage,
int aWidth )
protected

Referenced by AddDimImage(), AddIcon(), and AddImage().

◆ ToScalePM()

QPixmap wizard::UiResources::ToScalePM ( QImage aImage,
int aWidth )
protected

Member Data Documentation

◆ cBASE_ICON_SIZE

unsigned int wizard::UiResources::cBASE_ICON_SIZE = 16
staticconstexpr

◆ cMAX_FONT_SIZE

unsigned int wizard::UiResources::cMAX_FONT_SIZE = 24
staticconstexpr

◆ cMIN_FONT_SIZE

unsigned int wizard::UiResources::cMIN_FONT_SIZE = 6
staticconstexpr

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved