1 #ifndef _VLP_LGCONFIG_NODELISTDIALOG_H
2 #define _VLP_LGCONFIG_NODELISTDIALOG_H
4 #include <QtGui/QDialog>
5 #include <QtCore/QString>
6 #include <QtCore/QList>
8 #include "lgconfig.h" /* VLPEntry */
10 #include "ui/dialogs/NodeListDialog.h"
17 * Program Node List Dialog class
18 * Displays dialog for configuring nodes
20 class NodeListDialog : public QDialog, private Ui::NodeListDialog {
23 QList<VLPEntry*> _nodes;
28 * @param nodes actual list of nodes to init dialog with
29 * @param parent parent widget for this dialog
31 NodeListDialog(QList<VLPEntry*> nodes, QWidget * parent = 0);
39 * Checks if node with specified id already exists
41 * @param id ID of the node to search for
42 * @return true if node with specified ID has been found, false otherwise
44 bool check_id(int id);
47 * Checks if node with specified address already exists
49 * @param addr address of the node to search for
50 * @return true if node with specified address has been found, false otherwise
52 bool check_addr(QString addr);
54 QList<VLPEntry*> getNodes();
58 * Removes list of nodes from the list widget
60 void removeNodes(QList<QListWidgetItem *> selectedNodes);
63 void on_addButton_clicked();
64 void on_deleteButton_clicked();
65 void on_saveButton_clicked();
66 void on_cancelButton_clicked();
73 #endif /* _VLP_EDITOR_PROGRAMSTRUCTUREDIALOG_H */