blob: 1725c142b0adfb910d017abe25497fba2778b3b8 (
plain)
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
|
#ifndef APPMANAGER_H
#define APPMANAGER_H
#include <QObject>
#include <QHash>
#include <QUuid>
#include <QFileSystemWatcher>
#include <Log4Qt/Logger>
#include "appinfo.h"
class AppManager : public QObject
{
Q_OBJECT
LOG4QT_DECLARE_QCLASS_LOGGER
public:
explicit AppManager(QObject *parent = 0);
QStringList appPaths() const;
QList<QUuid> appUuids() const;
AppInfo info(const QUuid &uuid) const;
AppInfo info(const QString &shortName) const;
public slots:
void rescan();
signals:
void appsChanged();
private:
void scanApp(const QString &path);
private:
QFileSystemWatcher *_watcher;
QHash<QUuid, AppInfo> _apps;
QHash<QString, QUuid> _names;
};
#endif // APPMANAGER_H
|