1 #include "include/appframework.hpp"
3 AppInfo::AppInfo(QObject *parent) :
8 AppInfo::AppInfo(const AppInfo &other) :
9 QObject(other.parent()),
10 name(other.getName()),
11 iconPath(other.getIconPath()),
12 description(other.getDescription())
16 AppInfo& AppInfo::operator=(const AppInfo &other)
18 setParent(other.parent());
19 name = other.getName();
20 iconPath = other.getIconPath();
21 description = other.getDescription();
30 void AppInfo::registerMetaType()
32 qRegisterMetaType<AppInfo>("AppInfo");
33 qDBusRegisterMetaType<AppInfo>();
37 // Marshall the MyStructure data into a D-Bus argument
38 QDBusArgument &operator<<(QDBusArgument &argument, const AppInfo &appInfo)
40 argument.beginStructure();
41 argument << appInfo.name << appInfo.iconPath << appInfo.description;
42 argument.endStructure();
43 qDebug("appInfo.name:<< %s", appInfo.name.toStdString().c_str());
47 // Retrieve the MyStructure data from the D-Bus argument
48 const QDBusArgument &operator>>(const QDBusArgument &argument, AppInfo &appInfo)
50 argument.beginStructure();
51 argument >> appInfo.name >> appInfo.iconPath >> appInfo.description;
52 argument.endStructure();
53 qDebug("appInfo.name:>> %s", appInfo.name.toStdString().c_str());