Add context menu
This commit is contained in:
@@ -27,9 +27,13 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
connect(ui->actionPreferences, &QAction::triggered, this, &MainWindow::openPreferences);
|
connect(ui->actionPreferences, &QAction::triggered, this, &MainWindow::openPreferences);
|
||||||
connect(ui->actionAbout, &QAction::triggered, this, &MainWindow::openAbout);
|
connect(ui->actionAbout, &QAction::triggered, this, &MainWindow::openAbout);
|
||||||
connect(ui->actionNew, &QAction::triggered, this, &MainWindow::onNewBoardClick);
|
connect(ui->actionNew, &QAction::triggered, this, &MainWindow::onNewBoardClick);
|
||||||
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &MainWindow::onBoardSelected);
|
|
||||||
connect(ui->actionNew_task, &QAction::triggered, this, &MainWindow::onNewTaskClick);
|
connect(ui->actionNew_task, &QAction::triggered, this, &MainWindow::onNewTaskClick);
|
||||||
connect(ui->treeWidget, &QTreeWidget::itemDoubleClicked, this, &MainWindow::onEditTask);
|
connect(ui->boardList, &QListWidget::currentRowChanged, this, &MainWindow::onBoardSelected);
|
||||||
|
connect(ui->boardList, &QListWidget::customContextMenuRequested, this, &MainWindow::prepareBoardMenu);
|
||||||
|
connect(ui->taskList, &QTreeWidget::itemDoubleClicked, this, &MainWindow::onEditTask);
|
||||||
|
connect(ui->taskList, &QTreeWidget::customContextMenuRequested, this, &MainWindow::prepareTaskMenu);
|
||||||
|
ui->boardList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
ui->taskList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@@ -59,6 +63,44 @@ void MainWindow::openAbout()
|
|||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::prepareBoardMenu(const QPoint &pos)
|
||||||
|
{
|
||||||
|
if (ui->boardList->selectedItems().length() == 1) {
|
||||||
|
QMenu menu(this);
|
||||||
|
|
||||||
|
QAction *renameAction = new QAction(tr("Rename this board"), this);
|
||||||
|
connect(renameAction, &QAction::triggered, this, &MainWindow::onEditNameBoardMenu);
|
||||||
|
menu.addAction(renameAction);
|
||||||
|
|
||||||
|
menu.addSeparator();
|
||||||
|
|
||||||
|
QAction *deleteAction = new QAction(tr("Delete this board"), this);
|
||||||
|
connect(deleteAction, &QAction::triggered, this, &MainWindow::onRemoveBoardMenu);
|
||||||
|
menu.addAction(deleteAction);
|
||||||
|
|
||||||
|
menu.exec(ui->boardList->mapToGlobal(pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::prepareTaskMenu(const QPoint &pos)
|
||||||
|
{
|
||||||
|
if (ui->taskList->selectedItems().length() == 1) {
|
||||||
|
QMenu menu(this);
|
||||||
|
|
||||||
|
QAction *renameAction = new QAction(tr("Edit the task"), this);
|
||||||
|
connect(renameAction, &QAction::triggered, this, &MainWindow::onEditNameTaskMenu);
|
||||||
|
menu.addAction(renameAction);
|
||||||
|
|
||||||
|
menu.addSeparator();
|
||||||
|
|
||||||
|
QAction *deleteAction = new QAction(tr("Delete from the board"), this);
|
||||||
|
connect(deleteAction, &QAction::triggered, this, &MainWindow::onRemoveTaskMenu);
|
||||||
|
menu.addAction(deleteAction);
|
||||||
|
|
||||||
|
menu.exec(ui->taskList->mapToGlobal(pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::onNewBoardClick()
|
void MainWindow::onNewBoardClick()
|
||||||
{
|
{
|
||||||
NameDialog dialog("Create a board", "New empty board", this);
|
NameDialog dialog("Create a board", "New empty board", this);
|
||||||
@@ -68,7 +110,7 @@ void MainWindow::onNewBoardClick()
|
|||||||
Board *b = new Board(name);
|
Board *b = new Board(name);
|
||||||
boards.append(b);
|
boards.append(b);
|
||||||
QListWidgetItem *item = new QListWidgetItem(name);
|
QListWidgetItem *item = new QListWidgetItem(name);
|
||||||
ui->listWidget->addItem(item);
|
ui->boardList->addItem(item);
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,27 +127,33 @@ void MainWindow::onNewTaskClick()
|
|||||||
b->add(t);
|
b->add(t);
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
item->setText(0, t.getTitle());
|
item->setText(0, t.getTitle());
|
||||||
item->setText(1, getStatusLabel(t.getStatusUUID()));
|
|
||||||
item->setText(2, getPriorityLabel(t.getPriorityUUID()));
|
|
||||||
item->setText(3, t.getExpectedFor().toString());
|
item->setText(3, t.getExpectedFor().toString());
|
||||||
|
|
||||||
QBrush bgColor = item->background(1);
|
if (!t.getStatusUUID().isEmpty())
|
||||||
QBrush fgColor = item->foreground(1);
|
{
|
||||||
bgColor.setColor(getStatusColor(t.getStatusUUID(), bgColor.color()));
|
item->setText(1, getStatusLabel(t.getStatusUUID()));
|
||||||
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
QBrush bgColor = item->background(1);
|
||||||
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
QBrush fgColor = item->foreground(1);
|
||||||
item->setBackground(1, bgColor);
|
bgColor.setColor(getStatusColor(t.getStatusUUID(), bgColor.color()));
|
||||||
item->setForeground(1, fgColor);
|
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
||||||
|
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
||||||
|
item->setBackground(1, bgColor);
|
||||||
|
item->setForeground(1, fgColor);
|
||||||
|
}
|
||||||
|
|
||||||
bgColor = item->background(2);
|
if (!t.getPriorityUUID().isEmpty())
|
||||||
fgColor = item->foreground(2);
|
{
|
||||||
bgColor.setColor(getPriorityColor(t.getPriorityUUID(), bgColor.color()));
|
item->setText(2, getPriorityLabel(t.getPriorityUUID()));
|
||||||
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
QBrush bgColor = item->background(2);
|
||||||
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
QBrush fgColor = item->foreground(2);
|
||||||
item->setBackground(2, bgColor);
|
bgColor.setColor(getPriorityColor(t.getPriorityUUID(), bgColor.color()));
|
||||||
item->setForeground(2, fgColor);
|
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
||||||
|
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
||||||
|
item->setBackground(2, bgColor);
|
||||||
|
item->setForeground(2, fgColor);
|
||||||
|
}
|
||||||
|
|
||||||
ui->treeWidget->addTopLevelItem(item);
|
ui->taskList->addTopLevelItem(item);
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,7 +181,7 @@ void MainWindow::onEditTask(QTreeWidgetItem *item)
|
|||||||
if (item != nullptr && selectedBoardIndex > -1)
|
if (item != nullptr && selectedBoardIndex > -1)
|
||||||
{
|
{
|
||||||
Board *b = boards[selectedBoardIndex];
|
Board *b = boards[selectedBoardIndex];
|
||||||
int row = ui->treeWidget->indexOfTopLevelItem(item);
|
int row = ui->taskList->indexOfTopLevelItem(item);
|
||||||
Task *t = b->taskAt(row);
|
Task *t = b->taskAt(row);
|
||||||
if (t != nullptr)
|
if (t != nullptr)
|
||||||
{
|
{
|
||||||
@@ -143,31 +191,95 @@ void MainWindow::onEditTask(QTreeWidgetItem *item)
|
|||||||
Task editedTask = dialog.getTask();
|
Task editedTask = dialog.getTask();
|
||||||
t->update(editedTask);
|
t->update(editedTask);
|
||||||
item->setText(0, editedTask.getTitle());
|
item->setText(0, editedTask.getTitle());
|
||||||
item->setText(1, getStatusLabel(editedTask.getStatusUUID()));
|
|
||||||
item->setText(2, getPriorityLabel(editedTask.getPriorityUUID()));
|
|
||||||
item->setText(3, editedTask.getExpectedFor().toString());
|
item->setText(3, editedTask.getExpectedFor().toString());
|
||||||
|
|
||||||
QBrush bgColor = item->background(1);
|
if (!editedTask.getStatusUUID().isEmpty())
|
||||||
QBrush fgColor = item->foreground(1);
|
{
|
||||||
bgColor.setColor(getStatusColor(editedTask.getStatusUUID(), bgColor.color()));
|
item->setText(1, getStatusLabel(editedTask.getStatusUUID()));
|
||||||
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
QBrush bgColor = item->background(1);
|
||||||
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
QBrush fgColor = item->foreground(1);
|
||||||
item->setBackground(1, bgColor);
|
bgColor.setColor(getStatusColor(editedTask.getStatusUUID(), bgColor.color()));
|
||||||
item->setForeground(1, fgColor);
|
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
||||||
|
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
||||||
|
item->setBackground(1, bgColor);
|
||||||
|
item->setForeground(1, fgColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!editedTask.getPriorityUUID().isEmpty())
|
||||||
|
{
|
||||||
|
item->setText(2, getPriorityLabel(editedTask.getPriorityUUID()));
|
||||||
|
QBrush bgColor = item->background(2);
|
||||||
|
QBrush fgColor = item->foreground(2);
|
||||||
|
bgColor.setColor(getPriorityColor(editedTask.getPriorityUUID(), bgColor.color()));
|
||||||
|
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
||||||
|
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
||||||
|
item->setBackground(2, bgColor);
|
||||||
|
item->setForeground(2, fgColor);
|
||||||
|
}
|
||||||
|
|
||||||
bgColor = item->background(2);
|
|
||||||
fgColor = item->foreground(2);
|
|
||||||
bgColor.setColor(getPriorityColor(editedTask.getPriorityUUID(), bgColor.color()));
|
|
||||||
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
|
||||||
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
|
||||||
item->setBackground(2, bgColor);
|
|
||||||
item->setForeground(2, fgColor);
|
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onRemoveBoardMenu()
|
||||||
|
{
|
||||||
|
if (selectedBoardIndex > -1)
|
||||||
|
{
|
||||||
|
QMessageBox::StandardButton result = QMessageBox::question(this, "Delete a board", "Do you want to delete this board?");
|
||||||
|
if (result == QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
boards.removeAt(selectedBoardIndex);
|
||||||
|
delete ui->boardList->takeItem(selectedBoardIndex);
|
||||||
|
selectedBoardIndex = -1;
|
||||||
|
redrawTaskTree();
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onRemoveTaskMenu()
|
||||||
|
{
|
||||||
|
if (selectedBoardIndex > -1 && ui->taskList->selectedItems().length() == 1)
|
||||||
|
{
|
||||||
|
QMessageBox::StandardButton result = QMessageBox::question(this, "Delete a task", "Do you want to delete this task?");
|
||||||
|
if (result == QMessageBox::Yes)
|
||||||
|
{
|
||||||
|
int16_t i = ui->taskList->indexOfTopLevelItem(ui->taskList->currentItem());
|
||||||
|
Board *b = boards[selectedBoardIndex];
|
||||||
|
b->remove(i);
|
||||||
|
redrawTaskTree();
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onEditNameBoardMenu()
|
||||||
|
{
|
||||||
|
if (selectedBoardIndex > -1)
|
||||||
|
{
|
||||||
|
Board *b = boards.at(selectedBoardIndex);
|
||||||
|
NameDialog dialog("Edit board name", b->getName(), this);
|
||||||
|
if (dialog.exec() == QDialog::DialogCode::Accepted)
|
||||||
|
{
|
||||||
|
QString newName= dialog.getChoosenName();
|
||||||
|
b->setName(newName);
|
||||||
|
ui->boardList->item(selectedBoardIndex)->setText(newName);
|
||||||
|
ui->label->setText(newName);
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onEditNameTaskMenu()
|
||||||
|
{
|
||||||
|
if (selectedBoardIndex > -1 && ui->taskList->selectedItems().length() == 1)
|
||||||
|
{
|
||||||
|
onEditTask(ui->taskList->currentItem());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::init()
|
void MainWindow::init()
|
||||||
{
|
{
|
||||||
if (Tools::isSaveFileExist())
|
if (Tools::isSaveFileExist())
|
||||||
@@ -176,13 +288,16 @@ void MainWindow::init()
|
|||||||
if (Tools::readSaveFile(doc))
|
if (Tools::readSaveFile(doc))
|
||||||
{
|
{
|
||||||
QJsonObject save = doc.object();
|
QJsonObject save = doc.object();
|
||||||
for (QJsonValue value : save[PRIORITIES_KEY].toArray()) {
|
QJsonArray jsonPriorities = save[PRIORITIES_KEY].toArray();
|
||||||
|
QJsonArray jsonStatus = save[STATUS_KEY].toArray();
|
||||||
|
QJsonArray jsonBoards = save[BOARDS_KEY].toArray();
|
||||||
|
for (QJsonValueRef value : jsonPriorities) {
|
||||||
priorities.append(Priority(value.toObject()));
|
priorities.append(Priority(value.toObject()));
|
||||||
}
|
}
|
||||||
for (QJsonValue value : save[STATUS_KEY].toArray()) {
|
for (QJsonValueRef value : jsonStatus) {
|
||||||
status.append(Status(value.toObject()));
|
status.append(Status(value.toObject()));
|
||||||
}
|
}
|
||||||
for (QJsonValue value : save[BOARDS_KEY].toArray()) {
|
for (QJsonValueRef value : jsonBoards) {
|
||||||
boards.append(new Board(value.toObject()));
|
boards.append(new Board(value.toObject()));
|
||||||
}
|
}
|
||||||
redrawBoardList();
|
redrawBoardList();
|
||||||
@@ -289,7 +404,7 @@ const QJsonDocument MainWindow::getJsonSave()
|
|||||||
|
|
||||||
void MainWindow::redrawBoardList()
|
void MainWindow::redrawBoardList()
|
||||||
{
|
{
|
||||||
QListWidget *l = ui->listWidget;
|
QListWidget *l = ui->boardList;
|
||||||
uint16_t itemCount = l->count();
|
uint16_t itemCount = l->count();
|
||||||
for (int16_t i = itemCount; i >= 0; i--)
|
for (int16_t i = itemCount; i >= 0; i--)
|
||||||
{
|
{
|
||||||
@@ -304,7 +419,7 @@ void MainWindow::redrawBoardList()
|
|||||||
|
|
||||||
void MainWindow::redrawTaskTree()
|
void MainWindow::redrawTaskTree()
|
||||||
{
|
{
|
||||||
QTreeWidget *l = ui->treeWidget;
|
QTreeWidget *l = ui->taskList;
|
||||||
uint16_t itemCount = l->topLevelItemCount();
|
uint16_t itemCount = l->topLevelItemCount();
|
||||||
for (int16_t i = itemCount; i >= 0; i--)
|
for (int16_t i = itemCount; i >= 0; i--)
|
||||||
{
|
{
|
||||||
@@ -317,27 +432,33 @@ void MainWindow::redrawTaskTree()
|
|||||||
{
|
{
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
item->setText(0, t->getTitle());
|
item->setText(0, t->getTitle());
|
||||||
item->setText(1, getStatusLabel(t->getStatusUUID()));
|
|
||||||
item->setText(2, getPriorityLabel(t->getPriorityUUID()));
|
|
||||||
item->setText(3, t->getExpectedFor().toString());
|
item->setText(3, t->getExpectedFor().toString());
|
||||||
|
|
||||||
QBrush bgColor = item->background(1);
|
if (!t->getStatusUUID().isEmpty())
|
||||||
QBrush fgColor = item->foreground(1);
|
{
|
||||||
bgColor.setColor(getStatusColor(t->getStatusUUID(), bgColor.color()));
|
item->setText(1, getStatusLabel(t->getStatusUUID()));
|
||||||
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
QBrush bgColor = item->background(1);
|
||||||
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
QBrush fgColor = item->foreground(1);
|
||||||
item->setBackground(1, bgColor);
|
bgColor.setColor(getStatusColor(t->getStatusUUID(), bgColor.color()));
|
||||||
item->setForeground(1, fgColor);
|
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
||||||
|
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
||||||
|
item->setBackground(1, bgColor);
|
||||||
|
item->setForeground(1, fgColor);
|
||||||
|
}
|
||||||
|
|
||||||
bgColor = item->background(2);
|
if (!t->getPriorityUUID().isEmpty())
|
||||||
fgColor = item->foreground(2);
|
{
|
||||||
bgColor.setColor(getPriorityColor(t->getPriorityUUID(), bgColor.color()));
|
item->setText(2, getPriorityLabel(t->getPriorityUUID()));
|
||||||
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
QBrush bgColor = item->background(2);
|
||||||
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
QBrush fgColor = item->foreground(2);
|
||||||
item->setBackground(2, bgColor);
|
bgColor.setColor(getPriorityColor(t->getPriorityUUID(), bgColor.color()));
|
||||||
item->setForeground(2, fgColor);
|
bgColor.setStyle(Qt::BrushStyle::SolidPattern);
|
||||||
|
fgColor.setColor(Tools::getForegroundColor(bgColor.color()));
|
||||||
|
item->setBackground(2, bgColor);
|
||||||
|
item->setForeground(2, fgColor);
|
||||||
|
}
|
||||||
|
|
||||||
ui->treeWidget->addTopLevelItem(item);
|
ui->taskList->addTopLevelItem(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ private slots:
|
|||||||
void onNewTaskClick();
|
void onNewTaskClick();
|
||||||
void onBoardSelected(int i);
|
void onBoardSelected(int i);
|
||||||
void onEditTask(QTreeWidgetItem*);
|
void onEditTask(QTreeWidgetItem*);
|
||||||
|
void onRemoveBoardMenu();
|
||||||
|
void onRemoveTaskMenu();
|
||||||
|
void onEditNameBoardMenu();
|
||||||
|
void onEditNameTaskMenu();
|
||||||
|
void prepareBoardMenu(const QPoint &pos);
|
||||||
|
void prepareTaskMenu(const QPoint &pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="listWidget">
|
<widget class="QListWidget" name="boardList">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>250</width>
|
<width>250</width>
|
||||||
@@ -40,6 +40,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -57,7 +60,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="treeWidget">
|
<widget class="QTreeWidget" name="taskList">
|
||||||
<property name="alternatingRowColors">
|
<property name="alternatingRowColors">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ NameDialog::NameDialog(QString label, QString defaultName, QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->setWindowTitle(label);
|
this->setWindowTitle(label);
|
||||||
this->defaultName = defaultName;
|
this->defaultName = defaultName;
|
||||||
|
ui->lineEdit->setText(defaultName);
|
||||||
}
|
}
|
||||||
|
|
||||||
NameDialog::~NameDialog()
|
NameDialog::~NameDialog()
|
||||||
|
|||||||
@@ -34,11 +34,24 @@ const QString Board::getName()
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Board::setName(const QString name)
|
||||||
|
{
|
||||||
|
this->name = name;
|
||||||
|
}
|
||||||
|
|
||||||
void Board::add(Task t)
|
void Board::add(Task t)
|
||||||
{
|
{
|
||||||
tasks.append(new Task(t));
|
tasks.append(new Task(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Board::remove(uint16_t index)
|
||||||
|
{
|
||||||
|
if (index < tasks.count())
|
||||||
|
{
|
||||||
|
tasks.removeAt(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Task *Board::taskAt(uint16_t i)
|
Task *Board::taskAt(uint16_t i)
|
||||||
{
|
{
|
||||||
if (i < tasks.count())
|
if (i < tasks.count())
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ public:
|
|||||||
~Board();
|
~Board();
|
||||||
|
|
||||||
const QString getName();
|
const QString getName();
|
||||||
|
void setName(const QString name);
|
||||||
void add(Task);
|
void add(Task);
|
||||||
|
void remove(uint16_t index);
|
||||||
Task *taskAt(uint16_t);
|
Task *taskAt(uint16_t);
|
||||||
const QVector<Task*> getTasks();
|
const QVector<Task*> getTasks();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user