forked from raspberrypi/rpi-imager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.h
39 lines (30 loc) · 752 Bytes
/
cli.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
#ifndef CLI_H
#define CLI_H
#include <QObject>
#include <QVariant>
class ImageWriter;
class QCoreApplication;
class Cli : public QObject
{
Q_OBJECT
public:
explicit Cli(int &argc, char *argv[]);
virtual ~Cli();
int main();
protected:
QCoreApplication *_app;
ImageWriter *_imageWriter;
int _lastPercent;
QByteArray _lastMsg;
bool _quiet;
void _printProgress(const QByteArray &msg, QVariant now, QVariant total);
void _clearLine();
protected slots:
void onSuccess();
void onError(QVariant msg);
void onDownloadProgress(QVariant dlnow, QVariant dltotal);
void onVerifyProgress(QVariant now, QVariant total);
void onPreparationStatusUpdate(QVariant msg);
signals:
};
#endif // CLI_H