~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to addons/kate/search/FolderFilesList.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*   Kate search plugin
2
 
 * 
3
 
 * Copyright (C) 2013 by Kåre Särs <kare.sars@iki.fi>
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program in a file called COPYING; if not, write to
17
 
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 
 * MA 02110-1301, USA.
19
 
 */
20
 
 
21
 
#ifndef FolderFilesList_h
22
 
#define FolderFilesList_h
23
 
 
24
 
#include <QThread>
25
 
#include <QRegExp>
26
 
#include <QFileInfo>
27
 
#include <QVector>
28
 
#include <QStringList>
29
 
 
30
 
class FolderFilesList: public QThread
31
 
{
32
 
    Q_OBJECT
33
 
 
34
 
public:
35
 
    FolderFilesList(QObject *parent = 0);
36
 
    ~FolderFilesList();
37
 
 
38
 
    void run();
39
 
 
40
 
    void generateList(const QString &folder,
41
 
                      bool recursive,
42
 
                      bool hidden,
43
 
                      bool symlinks,
44
 
                      bool binary,
45
 
                      const QString &types,
46
 
                      const QString &excludes);
47
 
 
48
 
    QStringList fileList();
49
 
 
50
 
public Q_SLOTS:
51
 
    void cancelSearch();
52
 
 
53
 
private:
54
 
    void checkNextItem(const QFileInfo &item);
55
 
 
56
 
private:
57
 
    QString          m_folder;
58
 
    QStringList      m_files;
59
 
    bool             m_cancelSearch;
60
 
 
61
 
    bool             m_recursive;
62
 
    bool             m_hidden;
63
 
    bool             m_symlinks;
64
 
    bool             m_binary;
65
 
    QStringList      m_types;
66
 
    QVector<QRegExp> m_excludeList;
67
 
};
68
 
 
69
 
 
70
 
#endif