2 * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef APPFRAMEWORK_HPP
18 #define APPFRAMEWORK_HPP
20 #include <QtCore/QSharedDataPointer>
21 #include <QtDBus/QDBusArgument>
26 Q_PROPERTY(QString id READ id)
27 Q_PROPERTY(QString version READ version)
28 Q_PROPERTY(int width READ width)
29 Q_PROPERTY(int height READ height)
30 Q_PROPERTY(QString name READ name)
31 Q_PROPERTY(QString description READ description)
32 Q_PROPERTY(QString shortname READ shortname)
33 Q_PROPERTY(QString author READ author)
34 Q_PROPERTY(QString iconPath READ iconPath)
37 AppInfo(const AppInfo &other);
39 AppInfo &operator =(const AppInfo &other);
40 void swap(AppInfo &other) { qSwap(d, other.d); }
43 QString version() const;
47 QString description() const;
48 QString shortname() const;
49 QString author() const;
50 QString iconPath() const;
52 void read(const QJsonObject &json);
54 friend QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &appInfo);
55 friend const QDBusArgument &operator >>(const QDBusArgument &argument, AppInfo &appInfo);
59 QSharedDataPointer<Private> d;
62 Q_DECLARE_SHARED(AppInfo)
63 Q_DECLARE_METATYPE(AppInfo)
64 Q_DECLARE_METATYPE(QList<AppInfo>)
66 #endif // APPFRAMEWORK_HPP