File indexing completed on 2025-03-16 06:50:39
0001 /* 0002 SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef KFILEMETADATA_TYPEINFO_H 0008 #define KFILEMETADATA_TYPEINFO_H 0009 0010 #include "types.h" 0011 #include "kfilemetadata_export.h" 0012 #include <QString> 0013 #include <memory> 0014 0015 namespace KFileMetaData { 0016 0017 class TypeInfoPrivate; 0018 /** 0019 * \class TypeInfo typeinfo.h <KFileMetaData/TypeInfo> 0020 */ 0021 class KFILEMETADATA_EXPORT TypeInfo 0022 { 0023 public: 0024 TypeInfo(Type::Type type); 0025 TypeInfo(const TypeInfo& ti); 0026 ~TypeInfo(); 0027 0028 TypeInfo& operator=(const TypeInfo& rhs); 0029 0030 /* 0031 * @since 5.91 0032 */ 0033 bool operator==(const TypeInfo& rhs) const; 0034 0035 /** 0036 * The type identifier 0037 */ 0038 Type::Type type() const; 0039 0040 /** 0041 * An internal unique name for the type 0042 */ 0043 QString name() const; 0044 0045 /** 0046 * A user visible translated name for this type 0047 */ 0048 QString displayName() const; 0049 0050 /** 0051 * Construct a TypeInfo from the internal type name. 0052 * The internal type name is case insensitive 0053 */ 0054 static TypeInfo fromName(const QString& name); 0055 0056 private: 0057 const std::unique_ptr<TypeInfoPrivate> d; 0058 }; 0059 } 0060 0061 #endif // KFILEMETADATA_TYPEINFO_H