blob: 72f0734d2b21b8eb4e09ed71b795da13cb083eec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "../utils_global.h"
#ifdef QT_GUI_LIB
#include <QFileIconProvider>
#include <QStyle>
namespace Utils {
class FilePath;
namespace FileIconProvider {
// Access to the single instance
QTCREATOR_UTILS_EXPORT QFileIconProvider *iconProvider();
// Access to individual items
QTCREATOR_UTILS_EXPORT QIcon icon(const Utils::FilePath &filePath);
QTCREATOR_UTILS_EXPORT QIcon icon(QFileIconProvider::IconType type);
// Register additional overlay icons
QTCREATOR_UTILS_EXPORT QPixmap overlayIcon(const QPixmap &baseIcon, const QIcon &overlayIcon);
QTCREATOR_UTILS_EXPORT QPixmap overlayIcon(QStyle::StandardPixmap baseIcon,
const QIcon &overlayIcon,
const QSize &size);
QTCREATOR_UTILS_EXPORT void registerIconOverlayForSuffix(const QString &path, const QString &suffix);
QTCREATOR_UTILS_EXPORT void registerIconOverlayForFilename(const QString &path,
const QString &filename);
QTCREATOR_UTILS_EXPORT void registerIconOverlayForMimeType(const QString &path,
const QString &mimeType);
QTCREATOR_UTILS_EXPORT void registerIconOverlayForMimeType(const QIcon &icon,
const QString &mimeType);
QTCREATOR_UTILS_EXPORT QIcon directoryIcon(const QString &overlay);
} // namespace FileIconProvider
} // namespace Utils
#endif
|