-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivity.cpp
More file actions
53 lines (44 loc) · 1.06 KB
/
activity.cpp
File metadata and controls
53 lines (44 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "activity.h"
#include <QDebug>
Activity::Activity(const QString& name, int duration, bool isLocking) {
this->name = name;
this->duration = duration;
this->_isLocking = isLocking;
this->_isNotifying = false;
}
void Activity::setName(const QString& name) {
if (name != this->name) {
this->name = name;
emit nameChanged(this->name);
}
}
QString Activity::getName() const {
return name;
}
void Activity::setDuration(int duration) {
if (duration != this->duration) {
this->duration = duration;
emit durationChanged(this->duration);
}
}
int Activity::getDuration() const {
return duration;
}
void Activity::setLocking(bool locking) {
if (locking != _isLocking) {
_isLocking = locking;
emit isLockingChanged(_isLocking);
}
}
bool Activity::isLocking() const {
return _isLocking;
}
void Activity::setNotifying(bool notifying) {
if (notifying != _isNotifying) {
_isNotifying = notifying;
emit isNotifyingChanged(_isNotifying);
}
}
bool Activity::isNotifying() const {
return _isNotifying;
}