almost ready to merge into master
[avrdudequi:avrdudequi.git] / programmerdataview.h
1 #ifndef PROGRAMMERDATAVIEW_H
2 #define PROGRAMMERDATAVIEW_H
3
4 #include <QObject>
5 #include <QWidget>
6 #include <QLayout>
7 #include <QVBoxLayout>
8 #include <QLabel>
9 #include "programmer.h"
10 #include <QMap>
11 #include <QGroupBox>
12
13 class ProgrammerDataView : public QObject
14 {
15     Q_OBJECT
16 public:
17     static ProgrammerDataView *instance() {
18         if (!m_instance)
19             m_instance = new ProgrammerDataView;
20         return m_instance;
21     }
22     void setContainer(QWidget *w) {
23         parentWidget = qobject_cast<QGroupBox*>(w);
24         container = qobject_cast<QVBoxLayout*>(w->layout());
25     }
26
27     QSize parentSize();
28     void viewData(const QString &id);
29
30 private:
31     ProgrammerDataView();
32     static ProgrammerDataView *m_instance;
33     QGroupBox *parentWidget;
34
35     QVBoxLayout *dataLayout;
36     Programmer *programmerDevice;
37     QWidget *thisWidget;
38     QString currentId;
39     void viewDeviceNotFound();
40
41     void viewTtyDevice();
42     void viewAvrIspMkii();
43
44     QLabel *labelProgrammerName;
45     QLabel *labelProgrammerNameData;
46     QLabel *labelDevice;
47     QLabel *labelDeviceData;
48
49     QVBoxLayout *container;
50
51 signals:
52
53 private slots:
54     //void viewData(const QString &id);
55     void slotEditLine(const QString &);
56
57 public slots:
58
59 };
60
61 #endif // PROGRAMMERDATAVIEW_H