ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fwupgradedialog.h
Go to the documentation of this file.
1 #ifndef FWUPGRADEDIALOG_H
2 #define FWUPGRADEDIALOG_H
3 
4 #include <QCloseEvent>
5 #include <QDialog>
6 #include <QEventLoop>
7 #include "kb.h"
8 
9 namespace Ui {
10 class FwUpgradeDialog;
11 }
12 
13 class FwUpgradeDialog : public QDialog
14 {
15  Q_OBJECT
16 
17 public:
18  FwUpgradeDialog(QWidget* parent, float newV, const QByteArray& fwBlob, Kb* device);
20 
21  int exec();
22 
23 private slots:
24  void fwUpdateProgress(int current, int total);
25  void fwUpdateFinished(bool succeeded);
26  void removeDev();
27 
30 
31 private:
33  void closeEvent(QCloseEvent* event);
34 
35  // FW blob has to be saved to a temporary path for processing.
36  // saveBlob() to save, cleanBlob() to remove.
37  QString savePath;
38  const QString& saveBlob();
39  void cleanBlob();
40 
41  QByteArray blob;
42  Kb* kb;
43 
44  // Event loop for synchronous exec()
45  QEventLoop* evLoop;
47 };
48 
49 #endif // FWUPGRADEDIALOG_H
rgb * current
Definition: main.c:46
void fwUpdateFinished(bool succeeded)
void on_cancelButton_clicked()
void closeEvent(QCloseEvent *event)
Definition: kb.h:11
const QString & saveBlob()
void on_actionButton_clicked()
QEventLoop * evLoop
void fwUpdateProgress(int current, int total)
Ui::FwUpgradeDialog * ui
FwUpgradeDialog(QWidget *parent, float newV, const QByteArray &fwBlob, Kb *device)