Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:56

0001 // Copyright (C) 2020 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QABSTRACTFILEICONPROVIDER_H
0005 #define QABSTRACTFILEICONPROVIDER_H
0006 
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtCore/qfileinfo.h>
0009 #include <QtCore/qscopedpointer.h>
0010 #include <QtGui/qicon.h>
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QAbstractFileIconProviderPrivate;
0015 
0016 class Q_GUI_EXPORT QAbstractFileIconProvider
0017 {
0018 public:
0019     enum IconType { Computer, Desktop, Trashcan, Network, Drive, Folder, File };
0020     enum Option {
0021         DontUseCustomDirectoryIcons = 0x00000001
0022     };
0023     Q_DECLARE_FLAGS(Options, Option)
0024 
0025     QAbstractFileIconProvider();
0026     virtual ~QAbstractFileIconProvider();
0027 
0028     virtual QIcon icon(IconType) const;
0029     virtual QIcon icon(const QFileInfo &) const;
0030     virtual QString type(const QFileInfo &) const;
0031 
0032     virtual void setOptions(Options);
0033     virtual Options options() const;
0034 
0035 protected:
0036     QAbstractFileIconProvider(QAbstractFileIconProviderPrivate &dd);
0037     QScopedPointer<QAbstractFileIconProviderPrivate> d_ptr;
0038 
0039 private:
0040     Q_DECLARE_PRIVATE(QAbstractFileIconProvider)
0041     Q_DISABLE_COPY(QAbstractFileIconProvider)
0042 };
0043 
0044 Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileIconProvider::Options)
0045 
0046 QT_END_NAMESPACE
0047 
0048 #endif // QABSTRACTFILEICONPROVIDER_H