-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkfilefilter.cpp
65 lines (54 loc) · 1.42 KB
/
kfilefilter.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
#include "kfilefilter.h"
#include <QApplication>
KFileFilter::KFileFilter(QObject *parent) :
QObject(parent),
m_filterType(None),
m_isRegExpEnabled(false)
{
}
KFileFilter::KFileFilter(const QString &pattern, FilterType filterType, bool isRegExpEnabled, QObject *parent) :
QObject(parent),
m_pattern(pattern),
m_filterType(filterType),
m_isRegExpEnabled(isRegExpEnabled)
{
}
KFileFilter::KFileFilter(const KFileFilter &filter) :
QObject(filter.parent()),
m_pattern(filter.pattern()),
m_filterType(filter.filterType()),
m_isRegExpEnabled(filter.isRegExpEnabled())
{
}
KFileFilter &KFileFilter::operator=(const KFileFilter &filter)
{
setParent(filter.parent());
setPattern(filter.pattern());
setFilterType(filter.filterType());
m_isRegExpEnabled = filter.isRegExpEnabled();
return *this;
}
const QString &KFileFilter::pattern() const
{
return m_pattern;
}
bool KFileFilter::isRegExpEnabled() const
{
return m_isRegExpEnabled;
}
KFileFilter::FilterType KFileFilter::filterType() const
{
return m_filterType;
}
void KFileFilter::setFilterType(FilterType newFilterType)
{
m_filterType = newFilterType;
}
void KFileFilter::setPattern(const QString &newPattern)
{
m_pattern = newPattern;
}
void KFileFilter::setIsRegExpEnabled(bool newIsRegExpEnabled)
{
m_isRegExpEnabled = newIsRegExpEnabled;
}