Retrieve enrolled fingers on selected device and set checked
[KFingerManager.git] / src / FingerManagerWindow.h
blob55d94b1b0e87eda037441d99fcbc63bb7497d5b1
1 #ifndef FINGERMANAGERWINDOW_H_
2 #define FINGERMANAGERWINDOW_H_
4 #include <QObject>
5 #include <KDialog>
6 #include <KSeparator>
7 #include <QCheckBox>
8 #include <QWidget>
9 #include <QImage>
10 #include <QLabel>
11 #include <QButtonGroup>
12 #include <QComboBox>
13 #include <QHBoxLayout>
14 #include <QVBoxLayout>
15 #include <KConfig>
17 #include "FMDbusConn.h"
19 #define MAX_FINGERS 10
21 typedef struct {
22 int x;
23 int y;
24 } pos;
26 class FingerManagerWindow : public KDialog {
28 Q_OBJECT
30 public slots:
31 void fingerSelected(int finger);
32 void addDevices(int idx);
33 void deviceChanged(int idx);
34 void processFingers(int idx);
35 private:
36 //QSvgWidget handsImage;
37 QLabel *handsLabel;
38 QButtonGroup *btng;
39 QWidget *handsPanel;
40 QWidget *mainPanel;
41 QCheckBox *fingers[MAX_FINGERS];
42 QComboBox *devices;
43 KConfig *settings;
44 QVBoxLayout *mainPanelLayout;
45 QHBoxLayout *devicesLayout;
46 QLabel *deviceLabel;
47 KSeparator *separator;
48 FMDbusConn *dbc;
49 int fingersCount;
51 QCheckBox* createCheckBox(int idx, int x, int y);
52 void initComponents();
53 void load(KConfig *config);
54 public:
55 FingerManagerWindow(QWidget *parent = NULL, Qt::WindowFlags wflags = Qt::Dialog);
56 ~FingerManagerWindow();
59 #endif /*FINGERMANAGERWINDOW_H_*/