Krita Source Code Documentation
Loading...
Searching...
No Matches
KoIcon.h File Reference
#include <kis_icon_utils.h>
#include <QString>

Go to the source code of this file.

Macros

#define kisIcon(name)   (KisIconUtils::loadIcon(name))
 
#define koIcon(name)   (KisIconUtils::loadIcon(QLatin1String(name)))
 Use these macros for icons without any issues.
 
#define koIconName(name)   (QLatin1String(name))
 
#define koIconNameCStr(name)   (name)
 
#define koIconNameCStrNeeded(comment, neededName)   (neededName)
 
#define koIconNameCStrNeededWithSubs(comment, neededName, substituteName)   (substituteName)
 
#define koIconNameNeeded(comment, neededName)   (QLatin1String(neededName))
 
#define koIconNameNeededWithSubs(comment, neededName, substituteName)   (QLatin1String(substituteName))
 
#define koIconNeeded(comment, neededName)   (KisIconUtils::loadIcon(QLatin1String(neededName)))
 Use these macros if there is a proper icon missing.
 
#define koIconNeededWithSubs(comment, neededName, substituteName)   (KisIconUtils::loadIcon(QLatin1String(substituteName)))
 

Macro Definition Documentation

◆ kisIcon

#define kisIcon ( name)    (KisIconUtils::loadIcon(name))

Definition at line 26 of file KoIcon.h.

◆ koIcon

#define koIcon ( name)    (KisIconUtils::loadIcon(QLatin1String(name)))

Use these macros for icons without any issues.

Macros to support collecting the icons in use.

After any change to this list of macros the file /CheckIcons.sh needs to be updated accordingly, to ensure that the icon names of the affected macros are still considered in the extraction.

The naming pattern of the macros is like this:

  • koIcon*, kisIcon return a QIcon object
  • koIconName* returns a QLatin1String (aligned with usual API where "iconName" property is of type QString)
  • koIconNameCStr* returns a const char*

Definition at line 25 of file KoIcon.h.

◆ koIconName

#define koIconName ( name)    (QLatin1String(name))

Definition at line 27 of file KoIcon.h.

◆ koIconNameCStr

#define koIconNameCStr ( name)    (name)

Definition at line 28 of file KoIcon.h.

◆ koIconNameCStrNeeded

#define koIconNameCStrNeeded ( comment,
neededName )   (neededName)

Definition at line 35 of file KoIcon.h.

◆ koIconNameCStrNeededWithSubs

#define koIconNameCStrNeededWithSubs ( comment,
neededName,
substituteName )   (substituteName)

Definition at line 36 of file KoIcon.h.

◆ koIconNameNeeded

#define koIconNameNeeded ( comment,
neededName )   (QLatin1String(neededName))

Definition at line 33 of file KoIcon.h.

◆ koIconNameNeededWithSubs

#define koIconNameNeededWithSubs ( comment,
neededName,
substituteName )   (QLatin1String(substituteName))

Definition at line 34 of file KoIcon.h.

◆ koIconNeeded

#define koIconNeeded ( comment,
neededName )   (KisIconUtils::loadIcon(QLatin1String(neededName)))

Use these macros if there is a proper icon missing.

Definition at line 31 of file KoIcon.h.

◆ koIconNeededWithSubs

#define koIconNeededWithSubs ( comment,
neededName,
substituteName )   (KisIconUtils::loadIcon(QLatin1String(substituteName)))

Definition at line 32 of file KoIcon.h.