-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinuxappinfo.h
46 lines (38 loc) · 1000 Bytes
/
linuxappinfo.h
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
#ifndef LINUXAPPINFO_H
#define LINUXAPPINFO_H
#include <QThread>
#include <QProcess>
#include <QJsonObject>
class LinuxAppInfo : public QThread
{
Q_OBJECT
public:
explicit LinuxAppInfo(QObject *parent = nullptr);
signals:
void findOneApp(QJsonObject);
protected:
void run() override;
private:
/**
* @brief Generates a list of Desktop filenames for the installed software under Linux
*/
void makeLinuxAppsFileNameList();
/**
* @brief Generates a list of the Desktop file paths for the installed software under Linux
*/
void makeAppsDesktopFilePathList();
/**
* @brief Store applied information according to certain rules
*/
void makeAppsInfoObject();
/**
* @brief Find the path to the icon and return
* @return
*/
QString getAppIconFilePath(QString iconStr);
private:
QProcess* m_process;
QStringList m_AppsFileNameList;
QStringList m_AppsDesktopFilePathList;
};
#endif // LINUXAPPINFO_H