/* Stanley Designer Copyright (C) 2019 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef SCENE_TREE_H #define SCENE_TREE_H #include #include #include "glscene.h" class QTreeWidgetItem; namespace Ui { class SceneTree; } class SceneTree: public QWidget { Q_OBJECT public: SceneTree(QWidget * parent = 0); ~SceneTree(); void assignQGLView(QGLView * v); private: void changeEvent(QEvent * e); void rememberExpanded(QTreeWidgetItem * ti); void restoreExpanded(QTreeWidgetItem * ti); void makeObjetTree(ObjectBase * o, QTreeWidgetItem * ti); ObjectBase * itemObject(QTreeWidgetItem * item) const; int itemType(QTreeWidgetItem * item) const; bool filterTree(QTreeWidgetItem * ti, const QString & filter, int types); void checkButtons(); Ui::SceneTree * ui; bool block_tree; QIcon icon_empty, icon_geo, icon_camera, icon_light, icon_vis[2]; QSet expanded_; QList geo_items; QGLView * view; private slots: void treeObjects_selectionCnahged(); void on_treeObjects_itemChanged(QTreeWidgetItem * item, int column); void on_treeObjects_itemMoved (QTreeWidgetItem * item, QTreeWidgetItem * new_parent); void on_buttonAddNode_clicked(); void on_buttonAddLight_clicked(); void on_buttonClone_clicked(); void on_buttonUpdate_clicked() {objectsTreeChanged();} void on_buttonSelectParent_clicked(); void on_buttonGroup_clicked(); void removeObjects(); void focusObjects(); void objectsTreeChanged(); void selectionChanged(); void materialsChanged(); void filter(); void __objectDeleted(ObjectBase * o); public slots: signals: private: }; #endif // SCENE_TREE_H