-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiletreeitem.cpp
More file actions
44 lines (35 loc) · 1019 Bytes
/
Copy pathfiletreeitem.cpp
File metadata and controls
44 lines (35 loc) · 1019 Bytes
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
#include "filetreeitem.h"
fileTreeItem::fileTreeItem(QTreeWidget *view, const QString &name,
const QString &path, int type)
:QTreeWidgetItem(view, type), _root(this), _path(path), _name(name),_preItem(nullptr), _nextItem(nullptr)
{
}
fileTreeItem::fileTreeItem(QTreeWidgetItem *parent, const QString &name,
const QString &path, QTreeWidgetItem *root, int type)
:QTreeWidgetItem(parent, type), _root(root), _path(path), _name(name), _preItem(nullptr), _nextItem(nullptr)
{
}
const QString &fileTreeItem::GetPath()
{
return _path;
}
QTreeWidgetItem *fileTreeItem::GetRoot()
{
return _root;
}
void fileTreeItem::SetPreItem(QTreeWidgetItem *item)
{
_preItem = item;
}
void fileTreeItem::SetNextItem(QTreeWidgetItem *item)
{
_nextItem = item;
}
fileTreeItem *fileTreeItem::GetPreItem()
{
return dynamic_cast<fileTreeItem*>(_preItem);
}
fileTreeItem *fileTreeItem::GetNextItem()
{
return dynamic_cast<fileTreeItem*>(_nextItem);
}