-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathutils.h
More file actions
42 lines (36 loc) · 1.06 KB
/
utils.h
File metadata and controls
42 lines (36 loc) · 1.06 KB
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
#ifndef UTILS_H
#define UTILS_H
#include <QObject>
#include <QProcess>
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
#include <QGuiApplication>
#include <QScreen>
#else
#include <QApplication>
#include <QDesktopWidget>
#endif
#include <QMessageBox>
#include <QDebug>
#include <QFileInfo>
#include <QStringList>
#include <QLoggingCategory>
#include <QFile>
class Utils : public QObject
{
Q_OBJECT
public:
explicit Utils(QObject *parent = nullptr);
void executeCommand(const QString &command);
void showCustomMessage(const QString &msgtype, const QString &title,const QString &message, int width, int height);
void checkAndFixOwnershipAsync(const QString &path,
const QString &targetUser,
const QString &targetGroup);
int lcdWidth;
int lcdHeight;
signals:
void commandFinished(bool success, const QString &errorString);
private slots:
void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
void onError(QProcess::ProcessError error);
};
#endif // UTILS_H