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"
21 * Program Node List Dialog class
22 * Displays dialog for configuring nodes
24 class NodeListDialog : public QDialog, private Ui::NodeListDialog {
27 QList<VLPEntry*> _nodes;
32 * @param nodes actual list of nodes to init dialog with
33 * @param parent parent widget for this dialog
35 NodeListDialog(QList<VLPEntry*> nodes, QWidget * parent = 0);
43 * Checks if node with specified id already exists
45 * @param id ID of the node to search for
46 * @return true if node with specified ID has been found, false otherwise
48 bool check_id(int id);
51 * Checks if node with specified address already exists
53 * @param addr address of the node to search for
54 * @return true if node with specified address has been found, false otherwise
56 bool check_addr(QString addr);
58 QList<VLPEntry*> getNodes();
62 * Removes list of nodes from the list widget
64 void removeNodes(QList<QListWidgetItem *> selectedNodes);
67 void on_addButton_clicked();
68 void on_deleteButton_clicked();
69 void on_saveButton_clicked();
70 void on_cancelButton_clicked();
77 #endif /* _VLP_EDITOR_PROGRAMSTRUCTUREDIALOG_H */