iCub-main
selectioncheckbox.h
Go to the documentation of this file.
1 #ifndef SELECTIONCHECKBOX_H
2 #define SELECTIONCHECKBOX_H
3 
4 #include <QObject>
5 #include <QWidget>
6 #include <QCheckBox>
7 #include <QTreeWidgetItem>
8 #include "firmwareupdatercore.h"
9 
10 #define INDEX_OF_BOARD Qt::UserRole
11 #define EMPTY_NODE Qt::UserRole + 1
12 #define CONNECTED Qt::UserRole + 2
13 #define DEVICE_LEVEL Qt::UserRole + 3
14 #define CAN_TYPE Qt::UserRole + 4
15 #define REFRESH_NEED Qt::UserRole + 5
16 #define CAN_UPLOAD_LOADER Qt::UserRole + 6
17 #define CAN_UPLOAD_APP Qt::UserRole + 7
18 #define CAN_UPLOAD_UPDATER Qt::UserRole + 8
19 #define CAN_JUMP_UPDATER Qt::UserRole + 9
20 //#define CAN_ERASE_EEPROM Qt::UserRole + 10
21 
22 
23 //#define DEVICE 1
24 //#define ID 2
25 //#define ADDRESS 3
26 //#define PROCESS 4
27 //#define VERSION 5
28 //#define ERASE_EEPROM 6
29 //#define INFO 7
30 
31 #define DEVICEID 1
32 #define BOARDT 2
33 #define ADDRESS 3
34 #define PROCESS 4
35 #define VERSION 5
36 #define INFO 6
37 
38 
39 class SelectionCheckBox : public QCheckBox
40 {
41  Q_OBJECT
42 
43 public:
44  SelectionCheckBox(QWidget * = NULL);
45  SelectionCheckBox(FirmwareUpdaterCore *core,QTreeWidgetItem *it,QWidget *parent=0);
46  //~SelectionCheckBox();
47  bool isSelected();
48 // QTreeWidgetItem *getTreeNode();
49 // QString getBoardType();
50 // int getBoardIndex();
51 // bool boardIsEth();
52 // bool boardIsCan();
53  void setSelected(bool);
54 
55 
56 
57 private:
58 // FirmwareUpdaterCore *core;
59 // QTreeWidgetItem *treeNode;
60 // int boardIndex;
61  bool selected;
62 // QString boardType;
63 // bool isEth;
64 // bool isCan;
65 public slots:
66  void onSelectEnded();
67 
68 private slots:
69  void onSelectionChanged(bool);
70 
71 
72 signals:
73  void needChangeSelection(bool);
74  void selectedChanged(bool);
75  void needLoading(bool,bool);
76 };
77 
78 #endif // SELECTIONCHECKBOX_H
79 
80 
SelectionCheckBox
Definition: selectioncheckbox.h:39
SelectionCheckBox::onSelectEnded
void onSelectEnded()
Definition: selectioncheckbox.cpp:74
SelectionCheckBox::needLoading
void needLoading(bool, bool)
SelectionCheckBox::needChangeSelection
void needChangeSelection(bool)
SelectionCheckBox::setSelected
void setSelected(bool)
Definition: selectioncheckbox.cpp:53
firmwareupdatercore.h
SelectionCheckBox::isSelected
bool isSelected()
Definition: selectioncheckbox.cpp:80
SelectionCheckBox::selectedChanged
void selectedChanged(bool)
FirmwareUpdaterCore
Definition: firmwareupdatercore.h:15
SelectionCheckBox::SelectionCheckBox
SelectionCheckBox(QWidget *=NULL)
Definition: selectioncheckbox.cpp:4