tuchulcha  0.10.1
Graphical Workflow Configuration Editor
NodeTreeView.h
Go to the documentation of this file.
1 /* Copyright (C) 2011 Jonathan Wuest
2 
3  This file is part of Tuchulcha.
4 
5  Tuchulcha is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Tuchulcha is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Tuchulcha. If not, see <http://www.gnu.org/licenses/>.
17 */
24 #ifndef NODETREEVIEW_H
25 #define NODETREEVIEW_H
26 
27 #include <QWidget>
28 
29 class ParameterFileModel;
30 class Node;
31 class TreeViewItem;
32 class QTreeView;
33 class QStandardItemModel;
34 class QSortFilterProxyModel;
35 class QModelIndex;
36 
37 namespace Ui {
38  class NodeTreeView;
39 }
40 
42 class NodeTreeView : public QWidget {
43  Q_OBJECT
44 
45 public:
47  NodeTreeView(QWidget* parent = 0);
48  ~NodeTreeView();
49 
50 public slots:
52  void reload();
54  void on_treeView_clicked(const QModelIndex& index);
56 
62  void on_editFilter_textChanged(const QString& text);
64  void on_treeView_doubleClicked(const QModelIndex&);
65 
66 signals:
69  void showClassDoc(const QString& className);
71  void addNode(QString type);
72 
73 private:
75  Ui::NodeTreeView* _ui;
77  QStandardItemModel* _model;
79  QSortFilterProxyModel* _filter;
81  QSortFilterProxyModel* _hideEmtptyGroups;
82 };
83 
84 #endif /* NODETREEVIEW_H */
85 
NodeTreeView(QWidget *parent=0)
default constructor
QGraphicsItem that contains nodeproperties and draws the node.
Definition: Node.h:36
void showClassDoc(const QString &className)
show documentation page
This model serves to provide a model frontend to access a ParameterFile instance. ...
void on_treeView_doubleClicked(const QModelIndex &)
handle double click events
QStandardItemModel * _model
the model of the view
Definition: NodeTreeView.h:77
void addNode(QString type)
initiate adding a new instance
Ui::NodeTreeView * _ui
designer gui
Definition: NodeTreeView.h:75
void on_treeView_clicked(const QModelIndex &index)
handle documentation display on selection change
charon_core_DLL_PUBLIC std::string type(const std::string &typeInfo)
void reload()
loads nodes/modules from the classesFile
void on_editFilter_textChanged(const QString &text)
handle filter changes
QSortFilterProxyModel * _hideEmtptyGroups
hide emtpy groups proxy
Definition: NodeTreeView.h:81
QTreeView for module selection.
Definition: NodeTreeView.h:42
QSortFilterProxyModel * _filter
filter wildcard proxy
Definition: NodeTreeView.h:79