diff options
Diffstat (limited to 'src/gui.h')
-rw-r--r-- | src/gui.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gui.h b/src/gui.h new file mode 100644 index 0000000..58f0c54 --- /dev/null +++ b/src/gui.h @@ -0,0 +1,41 @@ +#ifndef _COW_GUI_H_ +#define _COW_GUI_H_ + +#include <QDialog> +#include <QHash> + +class QVBoxLayout; +class QNetworkAccessManager; +class QPushButton; +class QTimer; +class QLabel; + +class Progress; + +class Gui : public QDialog +{ + Q_OBJECT +public: + explicit Gui(const char *urlbase, const char *uuid, QWidget *parent = nullptr); + ~Gui(); + +private slots: + void pushedCancel(bool pushed); + void pushedOk(bool pushed); + +private: + void setupUi(); + void updateButtons(); + + QNetworkAccessManager *_nam; + QVBoxLayout *_itemBox; + QString _remoteState; + QString _urlStatus, _urlAbort, _urlFinish; + bool _denyInteraction; + QPushButton *_btnAbort, *_btnOk; + QTimer *_tmrStatus; + QHash<QString, Progress*> _items; + QLabel *_status; +}; + +#endif |