84 using IconAttribute = DDciIcon::IconAttibute;
87 DontFallbackMode = 0x01,
88 RegardPaddingsAsSize = 0x02
90 Q_DECLARE_FLAGS(IconMatchedFlags, IconMatchedFlag)
91 Q_FLAGS(IconMatchedFlags);
94 explicit DDciIcon(
const DCORE_NAMESPACE::DDciFile *dciFile);
95 explicit DDciIcon(
const QString &fileName);
96 explicit DDciIcon(
const QByteArray &data);
105 DDciIconMatchResult matchIcon(
int size, Theme theme, Mode mode, IconMatchedFlags flags = None)
const;
107 int actualSize(DDciIconMatchResult result)
const;
108 int actualSize(
int size, Theme theme, Mode mode = Normal)
const;
110 QList<int> availableSizes(Theme theme, Mode mode = Normal)
const;
111 bool isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr)
const;
112 static bool isSupportedAttribute(
const DDciIconImage &image, IconAttribute attr);
114 QPixmap pixmap(qreal devicePixelRatio,
int iconSize, Theme theme, Mode mode = Normal,
116 QPixmap pixmap(qreal devicePixelRatio,
int iconSize, DDciIconMatchResult result,
119 void paint(QPainter *painter,
const QRect &rect, qreal devicePixelRatio, Theme theme, Mode mode = Normal,
121 void paint(QPainter *painter,
const QRect &rect, qreal devicePixelRatio, DDciIconMatchResult result,
124 DDciIconImage image(DDciIconMatchResult result,
int size, qreal devicePixelRatio)
const;
126 static DDciIcon fromTheme(
const QString &name);
131 QSharedDataPointer<DDciIconPrivate> d;
132#ifndef QT_NO_DATASTREAM
133 friend QDataStream &operator<<(QDataStream &,
const DDciIcon &);
134 friend QDataStream &operator>>(QDataStream &,
DDciIcon &);