e610ef620c128a67ef5f01bd5f9d694878ef33f9
[pierogi] / pirkeysetmanager.h
1 #ifndef PIRKEYSETMANAGER_H
2 #define PIRKEYSETMANAGER_H
3
4 #include "pirkeysetmetadata.h"
5 //#include "protocol.h"
6 #include "pirkeynames.h"
7 //#include "selectionwindow.h"
8 #include "pirselectkeysetform.h"
9 #include "pirkeysetwidgetitem.h"
10
11 //#include <QtCore/QCoreApplication>
12 #include <QThread>
13 //#include <QStringList>
14
15 #include <map>
16
17 typedef std::map<int, PIRKeysetMetaData *> PIRKeysetCollection;
18
19 class PIRKeysetManager
20 {
21 public:
22   PIRKeysetManager(
23     QObject *guiObject);
24
25   ~PIRKeysetManager();
26
27   void populateGuiWidget(
28     PIRSelectKeysetForm *widget);
29
30   bool hasKey(
31     int keysetID,
32     PIRKeyName name);
33
34   PIRMakeName getMake(
35     int keysetID);
36
37   QString getDisplayName(
38     int keysetID);
39
40   void populateDeviceTypes(
41     PIRKeysetWidgetItem *kwi,
42     int keysetID);
43
44 private:
45   // This needs to be improved:
46   void populateKeyset(
47     PIRKeysetMetaData *keyset);
48
49   PIRKeysetCollection keysetsInfo;
50
51   // The counter will be used to generate unique ids for each keyset:
52   unsigned int counter;
53
54   QThread commandThread;
55 };
56
57 #endif // PIRKEYSETMANAGER_H