-
-
Notifications
You must be signed in to change notification settings - Fork 269
Expand file tree
/
Copy pathsidepanel_editor.h
More file actions
78 lines (48 loc) · 1.62 KB
/
sidepanel_editor.h
File metadata and controls
78 lines (48 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef SIDE_PANEL_EDITOR_H
#define SIDE_PANEL_EDITOR_H
#include <QFrame>
#include <QFile>
#include <QTreeWidgetItem>
#include <QTableWidgetItem>
#include "XML_utilities.hpp"
namespace Ui {
class SidepanelEditor;
}
class SidepanelEditor : public QFrame
{
Q_OBJECT
public:
explicit SidepanelEditor(QtNodes::DataModelRegistry* registry,
NodeModels& tree_nodes_model,
QWidget *parent = nullptr);
~SidepanelEditor();
void updateTreeView();
void clear();
void addNode();
public slots:
void onRemoveModel(QString selected_name);
void onReplaceModel(const QString &old_name, const NodeModel &new_model);
private slots:
void on_paletteTreeWidget_itemSelectionChanged();
void on_lineEditFilter_textChanged(const QString &arg1);
void on_buttonAddNode_clicked();
void onContextMenu(const QPoint &point);
void on_buttonUpload_clicked();
void on_buttonDownload_clicked();
void on_buttonLock_toggled(bool checked);
signals:
void addNewModel(const NodeModel &new_model);
void modelRemoveRequested(QString ID);
void nodeModelEdited(QString prev_ID, QString new_ID);
void addSubtree(QString ID);
void renameSubtree(QString prev_ID, QString new_ID);
void destroySubtree(QString ID);
private:
Ui::SidepanelEditor *ui;
NodeModels &_tree_nodes_model;
QtNodes::DataModelRegistry* _model_registry;
std::map<QString, QTreeWidgetItem*> _tree_view_category_items;
NodeModels importFromXML(QFile *file);
NodeModels importFromSkills(const QString& filename);
};
#endif // NODE_PALETTE_H