KFileMetaData 5.109.0
typeinfo.h
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#include <memory>
14
15namespace KFileMetaData {
16
17class TypeInfoPrivate;
21class KFILEMETADATA_EXPORT TypeInfo
22{
23public:
24 TypeInfo(Type::Type type);
25 TypeInfo(const TypeInfo& ti);
26 ~TypeInfo();
27
28 TypeInfo& operator=(const TypeInfo& rhs);
29
30#if KFILEMETADATA_ENABLE_DEPRECATED_SINCE(5, 91)
31 /*
32 * @deprecated since 5.91 Use TypeInfo::operator==() const instead.
33 */
34KFILEMETADATA_DEPRECATED_VERSION(5, 91, "Use TypeInfo::operator==() const instead")
35 bool operator==(const TypeInfo& rhs);
36#endif
37 /*
38 * @since 5.91
39 */
40 bool operator==(const TypeInfo& rhs) const;
41
45 Type::Type type() const;
46
50 QString name() const;
51
55 QString displayName() const;
56
61 static TypeInfo fromName(const QString& name);
62
63private:
64 const std::unique_ptr<TypeInfoPrivate> d;
65};
66}
67
68#endif // KFILEMETADATA_TYPEINFO_H