Changeset View
Changeset View
Standalone View
Standalone View
src/kiconloader.h
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | |||||
239 | * @return the QPixmap. Can be null when not found, depending on | 239 | * @return the QPixmap. Can be null when not found, depending on | ||
240 | * @p canReturnNull. | 240 | * @p canReturnNull. | ||
241 | */ | 241 | */ | ||
242 | QPixmap loadIcon(const QString &name, KIconLoader::Group group, int size = 0, | 242 | QPixmap loadIcon(const QString &name, KIconLoader::Group group, int size = 0, | ||
243 | int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList(), | 243 | int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList(), | ||
244 | QString *path_store = nullptr, | 244 | QString *path_store = nullptr, | ||
245 | bool canReturnNull = false) const; | 245 | bool canReturnNull = false) const; | ||
246 | 246 | | |||
247 | // FIXME docs | ||||
cfeck: FIXME | |||||
248 | QPixmap loadIcon(const QString &name, KIconLoader::Group group, qreal scale, int size = 0, | ||||
249 | int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList(), | ||||
250 | QString *path_store = nullptr, | ||||
251 | bool canReturnNull = false) const; | ||||
252 | | ||||
247 | /** | 253 | /** | ||
248 | * Loads an icon for a mimetype. | 254 | * Loads an icon for a mimetype. | ||
249 | * This is basically like loadIcon except that extra desktop themes are loaded if necessary. | 255 | * This is basically like loadIcon except that extra desktop themes are loaded if necessary. | ||
250 | * | 256 | * | ||
251 | * @param iconName The name of the icon, without extension, usually from KMimeType. | 257 | * @param iconName The name of the icon, without extension, usually from KMimeType. | ||
252 | * @param group The icon group. This will specify the size of and effects to | 258 | * @param group The icon group. This will specify the size of and effects to | ||
253 | * be applied to the icon. | 259 | * be applied to the icon. | ||
254 | * @param size If nonzero, this overrides the size specified by @p group. | 260 | * @param size If nonzero, this overrides the size specified by @p group. | ||
255 | * See KIconLoader::StdSizes. | 261 | * See KIconLoader::StdSizes. | ||
256 | * @param state The icon state: @p DefaultState, @p ActiveState or | 262 | * @param state The icon state: @p DefaultState, @p ActiveState or | ||
257 | * @p DisabledState. Depending on the user's preferences, the iconloader | 263 | * @p DisabledState. Depending on the user's preferences, the iconloader | ||
258 | * may apply a visual effect to hint about its state. | 264 | * may apply a visual effect to hint about its state. | ||
259 | * @param path_store If not null, the path of the icon is stored here. | 265 | * @param path_store If not null, the path of the icon is stored here. | ||
260 | * @param overlays a list of emblem icons to overlay, by name | 266 | * @param overlays a list of emblem icons to overlay, by name | ||
261 | * @see drawOverlays | 267 | * @see drawOverlays | ||
262 | * @return the QPixmap. Can not be null, the | 268 | * @return the QPixmap. Can not be null, the | ||
263 | * "unknown" pixmap is returned when no appropriate icon has been found. | 269 | * "unknown" pixmap is returned when no appropriate icon has been found. | ||
264 | */ | 270 | */ | ||
265 | QPixmap loadMimeTypeIcon(const QString &iconName, KIconLoader::Group group, int size = 0, | 271 | QPixmap loadMimeTypeIcon(const QString &iconName, KIconLoader::Group group, int size = 0, | ||
266 | int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList(), | 272 | int state = KIconLoader::DefaultState, const QStringList &overlays = QStringList(), | ||
267 | QString *path_store = nullptr) const; | 273 | QString *path_store = nullptr) const; | ||
268 | 274 | | |||
269 | /** | 275 | /** | ||
270 | * Loads a pixmapSequence given the xdg icon name | 276 | * Loads a pixmapSequence given the xdg icon name | ||
271 | * | 277 | * | ||
Next release is 5.47, but I am fine with waiting for additional feedback if this is controversial. cfeck: Next release is 5.47, but I am fine with waiting for additional feedback if this is… | |||||
272 | * @param iconName The name of the icon, without extension. | 278 | * @param iconName The name of the icon, without extension. | ||
273 | * @param size the size/group to be used | 279 | * @param size the size/group to be used | ||
cfeck: loadIcon("test", mygroup, 2);
Which overload is called? | |||||
broulik: Looks like it's always taking the one without `scale`. Meh. | |||||
274 | * @since 5.0 | 280 | * @since 5.0 | ||
275 | */ | 281 | */ | ||
276 | KPixmapSequence loadPixmapSequence(const QString &iconName, int size = SizeSmall) const; | 282 | KPixmapSequence loadPixmapSequence(const QString &iconName, int size = SizeSmall) const; | ||
277 | 283 | | |||
278 | /** | 284 | /** | ||
279 | * Creates an icon set, that will do on-demand loading of the icon. | 285 | * Creates an icon set, that will do on-demand loading of the icon. | ||
280 | * Loading itself is done by calling loadIcon . | 286 | * Loading itself is done by calling loadIcon . | ||
281 | * | 287 | * | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 304 | #endif | |||
337 | */ | 343 | */ | ||
338 | QString moviePath(const QString &name, KIconLoader::Group group, int size = 0) const; | 344 | QString moviePath(const QString &name, KIconLoader::Group group, int size = 0) const; | ||
339 | 345 | | |||
340 | /** | 346 | /** | ||
341 | * Loads an animated icon as a series of still frames. If you want to load | 347 | * Loads an animated icon as a series of still frames. If you want to load | ||
342 | * a .mng animation as QMovie instead, please use loadMovie() instead. | 348 | * a .mng animation as QMovie instead, please use loadMovie() instead. | ||
343 | * @param name The name of the icon. | 349 | * @param name The name of the icon. | ||
344 | * @param group The icon group. See loadIcon(). | 350 | * @param group The icon group. See loadIcon(). | ||
345 | * @param size Override the default size for @p group. | 351 | * @param size Override the default size for @p group. | ||
Context not available. | |||||
Is this missing a rebase or intended? See https://cgit.kde.org/kiconthemes.git/commit/?id=b506a48214a08f56d79e7847a22b0417028a46ff cfeck: Is this missing a rebase or intended? See https://cgit.kde.org/kiconthemes.git/commit/? |
FIXME