Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qabstractfileiconprovider.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QABSTRACTFILEICONPROVIDER_H
5#define QABSTRACTFILEICONPROVIDER_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qfileinfo.h>
9#include <QtCore/qscopedpointer.h>
10#include <QtGui/qicon.h>
11
13
15
16class Q_GUI_EXPORT QAbstractFileIconProvider
17{
18public:
19 enum IconType { Computer, Desktop, Trashcan, Network, Drive, Folder, File };
20 enum Option {
21 DontUseCustomDirectoryIcons = 0x00000001
22 };
24
27
28 virtual QIcon icon(IconType) const;
29 virtual QIcon icon(const QFileInfo &) const;
30 virtual QString type(const QFileInfo &) const;
31
32 virtual void setOptions(Options);
33 virtual Options options() const;
34
35protected:
37 QScopedPointer<QAbstractFileIconProviderPrivate> d_ptr;
38
39private:
40 Q_DECLARE_PRIVATE(QAbstractFileIconProvider)
41 Q_DISABLE_COPY(QAbstractFileIconProvider)
42};
43
44Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileIconProvider::Options)
45
47
48#endif // QABSTRACTFILEICONPROVIDER_H
virtual ~QAbstractFileIconProvider()
Destroys the file icon provider.
QScopedPointer< QAbstractFileIconProviderPrivate > d_ptr
IconType
\value Computer The icon used for the computing device as a whole \value Desktop The icon for the spe...
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
GLenum type