Welcome to the first commit of the first version of my very first app.
[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
9 //#include <QtCore/QCoreApplication>
10 #include <QThread>
11 //#include <QStringList>
12
13 #include <map>
14
15 typedef std::map<int, PIRKeysetMetaData *> PIRKeysetCollection;
16
17 class PIRKeysetManager
18 {
19 public:
20   PIRKeysetManager(
21     QObject *guiObject);
22
23   ~PIRKeysetManager();
24
25   void populateGuiWidget(
26     SelectionWindow *widget);
27
28   void stopRepeating();
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 private:
41   // This needs to be improved:
42   void populateKeyset(
43     PIRKeysetMetaData *keyset);
44
45   PIRKeysetCollection keysetsInfo;
46
47   // The counter will be used to generate unique ids for each keyset:
48   unsigned int counter;
49
50   QThread commandThread;
51 };
52
53 #endif // PIRKEYSETMANAGER_H