git-svn-id: svn://db.shs.com.ru/libs@626 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
85
qglengine/widgets/scene_tree.h
Normal file
85
qglengine/widgets/scene_tree.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SCENE_TREE_H
|
||||
#define SCENE_TREE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QIcon>
|
||||
#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<ObjectBase*> expanded_;
|
||||
QList<QTreeWidgetItem*> 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
|
||||
Reference in New Issue
Block a user