-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathUpdater.hpp
52 lines (48 loc) · 1.35 KB
/
Updater.hpp
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
47
48
49
50
51
52
#ifndef UPDATER_HPP_INCLUDED
#define UPDATER_HPP_INCLUDED
#include <QObject>
#include <QString>
#include <QByteArray>
#include <QJsonObject>
#include <QThread>
#include <QVariant>
class UpdaterPrivate;
class Updater : public QObject {
Q_OBJECT
Q_PROPERTY(bool isNoConfirmEnabled READ isNoConfirm NOTIFY isNoConfirmEnabledChanged)
bool b_NoConfirm;
UpdaterPrivate *m_Private;
QThread *m_Thread;
public:
Updater(QObject *parent = nullptr);
~Updater();
bool isNoConfirm() const;
private Q_SLOTS:
void handleNoConfirmState(bool);
public Q_SLOTS:
void removeFromQueue(const QString&);
void queue(const QString&, const QString&, QVariant icon);
void retry(const QJsonObject&);
void toggleNoConfirm();
void continueCurrentUpdate();
void cancelCurrentUpdate();
void cancelAll();
Q_SIGNALS:
void isNoConfirmEnabledChanged();
void removedFromQueue(QString hash);
void queuedCountChanged(int n);
void failedCountChanged(int n);
void completedCountChanged(int n);
void progressText(QString progressTextString, int progressValue);
void torrentStatus(int seeders, int peers);
void loading();
void metaInfo(QJsonObject info);
void queued(QJsonObject info);
void failed(QJsonObject info);
void started();
void finished(QJsonObject info);
void canceled(QString hash);
void retrySent(QString hash);
void finishedAll();
};
#endif // UPDATER_HPP_INCLUDED