mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
first commit
This commit is contained in:
commit
3e7d8b4b70
43 changed files with 2681 additions and 0 deletions
32
src/core/TaskItem.cpp
Normal file
32
src/core/TaskItem.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Mirai. Copyright (C) 2024 Vyn
|
||||
* This file is licensed under version 3 of the GNU General Public License (GPL-3.0-only)
|
||||
* The license can be found in the LICENSE file or at https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
*/
|
||||
|
||||
|
||||
#include "TaskItem.h"
|
||||
|
||||
namespace mirai {
|
||||
|
||||
void TaskItem::markAsDone() {
|
||||
state = DONE;
|
||||
}
|
||||
|
||||
void TaskItem::markAsUndone() {
|
||||
state = TODO;
|
||||
}
|
||||
|
||||
void TaskItem::setDate(const std::string& date) {
|
||||
this->date = date;
|
||||
}
|
||||
|
||||
void TaskItem::setText(const std::string& text) {
|
||||
this->text = text;
|
||||
}
|
||||
|
||||
const std::string& TaskItem::getText() const { return text; }
|
||||
const TaskItemState& TaskItem::getState() const { return state; }
|
||||
const std::string& TaskItem::getDate() const { return date; }
|
||||
bool TaskItem::hasDate() const { return isDate(date); }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue