1 /* 2 SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in> 3 4 SPDX-License-Identifier: LGPL-2.1-or-later 5 */ 6 7 #ifndef KFILEMETADATA_TYPEINFO_H 8 #define KFILEMETADATA_TYPEINFO_H 9 10 #include "types.h" 11 #include "kfilemetadata_export.h" 12 #include <QString> 13 14 namespace KFileMetaData { 15 16 /** 17 * \class TypeInfo typeinfo.h <KFileMetaData/TypeInfo> 18 */ 19 class KFILEMETADATA_EXPORT TypeInfo 20 { 21 public: 22 TypeInfo(Type::Type type); 23 TypeInfo(const TypeInfo& ti); 24 ~TypeInfo(); 25 26 TypeInfo& operator=(const TypeInfo& rhs); 27 bool operator==(const TypeInfo& rhs); 28 29 /** 30 * The type identifier 31 */ 32 Type::Type type() const; 33 34 /** 35 * An internal unique name for the type 36 */ 37 QString name() const; 38 39 /** 40 * A user visible translated name for this type 41 */ 42 QString displayName() const; 43 44 /** 45 * Construct a TypeInfo from the internal type name. 46 * The internal type name is case insensitive 47 */ 48 static TypeInfo fromName(const QString& name); 49 50 private: 51 class Private; 52 Private* d; 53 }; 54 } 55 56 #endif // KFILEMETADATA_TYPEINFO_H 57