Keyset Memory Management Bugfix
[pierogi] / forms / pirmainform.h
1 #ifndef PIRMAINFORM_H
2 #define PIRMAINFORM_H
3
4 #include <QWidget>
5
6 class MainWindow;
7 class PIRKeysetManager;
8
9 namespace Ui {
10 class PIRMainForm;
11 }
12
13 class PIRMainForm : public QWidget
14 {
15   Q_OBJECT
16
17 public:
18 //  explicit PIRMainForm(QWidget *parent = 0);
19   PIRMainForm(MainWindow *mw);
20   ~PIRMainForm();
21
22   void enableButtons(
23     const PIRKeysetManager *keyset,
24     unsigned int id);
25
26   void enableButtons(
27     const PIRKeysetManager *keyset,
28     unsigned int currentID,
29     unsigned int defaultID);
30
31 signals:
32   void powerEnabled(bool);
33   void volumeUpEnabled(bool);
34   void volumeDownEnabled(bool);
35   void channelUpEnabled(bool);
36   void channelDownEnabled(bool);
37   void muteEnabled(bool);
38
39   void keysetMakeChanged(QString);
40   void keysetNameChanged(QString);
41
42 private slots:
43   void on_powerButton_pressed();
44   void on_powerButton_released();
45   void on_mainChannelUpButton_pressed();
46   void on_mainChannelUpButton_released();
47   void on_mainChannelDownButton_pressed();
48   void on_mainChannelDownButton_released();
49   void on_mainVolumeUp_pressed();
50   void on_mainVolumeUp_released();
51   void on_mainVolumeDownButton_pressed();
52   void on_mainVolumeDownButton_released();
53   void on_muteButton_pressed();
54   void on_muteButton_released();
55
56 private:
57   Ui::PIRMainForm *ui;
58
59   MainWindow *mainWindow;
60   unsigned int defaultID;
61 };
62
63 #endif // PIRMAINFORM_H