Improved Keyset Selection Window
[pierogi] / pirselectkeysetform.h
1 #ifndef PIRSELECTKEYSETFORM_H
2 #define PIRSELECTKEYSETFORM_H
3
4 #include <QWidget>
5 #include <QListWidget>
6 #include <QString>
7
8 #include "pirmakenames.h"
9 #include "pirdevicetypenames.h"
10
11 namespace Ui {
12 class PIRSelectKeysetForm;
13 }
14
15 class PIRSelectKeysetForm : public QWidget
16 {
17   Q_OBJECT
18   
19 public:
20   explicit PIRSelectKeysetForm(QWidget *parent = 0);
21   ~PIRSelectKeysetForm();
22
23   void addNameToList(
24     QString name,
25     unsigned int index,
26     PIRMakeName make);
27
28   // This is a bit of a hack, but not sure how to create a connection otherwise.
29   QListWidget *getKeysetListWidget();
30
31 private slots:
32   void filterListByMake(
33     int make);
34
35   void filterListByDeviceType(
36     int deviceType);
37   
38 private:
39   void refilterList();
40
41   Ui::PIRSelectKeysetForm *ui;
42
43   PIRMakeName currentMake;
44   PIRDeviceTypeName currentDevice;
45 };
46
47 #endif // PIRSELECTKEYSETFORM_H