-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form.cpp
52 lines (40 loc) · 916 Bytes
/
Form.cpp
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
//
// Created by Niccolò Caselli on 16/06/23.
//
#include "Form.h"
const std::string &Form::getDescription() const {
return description;
}
void Form::setDescription(const std::string &description) {
Form::description = description;
}
time_t Form::getStartTime() const {
return startTime;
}
void Form::setStartTime(time_t startTime) {
Form::startTime = startTime;
}
time_t Form::getEndTime() const {
return endTime;
}
void Form::setEndTime(time_t endTime) {
Form::endTime = endTime;
}
tm Form::getDate() const {
return date;
}
void Form::setDate(tm date) {
Form::date = date;
}
time_t Form::getSearchDate() const {
return searchDate;
}
void Form::setSearchDate(time_t date) {
Form::searchDate = date;
notifyObservers();
}
bool Form::validateForm() const {
// Controlla se la descrizione è vuota
if(description.empty()) return false;
return true;
}