File indexing completed on 2024-05-05 16:09:03
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 #if KFILEMETADATA_ENABLE_DEPRECATED_SINCE(5, 91) 0031 /* 0032 * @deprecated since 5.91 Use TypeInfo::operator==() const instead. 0033 */ 0034 KFILEMETADATA_DEPRECATED_VERSION(5, 91, "Use TypeInfo::operator==() const instead") 0035 bool operator==(const TypeInfo& rhs); 0036 #endif 0037 /* 0038 * @since 5.91 0039 */ 0040 bool operator==(const TypeInfo& rhs) const; 0041 0042 /** 0043 * The type identifier 0044 */ 0045 Type::Type type() const; 0046 0047 /** 0048 * An internal unique name for the type 0049 */ 0050 QString name() const; 0051 0052 /** 0053 * A user visible translated name for this type 0054 */ 0055 QString displayName() const; 0056 0057 /** 0058 * Construct a TypeInfo from the internal type name. 0059 * The internal type name is case insensitive 0060 */ 0061 static TypeInfo fromName(const QString& name); 0062 0063 private: 0064 const std::unique_ptr<TypeInfoPrivate> d; 0065 }; 0066 } 0067 0068 #endif // KFILEMETADATA_TYPEINFO_H