git-svn-id: svn://db.shs.com.ru/libs@650 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
BIN
qglengine/icons/format-fill-color.png
Normal file
BIN
qglengine/icons/format-fill-color.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
BIN
qglengine/icons/group.png
Normal file
BIN
qglengine/icons/group.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -55,14 +55,10 @@ SceneTree::SceneTree(QWidget * parent): QWidget(parent) {
|
||||
icon_light = QIcon(":/icons/type-light.png");
|
||||
icon_vis[0] = QIcon(":/icons/layer-visible-off.png");
|
||||
icon_vis[1] = QIcon(":/icons/layer-visible-on.png");
|
||||
QAction * a = 0;
|
||||
a = new QAction(QIcon(":/icons/type-camera.png"), "Focus");
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(focusObjects()));
|
||||
ui->treeObjects->addAction(a);
|
||||
a = new QAction(QIcon(":/icons/edit-delete.png"), "Remove");
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(removeObjects()));
|
||||
ui->treeObjects->addAction(a);
|
||||
ui->treeObjects->addActions(actionsSelection());
|
||||
ui->buttonFilter->addActions(QList<QAction*>() << ui->actionFilter_node << ui->actionFilter_mesh << ui->actionFilter_light << ui->actionFilter_camera);
|
||||
view = 0;
|
||||
hidden_by_filter = obj_count = 0;
|
||||
block_tree = false;
|
||||
connect(ui->treeObjects->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(treeObjects_selectionCnahged()));
|
||||
}
|
||||
@@ -83,6 +79,21 @@ void SceneTree::assignQGLView(QGLView * v) {
|
||||
}
|
||||
|
||||
|
||||
QList<QAction *> SceneTree::actionsAdd() {
|
||||
QList<QAction *> ret;
|
||||
ret << ui->actionAdd_node << ui->actionAdd_light << ui->actionAdd_camera;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
QList<QAction *> SceneTree::actionsSelection() {
|
||||
QList<QAction *> ret;
|
||||
ret << ui->actionFocus << ui->actionRemove << ui->actionClone << ui->actionGroup
|
||||
<< ui->actionSelect_parent << ui->actionSelect_by_mesh << ui->actionSelect_by_material;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::changeEvent(QEvent * e) {
|
||||
QWidget::changeEvent(e);
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
@@ -112,6 +123,7 @@ void SceneTree::restoreExpanded(QTreeWidgetItem * ti) {
|
||||
|
||||
|
||||
void SceneTree::makeObjetTree(ObjectBase * o, QTreeWidgetItem * ti) {
|
||||
++obj_count;
|
||||
for (int i = 0; i < o->childCount(); ++i) {
|
||||
ObjectBase * co = o->child(i);
|
||||
QTreeWidgetItem * ci = new QTreeWidgetItem(ti);
|
||||
@@ -177,7 +189,7 @@ void SceneTree::selectionChanged() {
|
||||
}
|
||||
}
|
||||
block_tree = false;
|
||||
checkButtons();
|
||||
checkActions();
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +212,7 @@ bool SceneTree::filterTree(QTreeWidgetItem * ti, const QString & filter, int typ
|
||||
if (ci->childCount() > 0) {
|
||||
if (!filterTree(ci, filter, types)) {
|
||||
ci->setHidden(true);
|
||||
++hidden_by_filter;
|
||||
continue;
|
||||
}
|
||||
ci->setHidden(false);
|
||||
@@ -209,31 +222,32 @@ bool SceneTree::filterTree(QTreeWidgetItem * ti, const QString & filter, int typ
|
||||
if (filter.isEmpty()) {
|
||||
f = true;
|
||||
} else {
|
||||
f = f || cit.contains(filter);
|
||||
f = f || cit.contains(filter, Qt::CaseInsensitive);
|
||||
}
|
||||
if ((types & t) != t)
|
||||
f = false;
|
||||
ci->setHidden(!f);
|
||||
if (f) ret = true;
|
||||
else ++hidden_by_filter;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::checkButtons() {
|
||||
void SceneTree::checkActions() {
|
||||
bool has_1 = false, has_m = false;
|
||||
if (view) {
|
||||
has_1 = !view->selectedObjects().isEmpty();
|
||||
has_m = view->selectedObjects().size() > 1;
|
||||
}
|
||||
ui->buttonFocus ->setEnabled(has_1);
|
||||
ui->buttonRemove->setEnabled(has_1);
|
||||
ui->buttonClone ->setEnabled(has_1);
|
||||
ui->buttonSelectParent->setEnabled(has_1);
|
||||
ui->buttonSelectByMesh->setEnabled(has_1);
|
||||
ui->buttonSelectByMaterial->setEnabled(has_1);
|
||||
ui->buttonGroup->setEnabled(has_m);
|
||||
ui->actionFocus ->setEnabled(has_1);
|
||||
ui->actionRemove->setEnabled(has_1);
|
||||
ui->actionClone ->setEnabled(has_1);
|
||||
ui->actionGroup->setEnabled(has_m);
|
||||
ui->actionSelect_parent->setEnabled(has_1);
|
||||
ui->actionSelect_by_mesh->setEnabled(has_1);
|
||||
ui->actionSelect_by_material->setEnabled(has_1);
|
||||
}
|
||||
|
||||
|
||||
@@ -247,19 +261,21 @@ void SceneTree::treeObjects_selectionCnahged() {
|
||||
sol << itemObject(i);
|
||||
view->scene()->selectObjects(sol);
|
||||
block_tree = false;
|
||||
checkButtons();
|
||||
checkActions();
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::filter() {
|
||||
int types = 0;
|
||||
if (ui->buttonFilterNode ->isChecked()) types |= otNode ;
|
||||
if (ui->buttonFilterMesh ->isChecked()) types |= otMesh ;
|
||||
if (ui->buttonFilterLight ->isChecked()) types |= otLight ;
|
||||
if (ui->buttonFilterCamera->isChecked()) types |= otCamera;
|
||||
if (ui->actionFilter_node ->isChecked()) types |= otNode ;
|
||||
if (ui->actionFilter_mesh ->isChecked()) types |= otMesh ;
|
||||
if (ui->actionFilter_light ->isChecked()) types |= otLight ;
|
||||
if (ui->actionFilter_camera->isChecked()) types |= otCamera;
|
||||
if (types == 0) types = 0xFF;
|
||||
hidden_by_filter = 0;
|
||||
filterTree(ui->treeObjects->invisibleRootItem(), ui->lineFilter->text(), types);
|
||||
ui->treeObjects->invisibleRootItem()->setHidden(false);
|
||||
ui->labelCounts->setText(tr("%1 objects, %2 hide by filter").arg(obj_count).arg(hidden_by_filter));
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +323,7 @@ void SceneTree::on_treeObjects_itemMoved(QTreeWidgetItem * item, QTreeWidgetItem
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonAddNode_clicked() {
|
||||
void SceneTree::on_actionAdd_node_triggered() {
|
||||
if (!view) return;
|
||||
ObjectBase * no = new ObjectBase();
|
||||
view->scene()->addObject(no);
|
||||
@@ -315,7 +331,7 @@ void SceneTree::on_buttonAddNode_clicked() {
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonAddLight_clicked() {
|
||||
void SceneTree::on_actionAdd_light_triggered() {
|
||||
if (!view) return;
|
||||
ObjectBase * no = new Light();
|
||||
view->scene()->addObject(no);
|
||||
@@ -323,7 +339,15 @@ void SceneTree::on_buttonAddLight_clicked() {
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonClone_clicked() {
|
||||
void SceneTree::on_actionAdd_camera_triggered() {
|
||||
if (!view) return;
|
||||
ObjectBase * no = new Camera();
|
||||
view->scene()->addObject(no);
|
||||
view->scene()->selectObject(no);
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_actionClone_triggered() {
|
||||
if (!view) return;
|
||||
QList<QTreeWidgetItem*> sil = ui->treeObjects->selectedItems();
|
||||
QList<ObjectBase*> col;
|
||||
@@ -338,7 +362,19 @@ void SceneTree::on_buttonClone_clicked() {
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonSelectParent_clicked() {
|
||||
void SceneTree::on_actionGroup_triggered() {
|
||||
if (!view) return;
|
||||
QList<ObjectBase*> sol = view->scene()->selectedObjects(true);
|
||||
ObjectBase * cp = sol[0]->parent();
|
||||
ObjectBase * nr = new ObjectBase();
|
||||
cp->addChild(nr);
|
||||
foreach (ObjectBase * o, sol)
|
||||
nr->addChild(o);
|
||||
view->scene()->selectObject(nr);
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_actionSelect_parent_triggered() {
|
||||
if (!view) return;
|
||||
QList<ObjectBase*> sol = view->scene()->selectedObjects(true);
|
||||
QSet<ObjectBase*> nsl;
|
||||
@@ -352,28 +388,16 @@ void SceneTree::on_buttonSelectParent_clicked() {
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonSelectByMesh_clicked() {
|
||||
void SceneTree::on_actionSelect_by_mesh_triggered() {
|
||||
view->scene()->selectObjectsByMesh();
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonSelectByMaterial_clicked() {
|
||||
void SceneTree::on_actionSelect_by_material_triggered() {
|
||||
view->scene()->selectObjectsByMaterial();
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::on_buttonGroup_clicked() {
|
||||
if (!view) return;
|
||||
QList<ObjectBase*> sol = view->scene()->selectedObjects(true);
|
||||
ObjectBase * cp = sol[0]->parent();
|
||||
ObjectBase * nr = new ObjectBase();
|
||||
cp->addChild(nr);
|
||||
foreach (ObjectBase * o, sol)
|
||||
nr->addChild(o);
|
||||
view->scene()->selectObject(nr);
|
||||
}
|
||||
|
||||
|
||||
void SceneTree::removeObjects() {
|
||||
if (!view) return;
|
||||
QList<QTreeWidgetItem*> sil = ui->treeObjects->selectedItems();
|
||||
@@ -408,7 +432,9 @@ void SceneTree::objectsTreeChanged() {
|
||||
block_tree = false;
|
||||
if (!view) return;
|
||||
block_tree = true;
|
||||
obj_count = 0;
|
||||
makeObjetTree(view->scene()->rootObject(), ui->treeObjects->invisibleRootItem());
|
||||
--obj_count;
|
||||
restoreExpanded(ui->treeObjects->invisibleRootItem());
|
||||
block_tree = false;
|
||||
filter();
|
||||
|
||||
@@ -37,6 +37,8 @@ public:
|
||||
~SceneTree();
|
||||
|
||||
void assignQGLView(QGLView * v);
|
||||
QList<QAction*> actionsAdd();
|
||||
QList<QAction*> actionsSelection();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent * e);
|
||||
@@ -46,10 +48,11 @@ private:
|
||||
ObjectBase * itemObject(QTreeWidgetItem * item) const;
|
||||
int itemType(QTreeWidgetItem * item) const;
|
||||
bool filterTree(QTreeWidgetItem * ti, const QString & filter, int types);
|
||||
void checkButtons();
|
||||
void checkActions();
|
||||
|
||||
Ui::SceneTree * ui;
|
||||
bool block_tree;
|
||||
int hidden_by_filter, obj_count;
|
||||
QIcon icon_empty, icon_geo, icon_camera, icon_light, icon_vis[2];
|
||||
QSet<ObjectBase*> expanded_;
|
||||
QList<QTreeWidgetItem*> geo_items;
|
||||
@@ -59,14 +62,19 @@ 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_buttonSelectByMesh_clicked();
|
||||
void on_buttonSelectByMaterial_clicked();
|
||||
void on_buttonGroup_clicked();
|
||||
|
||||
void on_actionAdd_node_triggered();
|
||||
void on_actionAdd_light_triggered();
|
||||
void on_actionAdd_camera_triggered();
|
||||
|
||||
void on_actionFocus_triggered() {focusObjects();}
|
||||
void on_actionRemove_triggered() {removeObjects();}
|
||||
void on_actionClone_triggered();
|
||||
void on_actionGroup_triggered();
|
||||
|
||||
void on_actionSelect_parent_triggered();
|
||||
void on_actionSelect_by_mesh_triggered();
|
||||
void on_actionSelect_by_material_triggered();
|
||||
|
||||
void removeObjects();
|
||||
void focusObjects();
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>345</width>
|
||||
<height>494</height>
|
||||
<width>442</width>
|
||||
<height>606</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -24,350 +24,65 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupSelection">
|
||||
<property name="title">
|
||||
<string>Selection</string>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Filter:</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonFocus">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Focus on selected</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-camera.png</normaloff>:/icons/type-camera.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonRemove">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Delete selected</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonClone">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clone selected</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonGroup">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Group selected</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>G</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSelectParent">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select parent</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/go-top.png</normaloff>:/icons/go-top.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSelectByMesh">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select by mesh</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-geo.png</normaloff>:/icons/type-geo.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonSelectByMaterial">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select by material</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/blockview/qad_blockview.qrc">
|
||||
<normaloff>:/icons/format-fill-color.png</normaloff>:/icons/format-fill-color.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupAdd">
|
||||
<property name="title">
|
||||
<string>Add</string>
|
||||
<widget class="CLineEdit" name="lineFilter"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonFilter">
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/widgets/qad_widgets.qrc">
|
||||
<normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
|
||||
</property>
|
||||
<property name="popupMode">
|
||||
<enum>QToolButton::InstantPopup</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonExpand">
|
||||
<property name="toolTip">
|
||||
<string>Expand tree</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/expand.png</normaloff>:/icons/expand.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonCollapse">
|
||||
<property name="toolTip">
|
||||
<string>Collapse tree</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/collapse.png</normaloff>:/icons/collapse.png</iconset>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonAddNode">
|
||||
<property name="toolTip">
|
||||
<string>Add empty object</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/add-type-empty.png</normaloff>:/icons/add-type-empty.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonAddLight">
|
||||
<property name="toolTip">
|
||||
<string>Add light</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/add-type-light.png</normaloff>:/icons/add-type-light.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonAddCamera">
|
||||
<property name="toolTip">
|
||||
<string>Add camera</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/add-type-camera.png</normaloff>:/icons/add-type-camera.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupFilter">
|
||||
<property name="title">
|
||||
<string>Filter</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="CLineEdit" name="lineFilter"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Types:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="widgetFilter" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonFilterNode">
|
||||
<property name="toolTip">
|
||||
<string>Nodes</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-empty.png</normaloff>:/icons/type-empty.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonFilterMesh">
|
||||
<property name="toolTip">
|
||||
<string>Meshes</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-geo.png</normaloff>:/icons/type-geo.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonFilterLight">
|
||||
<property name="toolTip">
|
||||
<string>Lights</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-light.png</normaloff>:/icons/type-light.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonFilterCamera">
|
||||
<property name="toolTip">
|
||||
<string>Cameras</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-camera.png</normaloff>:/icons/type-camera.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupTree">
|
||||
<property name="title">
|
||||
<string>Tree</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QToolButton" name="buttonExpand">
|
||||
<property name="toolTip">
|
||||
<string>Expand tree</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/expand.png</normaloff>:/icons/expand.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="buttonUpdate">
|
||||
<property name="toolTip">
|
||||
<string>Force update</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../qcd_utils/pult/cdpult.qrc">
|
||||
<normaloff>:/icons/view-refresh.png</normaloff>:/icons/view-refresh.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QToolButton" name="buttonCollapse">
|
||||
<property name="toolTip">
|
||||
<string>Collapse tree</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/collapse.png</normaloff>:/icons/collapse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QLabel" name="labelCounts">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="InternalMoveTreeWidget" name="treeObjects">
|
||||
@@ -407,6 +122,144 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="actionFocus">
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-camera.png</normaloff>:/icons/type-camera.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Focus</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRemove">
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClone">
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-copy.png</normaloff>:/icons/edit-copy.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clone</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGroup">
|
||||
<property name="icon">
|
||||
<iconset resource="widgets.qrc">
|
||||
<normaloff>:/icons/group.png</normaloff>:/icons/group.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Group</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSelect_parent">
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/go-top.png</normaloff>:/icons/go-top.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select parent</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSelect_by_mesh">
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-geo.png</normaloff>:/icons/type-geo.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select by mesh</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSelect_by_material">
|
||||
<property name="icon">
|
||||
<iconset resource="../../qad/blockview/qad_blockview.qrc">
|
||||
<normaloff>:/icons/format-fill-color.png</normaloff>:/icons/format-fill-color.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select by material</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_node">
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/add-type-empty.png</normaloff>:/icons/add-type-empty.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add node</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_light">
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/add-type-light.png</normaloff>:/icons/add-type-light.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add light</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_camera">
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/add-type-camera.png</normaloff>:/icons/add-type-camera.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add camera</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_node">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-empty.png</normaloff>:/icons/type-empty.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Nodes</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_mesh">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-geo.png</normaloff>:/icons/type-geo.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Meshes</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_light">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-light.png</normaloff>:/icons/type-light.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lights</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_camera">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/type-camera.png</normaloff>:/icons/type-camera.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cameras</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
@@ -422,8 +275,9 @@
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../qad/utils/qad_utils.qrc"/>
|
||||
<include location="../../qad/widgets/qad_widgets.qrc"/>
|
||||
<include location="../../qad/blockview/qad_blockview.qrc"/>
|
||||
<include location="../../qcd_utils/pult/cdpult.qrc"/>
|
||||
<include location="widgets.qrc"/>
|
||||
<include location="../qglview.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
@@ -434,12 +288,12 @@
|
||||
<slot>expandAll()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>288</x>
|
||||
<y>143</y>
|
||||
<x>395</x>
|
||||
<y>164</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>299</x>
|
||||
<y>174</y>
|
||||
<y>359</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@@ -450,44 +304,12 @@
|
||||
<slot>collapseAll()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>319</x>
|
||||
<y>137</y>
|
||||
<x>427</x>
|
||||
<y>164</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>332</x>
|
||||
<y>184</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonFocus</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>SceneTree</receiver>
|
||||
<slot>focusObjects()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>26</x>
|
||||
<y>37</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>17</x>
|
||||
<y>27</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonRemove</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>SceneTree</receiver>
|
||||
<slot>removeObjects()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>122</x>
|
||||
<y>39</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>114</x>
|
||||
<y>26</y>
|
||||
<y>369</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
@@ -498,8 +320,8 @@
|
||||
<slot>filter()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>239</x>
|
||||
<y>100</y>
|
||||
<x>273</x>
|
||||
<y>130</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>355</x>
|
||||
@@ -508,66 +330,66 @@
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonFilterNode</sender>
|
||||
<sender>actionFilter_camera</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SceneTree</receiver>
|
||||
<slot>filter()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>61</x>
|
||||
<y>137</y>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>353</x>
|
||||
<y>109</y>
|
||||
<x>414</x>
|
||||
<y>302</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonFilterMesh</sender>
|
||||
<sender>actionFilter_mesh</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SceneTree</receiver>
|
||||
<slot>filter()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>95</x>
|
||||
<y>140</y>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>357</x>
|
||||
<y>146</y>
|
||||
<x>414</x>
|
||||
<y>302</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonFilterLight</sender>
|
||||
<sender>actionFilter_light</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SceneTree</receiver>
|
||||
<slot>filter()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>135</x>
|
||||
<y>135</y>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>353</x>
|
||||
<y>173</y>
|
||||
<x>414</x>
|
||||
<y>302</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonFilterCamera</sender>
|
||||
<sender>actionFilter_node</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>SceneTree</receiver>
|
||||
<slot>filter()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>161</x>
|
||||
<y>135</y>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>351</x>
|
||||
<y>226</y>
|
||||
<x>414</x>
|
||||
<y>302</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
||||
@@ -11,5 +11,7 @@
|
||||
<file>../icons/edit-copy.png</file>
|
||||
<file>../icons/edit-paste.png</file>
|
||||
<file>../icons/document-edit.png</file>
|
||||
<file>../icons/group.png</file>
|
||||
<file>../icons/format-fill-color.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user