Plasma5Support

ActivityData.cpp
1/*
2 SPDX-FileCopyrightText: 2011 Ivan Cukic <ivan.cukic(at)kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "ActivityData.h"
8
9#include <QDBusMetaType>
10#include <QMetaType>
11
12class ActivityDataStaticInit
13{
14public:
15 ActivityDataStaticInit()
16 {
17 qDBusRegisterMetaType<ActivityData>();
18 qDBusRegisterMetaType<QList<ActivityData>>();
19 }
20
21 static ActivityDataStaticInit _instance;
22};
23
24ActivityDataStaticInit ActivityDataStaticInit::_instance;
25
26ActivityData::ActivityData()
27{
28}
29
30ActivityData::ActivityData(const ActivityData &source)
31 : id(source.id)
32{
33 score = source.score;
34}
35
36ActivityData &ActivityData::operator=(const ActivityData &source)
37{
38 if (&source != this) {
39 score = source.score;
40 id = source.id;
41 }
42
43 return *this;
44}
45
46QDBusArgument &operator<<(QDBusArgument &arg, const ActivityData r)
47{
48 arg.beginStructure();
49
50 arg << r.id;
51 arg << r.score;
52
53 arg.endStructure();
54
55 return arg;
56}
57
58const QDBusArgument &operator>>(const QDBusArgument &arg, ActivityData &r)
59{
60 arg.beginStructure();
61
62 arg >> r.id;
63 arg >> r.score;
64
65 arg.endStructure();
66
67 return arg;
68}
69
70QDebug operator<<(QDebug dbg, const ActivityData &r)
71{
72 dbg << "ActivityData(" << r.score << r.id << ")";
73 return dbg.space();
74}
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
QDebug operator<<(QDebug dbg, const PerceptualColor::MultiSpinBoxSection &value)
void beginStructure()
void endStructure()
QDebug & space()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.