-
Notifications
You must be signed in to change notification settings - Fork 0
/
deleteitem.cpp
95 lines (80 loc) · 1.75 KB
/
deleteitem.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "deleteitem.h"
#include <QDebug>
DeleteItem::DeleteItem(QObject *parent) :
QObject(parent)
{
}
bool DeleteItem::getChecked() const
{
return m_checked;
}
QString DeleteItem::getLocalName() const
{
return m_localName;
}
QStringList DeleteItem::getFileList() const
{
return m_fileList;
}
QString DeleteItem::getCategoryName() const
{
return m_categoryName;
}
bool DeleteItem::getInitialChecked() const
{
return m_initialChecked;
}
void DeleteItem::setChecked(bool arg)
{
if (m_checked != arg) {
m_checked = arg;
qDebug()<<"setChecked"<<getLocalName()<<m_checked;
emit checkedChanged(arg);
}
}
void DeleteItem::setLocalName(QString arg)
{
if (m_localName != arg) {
m_localName = arg;
emit localNameChanged(arg);
}
}
void DeleteItem::setFileList(QStringList arg)
{
if (m_fileList != arg) {
m_fileList = arg;
emit fileListChanged(arg);
}
}
void DeleteItem::setCategoryName(QString arg)
{
m_categoryName = arg;
}
void DeleteItem::setInitialChecked(bool arg)
{
if (m_initialChecked != arg) {
m_initialChecked = arg;
emit initialCheckedChanged(arg);
}
}
void DeleteItem::removeFile(int index)
{
m_fileList.removeAt(index);
emit fileListChanged(m_fileList);
}
void DeleteItem::addFile(QString path)
{
m_fileList.append(path);
emit fileListChanged(m_fileList);
}
void DeleteItem::setFile(int index, QString path)
{
m_fileList.removeAt(index);
m_fileList.insert(index, path);
//emit fileListChanged(m_fileList);
}
void DeleteItem::addFiles(QStringList list)
{
m_fileList.append(list);
emit fileListChanged(m_fileList);
}