-
Notifications
You must be signed in to change notification settings - Fork 2
/
drboarditem.cpp
62 lines (36 loc) · 1.06 KB
/
drboarditem.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
53
54
55
56
57
58
59
60
61
62
#include <QIcon>
#include <QFileInfo>
#include "drboarditem.h"
#include "drthreaditem.h"
DRBoardItem::DRBoardItem(const QString &name, const QString &path, DRServerConnection *connection, DRBoardItem *parent) :
DRBoardNodeItem(connection, parent)
{
this->_path = path;
this->_name = QFileInfo(this->_path).fileName();
this->_threadsModel = new DRThreadsListModel(connection);
//this->boardThreads = *new QList<DRThreadItem*>();
//this->setIcon(QIcon(":/images/Board.png"));
}
DRBoardItem::~DRBoardItem() {
delete this->_threadsModel;
}
DRThreadsListModel * DRBoardItem::getThreadsModel() {
return this->_threadsModel;
}
void DRBoardItem::addThread(DRThreadItem *thread) {
this->_threadsModel->appendRow(thread);
}
void DRBoardItem::clearThreads() {
//this->mutex.lock();
this->_threadsModel->clear();
//this->mutex.unlock();
}
QString DRBoardItem::path() {
return this->_path;
}
QString DRBoardItem::name() {
return this->_name;
}
QVariant DRBoardItem::data(int column) const {
return this->_name;
}