disable status showing for boards, add helper labels in pref dialog
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define DESCRIPTION_KEY "description"
|
||||
#define AUTOSTATUS_KEY "auto_status"
|
||||
#define STATUS_KEY "status"
|
||||
#define SHOW_STATUS_KEY "show_status"
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QJsonValue>
|
||||
@@ -29,6 +30,7 @@ Board::Board(QJsonObject obj)
|
||||
this->description = obj[DESCRIPTION_KEY].toString("");
|
||||
this->autoStatus = obj[AUTOSTATUS_KEY].toBool(true);
|
||||
this->statusUUID = obj[STATUS_KEY].toString();
|
||||
this->showStatus = obj[SHOW_STATUS_KEY].toBool(!this->autoStatus);
|
||||
QJsonArray jsonTasks = obj[TASKS_KEY].toArray();
|
||||
foreach (QJsonValue value, jsonTasks) {
|
||||
Task *t = new Task(value.toObject());
|
||||
@@ -81,6 +83,11 @@ const QString Board::getStatus()
|
||||
return statusUUID;
|
||||
}
|
||||
|
||||
bool Board::isShowingStatus()
|
||||
{
|
||||
return showStatus;
|
||||
}
|
||||
|
||||
bool Board::isAutoStatus()
|
||||
{
|
||||
return autoStatus;
|
||||
@@ -102,6 +109,11 @@ void Board::setDirtyStatus(Status s)
|
||||
this->statusUUID = s.getUUID();
|
||||
}
|
||||
|
||||
void Board::setShowingStatus(bool v)
|
||||
{
|
||||
this->showStatus = v;
|
||||
}
|
||||
|
||||
void Board::removeDirtyStatus()
|
||||
{
|
||||
this->autoStatus = true;
|
||||
@@ -148,6 +160,7 @@ const QJsonObject Board::toJson()
|
||||
obj[AUTOSTATUS_KEY] = this->autoStatus;
|
||||
obj[TASKS_KEY] = array;
|
||||
obj[DESCRIPTION_KEY] = description;
|
||||
obj[SHOW_STATUS_KEY] = this->showStatus;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user