6 #ifndef SWIFT_MISC_ICON_H
7 #define SWIFT_MISC_ICON_H
66 bool isIndexBased()
const;
69 bool isGenerated()
const;
72 bool isFileBased()
const;
78 QPixmap toPixmap()
const;
84 QIcon toQIcon()
const;
93 operator QPixmap()
const {
return this->toPixmap(); }
96 QString convertToQString(
bool i18n =
false)
const;
102 static const CIcon &iconByIndex(
int index);
112 int m_rotateDegrees = 0;
113 QString m_descriptiveText;
114 QString m_fileResourcePath;
Value object for icons. An icon is stored in the global icon repository and identified by its index....
CIcons::IconIndex toIcon() const
Identity function.
CIcon()
Default constructor.
void setDescriptiveText(const QString &text)
Set descriptive text.
void setRotation(int degrees)
Rotate by n degrees.
const QString & getDescriptiveText() const
Constructor for generated icon.
bool hasFileResourcePath() const
Resource path available?
const QString & getFileResourcePath() const
Resource path if any.
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
CRTP class template from which a derived class can inherit string streaming operations.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.