Debian Codegraph @

src/collectionupdater.h

raw symbols SCIP
1 /*
2 Copyright (C) 2005-2014 Mario Stephan <[email protected]>
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef COLLECTIONUPDATER_H
19 #define COLLECTIONUPDATER_H
20
21 #include "collectionwidget.h"
22 #include "collectionupdater.h"
23
24 #include <qstringlist.h>
25 #include "collectiondb.h"
26
27
28 class CollectionUpdater : public QObject
29 {
30 Q_OBJECT
31
32 public:
33
34 CollectionUpdater();
35 ~CollectionUpdater();
36 void setDoMonitor(bool);
37 void setDirectoryList(QStringList dirs, bool force=false);
38
39 QStringList getRandomEntry(QString);
40
41
42 public slots:
43
44 void scan();
45 void monitor();
46 void stop();
47
48 signals:
49 void changesDone();
50 void progressChanged(int percent);
51
52
53 private:
54 void readDir( const QString& dir, QStringList& entries );
55 void readTags( const QStringList& entries );
56 void asynchronScan(QStringList dirs);
57 class CollectionUpdaterPrivate *p;
58
59 };
60
61
62 #endif // COLLECTIONUPDATER_H