4036391e1e7fbcc62828f82a592a2ace619fd0f4
[vlp.git] / src / lgconfig / lgconfig.h
1 #ifndef _VLP_LGCONFIG_H
2 #define _VLP_LGCONFIG_H
3
4 #include <QtGui/QMainWindow>
5 #include <QtGui/QPushButton>
6 #include <QtCore/QList>
7 #include <QtGui/QMenuBar>
8
9 #include <Qt3Support/Q3ListBox>
10
11 #include "ui/VLPConfigWindow.h"
12
13 namespace loglan {
14 namespace vlp {
15
16 class VLPEntry {
17 public:
18         int ID;
19         char addr[255];
20         /** 0 - explicit */
21         int type;
22         char progdir[255];
23         char homedir[255];
24         char item[255];
25 };
26
27 class QInstall: public QMainWindow, private Ui::VLPConfigWindow {
28         Q_OBJECT
29 public:
30         Q3ListBox *nodelist;
31         QList<VLPEntry*> Nodes;
32
33         /**
34          * Class constructor
35          */
36         QInstall();
37
38         /**
39          * Checks if node with specified id already exists
40          *
41          * @param id ID of the node to search for
42          * @return true if node with specified ID has been found, false otherwise
43          */
44         bool check_id(int id);
45
46         /**
47          * Checks if node with specified address already exists
48          *
49          * @param addr address of the node to search for
50          * @return true if node with specified address has been found, false otherwise
51          */
52         bool check_addr(char * addr);
53
54 public slots:
55         void AddNode();
56         void DelNode();
57
58 private slots:
59         void on_actionConfigure_triggered();
60         void on_actionQuit_triggered();
61 };
62
63 }
64 }
65
66 #endif /* _VLP_LGCONFIG_H */