Improved Keyset Selection Window
[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   void stopRepeating();
31
32   bool hasKey(
33     int keysetID,
34     PIRKeyName name);
35
36   PIRMakeName getMake(
37     int keysetID);
38
39   QString getDisplayName(
40     int keysetID);
41
42   void populateDeviceTypes(
43     PIRKeysetWidgetItem *kwi,
44     int keysetID);
45
46 private:
47   // This needs to be improved:
48   void populateKeyset(
49     PIRKeysetMetaData *keyset);
50
51   PIRKeysetCollection keysetsInfo;
52
53   // The counter will be used to generate unique ids for each keyset:
54   unsigned int counter;
55
56   QThread commandThread;
57 };
58
59 #endif // PIRKEYSETMANAGER_H