![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
GUI database tree root. More...
#include <ecvDBRoot.h>


Public Slots | |
| void | changeSelection (const QItemSelection &selected, const QItemSelection &deselected) |
| void | reflectObjectPropChange (ccHObject *obj) |
| void | redrawCCObject (ccHObject *object, bool forceRedraw=true) |
| void | redrawCCObjectAndChildren (ccHObject *object, bool forceRedraw=true) |
| void | updateCCObject (ccHObject *object) |
| void | deleteSelectedEntities () |
| void | selectEntity (ccHObject *obj, bool forceAdditiveSelection=false) |
| Selects a given entity. More... | |
| void | selectEntities (std::unordered_set< int > entIDs) |
| Selects multiple entities at once (shortcut to the other version) More... | |
| void | selectEntities (const ccHObject::Container &entities, bool incremental=false) |
| Selects multiple entities at once. More... | |
Signals | |
| void | selectionChanged () |
| void | dbIsEmpty () |
| void | dbIsNotEmptyAnymore () |
Public Member Functions | |
| ccDBRoot (ccCustomQTreeView *dbTreeWidget, QTreeView *propertiesTreeWidget, QObject *parent=nullptr) | |
| Default constructor. More... | |
| virtual | ~ccDBRoot () override |
| Destructor. More... | |
| void | hide () |
| void | show () |
| ccHObject * | getRootEntity () |
| Returns associated root object. More... | |
| void | hidePropertiesView () |
| Hides properties view. More... | |
| void | updatePropertiesView () |
| Updates properties view. More... | |
| ccPropertiesTreeDelegate * | getPropertiesDelegate () |
| Get properties tree delegate. More... | |
| void | addElement (ccHObject *object, bool autoExpand=true) |
| Adds an element to the DB tree. More... | |
| void | removeElement (ccHObject *object) |
| Removes an element from the DB tree. More... | |
| void | removeElements (ccHObject::Container &objects) |
| Removes several elements at once from the DB tree. More... | |
| ccHObject * | find (int uniqueID) const |
| Finds an element in DB. More... | |
| int | countSelectedEntities (CV_CLASS_ENUM filter=CV_TYPES::OBJECT) |
| size_t | getSelectedEntities (ccHObject::Container &selectedEntities, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, dbTreeSelectionInfo *info=nullptr) |
| void | expandElement (ccHObject *object, bool state) |
| Expands tree at a given node. More... | |
| void | unselectEntity (ccHObject *obj) |
| Unselects a given entity. More... | |
| void | unselectAllEntities () |
| Unselects all entities. More... | |
| void | unloadAll () |
| Unloads all entities. More... | |
| virtual QVariant | data (const QModelIndex &index, int role) const override |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parentIndex=QModelIndex()) const override |
| QModelIndex | index (ccHObject *object) |
| virtual QModelIndex | parent (const QModelIndex &index) const override |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const override |
| virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| virtual Qt::DropActions | supportedDropActions () const override |
| virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override |
| virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const override |
| virtual Qt::DropActions | supportedDragActions () const override |
Protected Types | |
| enum | TOGGLE_PROPERTY { TG_ENABLE , TG_VISIBLE , TG_COLOR , TG_SF , TG_NORMAL , TG_MATERIAL , TG_3D_NAME } |
| Entity property that can be toggled. More... | |
| enum | SortRules { SORT_A2Z , SORT_Z2A , SORT_BY_TYPE } |
| Entities sorting schemes. More... | |
Protected Slots | |
| void | showContextMenu (const QPoint &) |
| void | expandBranch () |
| void | collapseBranch () |
| void | gatherRecursiveInformation () |
| void | sortChildrenAZ () |
| void | sortChildrenZA () |
| void | sortChildrenType () |
| void | selectByTypeAndName () |
| void | exportImages () |
| void | toggleSelectedEntities () |
| void | toggleSelectedEntitiesVisibility () |
| void | toggleSelectedEntitiesColor () |
| void | toggleSelectedEntitiesNormals () |
| void | toggleSelectedEntitiesSF () |
| void | toggleSelectedEntitiesMat () |
| void | toggleSelectedEntities3DName () |
| void | addEmptyGroup () |
| void | alignCameraWithEntityDirect () |
| void | alignCameraWithEntityIndirect () |
| void | enableBubbleViewMode () |
| void | editLabelScalarValue () |
Protected Member Functions | |
| void | toggleSelectedEntitiesProperty (TOGGLE_PROPERTY prop) |
| void | alignCameraWithEntity (bool reverse) |
| Aligns the camera with the currently selected entity. More... | |
| void | showPropertiesView (ccHObject *obj) |
| Shows properties view for a given element. More... | |
| void | sortSelectedEntitiesChildren (SortRules rule) |
| Sorts selected entities children. More... | |
| void | expandOrCollapseHoveredBranch (bool expand) |
| Expands or collapses hovered item. More... | |
| void | selectChildrenByTypeAndName (CV_CLASS_ENUM type, bool typeIsExclusive=true, QString name=QString(), bool nameIsRegex=false) |
| Selects objects by type and/or name. More... | |
Protected Attributes | |
| ccHObject * | m_treeRoot |
| Associated DB root. More... | |
| QTreeView * | m_dbTreeWidget |
| Associated widget for DB tree. More... | |
| QTreeView * | m_propertiesTreeWidget |
| Associated widget for selected entity's properties tree. More... | |
| QStandardItemModel * | m_propertiesModel |
| Selected entity's properties data model. More... | |
| ccPropertiesTreeDelegate * | m_ccPropDelegate |
| Selected entity's properties delegate. More... | |
| QAction * | m_expandBranch |
| Context menu action: expand tree branch. More... | |
| QAction * | m_collapseBranch |
| Context menu action: collapse tree branch. More... | |
| QAction * | m_gatherInformation |
| Context menu action: gather (recursive) information on selected entities. More... | |
| QAction * | m_sortChildrenAZ |
| Context menu action: sort children in alphabetical order. More... | |
| QAction * | m_sortChildrenZA |
| Context menu action: sort children in reverse alphabetical order. More... | |
| QAction * | m_sortChildrenType |
| Context menu action: sort children by type. More... | |
| QAction * | m_selectByTypeAndName |
| Context menu action: select object by type and/or by name. More... | |
| QAction * | m_exportImages |
| Context menu action: export images. More... | |
| QAction * | m_deleteSelectedEntities |
| Context menu action: delete selected entities. More... | |
| QAction * | m_toggleSelectedEntities |
| Context menu action: enabled/disable selected entities. More... | |
| QAction * | m_toggleSelectedEntitiesVisibility |
| Context menu action: hide/show selected entities. More... | |
| QAction * | m_toggleSelectedEntitiesColor |
| Context menu action: hide/show selected entities color. More... | |
| QAction * | m_toggleSelectedEntitiesNormals |
| Context menu action: hide/show selected entities normals. More... | |
| QAction * | m_toggleSelectedEntitiesMat |
| Context menu action: hide/show selected entities materials/textures. More... | |
| QAction * | m_toggleSelectedEntitiesSF |
| Context menu action: hide/show selected entities SF. More... | |
| QAction * | m_toggleSelectedEntities3DName |
| Context menu action: hide/show selected entities 3D name. More... | |
| QAction * | m_addEmptyGroup |
| Context menu action: add empty group. More... | |
| QAction * | m_alignCameraWithEntity |
| Context menu action: use 3-points labels or planes to orient camera. More... | |
| QAction * | m_alignCameraWithEntityReverse |
| Context menu action: reverse of m_alignCameraWithEntity. More... | |
| QAction * | m_enableBubbleViewMode |
| Context menu action: enable bubble-view (on a sensor) More... | |
| QAction * | m_editLabelScalarValue |
| Context menu action: change current scalar value (via a 2D label) More... | |
| QPoint | m_contextMenuPos |
| Last context menu pos. More... | |
GUI database tree root.
Definition at line 65 of file ecvDBRoot.h.
|
protected |
Entities sorting schemes.
| Enumerator | |
|---|---|
| SORT_A2Z | |
| SORT_Z2A | |
| SORT_BY_TYPE | |
Definition at line 268 of file ecvDBRoot.h.
|
protected |
Entity property that can be toggled.
| Enumerator | |
|---|---|
| TG_ENABLE | |
| TG_VISIBLE | |
| TG_COLOR | |
| TG_SF | |
| TG_NORMAL | |
| TG_MATERIAL | |
| TG_3D_NAME | |
Definition at line 198 of file ecvDBRoot.h.
| ccDBRoot::ccDBRoot | ( | ccCustomQTreeView * | dbTreeWidget, |
| QTreeView * | propertiesTreeWidget, | ||
| QObject * | parent = nullptr |
||
| ) |
Default constructor.
| dbTreeWidget | widget for DB tree display |
| propertiesTreeWidget | widget for selected entity's properties tree display |
| parent | widget QObject parent |
Definition at line 262 of file ecvDBRoot.cpp.
References addEmptyGroup(), alignCameraWithEntityDirect(), alignCameraWithEntityIndirect(), ccPropertiesTreeDelegate::ccObjectAndChildrenAppearanceChanged(), ccPropertiesTreeDelegate::ccObjectAppearanceChanged(), ccPropertiesTreeDelegate::ccObjectPropertiesChanged(), changeSelection(), collapseBranch(), deleteSelectedEntities(), editLabelScalarValue(), enableBubbleViewMode(), expandBranch(), exportImages(), gatherRecursiveInformation(), redrawCCObject(), redrawCCObjectAndChildren(), selectByTypeAndName(), showContextMenu(), sortChildrenAZ(), sortChildrenType(), sortChildrenZA(), toggleSelectedEntities(), toggleSelectedEntities3DName(), toggleSelectedEntitiesColor(), toggleSelectedEntitiesMat(), toggleSelectedEntitiesNormals(), toggleSelectedEntitiesSF(), toggleSelectedEntitiesVisibility(), and updateCCObject().
|
overridevirtual |
Destructor.
Definition at line 382 of file ecvDBRoot.cpp.
References m_ccPropDelegate, m_propertiesModel, and m_treeRoot.
| void ccDBRoot::addElement | ( | ccHObject * | object, |
| bool | autoExpand = true |
||
| ) |
Adds an element to the DB tree.
Definition at line 423 of file ecvDBRoot.cpp.
References ccHObject::addChild(), dbIsNotEmptyAnymore(), ccHObject::getChildIndex(), ccHObject::getChildrenNumber(), ccHObject::getParent(), index(), m_dbTreeWidget, and m_treeRoot.
Referenced by addEmptyGroup(), MainWindow::addToDB(), dropMimeData(), and MainWindow::putObjectBackIntoDBTree().
|
protectedslot |
Definition at line 2074 of file ecvDBRoot.cpp.
References addElement(), index(), m_contextMenuPos, m_dbTreeWidget, and parent().
Referenced by ccDBRoot().
|
protected |
Aligns the camera with the currently selected entity.
| reverse | whether to use the entity's normal (false) or its inverse (true) |
Definition at line 1628 of file ecvDBRoot.cpp.
References cc2DLabel::PickedPoint::cloud, cloudViewer::CCMiscTools::ComputeBaseVectors(), cross(), CV_TYPES::FACET, Vector3Tpl< double >::fromArray(), ccHObject::getBB_recursive(), cloudViewer::BoundingBoxTpl< T >::getCenter(), ccGLMatrixTpl< T >::getColumnAsVec3D(), ccFacet::getNormal(), ccPlane::getNormal(), ccMesh::getOwnBB(), cc2DLabel::getPickedPoint(), cloudViewer::GenericIndexedCloud::getPoint(), ccGenericPrimitive::getTransformation(), cc2DLabel::PickedPoint::index, ccObject::isA(), CV_TYPES::LABEL_2D, m_dbTreeWidget, CV_TYPES::PLANE, CVLog::Print(), ccGLMatrixTpl< T >::setTranslation(), cc2DLabel::size(), and Tuple3Tpl< Type >::u.
Referenced by alignCameraWithEntityDirect(), and alignCameraWithEntityIndirect().
|
inlineprotectedslot |
Definition at line 247 of file ecvDBRoot.h.
References alignCameraWithEntity().
Referenced by ccDBRoot().
|
inlineprotectedslot |
Definition at line 248 of file ecvDBRoot.h.
References alignCameraWithEntity().
Referenced by ccDBRoot().
|
slot |
Definition at line 999 of file ecvDBRoot.cpp.
References MainWindow::refreshAll(), selectionChanged(), ecvDisplayTools::SetRedrawRecursive(), ccDrawableObject::setSelected(), MainWindow::TheInstance(), and updatePropertiesView().
Referenced by ccDBRoot().
|
protectedslot |
Definition at line 1588 of file ecvDBRoot.cpp.
References expandOrCollapseHoveredBranch().
Referenced by ccDBRoot().
|
overridevirtual |
Definition at line 994 of file ecvDBRoot.cpp.
References parent().
| int ccDBRoot::countSelectedEntities | ( | CV_CLASS_ENUM | filter = CV_TYPES::OBJECT | ) |
Returns the number of selected entities in DB tree (optionally with a given type)
Definition at line 1256 of file ecvDBRoot.cpp.
References ccObject::isKindOf(), m_dbTreeWidget, and CV_TYPES::OBJECT.
|
overridevirtual |
Definition at line 690 of file ecvDBRoot.cpp.
References count, ccHObject::filterChildren(), ccHObject::getChildCountRecursive(), ccHObject::getChildrenNumber(), ccHObject::getClassID(), ccHObject::getIcon(), ccObject::getName(), CV_TYPES::HIERARCHY_OBJECT, index(), ccObject::isA(), ccObject::isEnabled(), ccObject::isLocked(), CV_TYPES::LABEL_2D, and CV_TYPES::VIEWPORT_2D_LABEL.
Referenced by dropMimeData().
|
signal |
Referenced by deleteSelectedEntities(), removeElement(), removeElements(), and unloadAll().
|
signal |
Referenced by addElement().
|
slot |
Definition at line 593 of file ecvDBRoot.cpp.
References CanDetachCloud(), dbIsEmpty(), ccGenericMesh::getAssociatedCloud(), ccHObject::getChildrenNumber(), ccObject::getName(), ccHObject::getParent(), hidePropertiesView(), index(), ccHObject::isAncestorOf(), ccObject::isKindOf(), ccObject::isLocked(), m_dbTreeWidget, m_treeRoot, CV_TYPES::MESH, parent(), CV_TYPES::POINT_CLOUD, MainWindow::refreshAll(), ecvDisplayTools::SetRedrawRecursive(), ecvDisplayTools::SetRemoveViewIDs(), MainWindow::TheInstance(), ccHObjectCaster::ToGenericMesh(), updatePropertiesView(), and CVLog::Warning().
Referenced by ccDBRoot().
|
overridevirtual |
Definition at line 1401 of file ecvDBRoot.cpp.
References ccHObject::addChild(), ccHObject::addDependency(), addElement(), data(), ccHObject::DP_PARENT_OF_OTHER, CVLog::Error(), ccHObject::find(), ccGenericMesh::getAssociatedCloud(), ccHObject::getChildIndex(), ccHObject::getChildrenNumber(), ccHObject::getDependencyFlagsWith(), ccHObject::getParent(), CV_TYPES::IMAGE, ccObject::isA(), ccObject::isKindOf(), ccObject::isLeaf(), m_treeRoot, CV_TYPES::MESH, CV_TYPES::POINT_CLOUD, MainWindow::refreshAll(), ccHObject::removeDependencyFlag(), removeElement(), CV_TYPES::SUB_MESH, MainWindow::TheInstance(), and ccHObjectCaster::ToGenericMesh().
|
protectedslot |
Definition at line 2106 of file ecvDBRoot.cpp.
References cc2DLabel::PickedPoint::cloud, ccScalarField::computeMinAndMax(), ccPointCloud::getCurrentDisplayedScalarField(), cloudViewer::ScalarField::getName(), cc2DLabel::getPickedPoint(), cloudViewer::ScalarField::getValue(), ccDrawableObject::hasScalarFields(), cc2DLabel::PickedPoint::index, ccObject::isA(), m_dbTreeWidget, CV_TYPES::POINT_CLOUD, ccHObject::redrawDisplay(), cloudViewer::ScalarField::setValue(), cc2DLabel::size(), MainWindow::TheInstance(), ccHObjectCaster::To2DLabel(), and CVLog::Warning().
Referenced by ccDBRoot().
|
protectedslot |
Definition at line 2088 of file ecvDBRoot.cpp.
References CV_TYPES::GBL_SENSOR, ccObject::isA(), m_dbTreeWidget, MainWindow::refreshAll(), and MainWindow::TheInstance().
Referenced by ccDBRoot().
|
protectedslot |
Definition at line 1586 of file ecvDBRoot.cpp.
References expandOrCollapseHoveredBranch().
Referenced by ccDBRoot().
| void ccDBRoot::expandElement | ( | ccHObject * | object, |
| bool | state | ||
| ) |
Expands tree at a given node.
Definition at line 477 of file ecvDBRoot.cpp.
References ccHObject::getChild(), ccHObject::getChildrenNumber(), index(), and m_dbTreeWidget.
Referenced by cloudViewer::ModelViewerWidget::SelectObject().
|
protected |
Expands or collapses hovered item.
Definition at line 1590 of file ecvDBRoot.cpp.
References ccHObject::getChild(), ccHObject::getChildrenNumber(), index(), m_contextMenuPos, and m_dbTreeWidget.
Referenced by collapseBranch(), and expandBranch().
|
protectedslot |
Definition at line 2159 of file ecvDBRoot.cpp.
References CVLog::Error(), filename, ccHObject::filterChildren(), CV_TYPES::IMAGE, image, ecvProgressDialog::isCancelRequested(), ccObject::isKindOf(), m_dbTreeWidget, CVLog::Print(), ecvProgressDialog::start(), ecvProgressDialog::stop(), MainWindow::TheInstance(), ccHObjectCaster::ToImage(), and CVLog::Warning().
Referenced by ccDBRoot().
| ccHObject * ccDBRoot::find | ( | int | uniqueID | ) | const |
Finds an element in DB.
Definition at line 1197 of file ecvDBRoot.cpp.
References ccHObject::find(), and m_treeRoot.
Referenced by selectEntities().
|
overridevirtual |
Definition at line 1342 of file ecvDBRoot.cpp.
References CV_TYPES::CAMERA_SENSOR, CanDetachCloud(), CV_TYPES::CUSTOM_H_OBJECT, CV_TYPES::FACET, cloudViewer::ReferenceCloud::getAssociatedCloud(), ccHObject::getParent(), CV_TYPES::HIERARCHY_OBJECT, CV_TYPES::IMAGE, index(), ccObject::isA(), ccObject::isKindOf(), ccObject::isLocked(), CV_TYPES::LABEL_2D, CV_TYPES::MESH, CV_TYPES::POINT_CLOUD, CV_TYPES::POLY_LINE, CV_TYPES::PRIMITIVE, CV_TYPES::SUB_MESH, and CV_TYPES::VIEWPORT_2D_OBJECT.
|
protectedslot |
Definition at line 1699 of file ecvDBRoot.cpp.
References CVLog::Error(), ccHObject::getChild(), ccHObject::getChildrenNumber(), cloudViewer::PointCloudTpl< T >::getNumberOfScalarFields(), ccPointCloud::hasColors(), ccPointCloud::hasNormals(), ccMesh::hasTriNormals(), CV_TYPES::IMAGE, ccObject::isA(), ccObject::isKindOf(), CV_TYPES::LABEL_2D, m_dbTreeWidget, CV_TYPES::MESH, CV_TYPES::POINT_CLOUD, CV_TYPES::POINT_OCTREE, CV_TYPES::SENSOR, cloudViewer::PointCloudTpl< T >::size(), ccMesh::size(), and MainWindow::TheInstance().
Referenced by ccDBRoot().
|
inline |
Get properties tree delegate.
Definition at line 93 of file ecvDBRoot.h.
References m_ccPropDelegate.
| ccHObject * ccDBRoot::getRootEntity | ( | ) |
Returns associated root object.
Definition at line 421 of file ecvDBRoot.cpp.
References m_treeRoot.
Referenced by MainWindow::addToDB(), and MainWindow::dbRootObject().
| size_t ccDBRoot::getSelectedEntities | ( | ccHObject::Container & | selectedEntities, |
| CV_CLASS_ENUM | filter = CV_TYPES::OBJECT, |
||
| dbTreeSelectionInfo * | info = nullptr |
||
| ) |
Returns selected entities in DB tree (optionally with a given type and additional information)
Definition at line 1273 of file ecvDBRoot.cpp.
References CV_TYPES::CAMERA_SENSOR, dbTreeSelectionInfo::cameraSensorCount, CV_TYPES::CIRCLE, dbTreeSelectionInfo::circleCount, dbTreeSelectionInfo::cloudCount, dbTreeSelectionInfo::colorCount, CV_TYPES::GBL_SENSOR, dbTreeSelectionInfo::gblSensorCount, ccGenericPointCloud::getOctree(), dbTreeSelectionInfo::gridCound, ccPointCloud::gridCount(), dbTreeSelectionInfo::groupCount, ccDrawableObject::hasColors(), ccDrawableObject::hasNormals(), ccDrawableObject::hasScalarFields(), CV_TYPES::HIERARCHY_OBJECT, ccObject::isA(), ccObject::isKindOf(), dbTreeSelectionInfo::kdTreeCount, m_dbTreeWidget, CV_TYPES::MESH, dbTreeSelectionInfo::meshCount, dbTreeSelectionInfo::normalsCount, dbTreeSelectionInfo::octreeCount, CV_TYPES::PLANE, dbTreeSelectionInfo::planeCount, CV_TYPES::POINT_CLOUD, CV_TYPES::POINT_KDTREE, CV_TYPES::POLY_LINE, dbTreeSelectionInfo::polylineCount, dbTreeSelectionInfo::reset(), dbTreeSelectionInfo::selCount, CV_TYPES::SENSOR, dbTreeSelectionInfo::sensorCount, dbTreeSelectionInfo::sfCount, ccHObjectCaster::ToGenericPointCloud(), and ccHObjectCaster::ToPointCloud().
| void ccDBRoot::hide | ( | ) |
Definition at line 388 of file ecvDBRoot.cpp.
References m_dbTreeWidget, and m_propertiesTreeWidget.
| void ccDBRoot::hidePropertiesView | ( | ) |
Hides properties view.
Definition at line 1210 of file ecvDBRoot.cpp.
References m_ccPropDelegate, m_propertiesModel, m_propertiesTreeWidget, and ccPropertiesTreeDelegate::unbind().
Referenced by deleteSelectedEntities(), removeElement(), removeElements(), toggleSelectedEntitiesProperty(), and updatePropertiesView().
| QModelIndex ccDBRoot::index | ( | ccHObject * | object | ) |
Definition at line 941 of file ecvDBRoot.cpp.
References m_treeRoot, and parent().
|
overridevirtual |
Definition at line 921 of file ecvDBRoot.cpp.
References m_treeRoot, and parent().
Referenced by addElement(), addEmptyGroup(), data(), deleteSelectedEntities(), expandElement(), expandOrCollapseHoveredBranch(), flags(), itemData(), parent(), removeElement(), removeElements(), selectEntities(), selectEntity(), setData(), showContextMenu(), unloadAll(), unselectEntity(), and updateCCObject().
|
overridevirtual |
Definition at line 1389 of file ecvDBRoot.cpp.
References ccObject::getUniqueID(), and index().
|
overridevirtual |
Definition at line 963 of file ecvDBRoot.cpp.
References ccHObject::getIndex(), ccHObject::getParent(), index(), and m_treeRoot.
Referenced by addEmptyGroup(), columnCount(), deleteSelectedEntities(), index(), removeElement(), removeElements(), rowCount(), and unloadAll().
|
slot |
Definition at line 1245 of file ecvDBRoot.cpp.
Referenced by ccDBRoot().
|
slot |
Definition at line 1250 of file ecvDBRoot.cpp.
Referenced by ccDBRoot(), and setData().
|
slot |
Definition at line 1216 of file ecvDBRoot.cpp.
References ccPropertiesTreeDelegate::getCurrentObject(), m_ccPropDelegate, m_propertiesTreeWidget, and showPropertiesView().
Referenced by setData().
| void ccDBRoot::removeElement | ( | ccHObject * | object | ) |
Removes an element from the DB tree.
Automatically calls prepareDisplayForRefresh on the object.
Definition at line 554 of file ecvDBRoot.cpp.
References dbIsEmpty(), ccHObject::getChildrenNumber(), hidePropertiesView(), index(), m_treeRoot, parent(), updatePropertiesView(), and CVLog::Warning().
Referenced by ccPointListPickingDlg::cancelAndExit(), ccPointListPickingDlg::clearLastLabel(), dropMimeData(), MainWindow::removeFromDB(), and MainWindow::removeObjectTemporarilyFromDBTree().
| void ccDBRoot::removeElements | ( | ccHObject::Container & | objects | ) |
Removes several elements at once from the DB tree.
Faster than multiple calls to removeElement. Automatically calls prepareDisplayForRefresh on the objects.
Definition at line 513 of file ecvDBRoot.cpp.
References dbIsEmpty(), ccHObject::getChildrenNumber(), hidePropertiesView(), index(), m_treeRoot, parent(), updatePropertiesView(), and CVLog::Warning().
Referenced by ccPointListPickingDlg::applyAndExit(), and ccPointListPickingDlg::cancelAndExit().
|
overridevirtual |
Definition at line 983 of file ecvDBRoot.cpp.
References ccHObject::getChildrenNumber(), m_treeRoot, and parent().
|
protectedslot |
Definition at line 1900 of file ecvDBRoot.cpp.
References ccSelectChildrenDlg::addType(), CV_TYPES::BOX, CV_TYPES::CAMERA_SENSOR, CV_TYPES::CONE, CV_TYPES::CUSTOM_H_OBJECT, CV_TYPES::CYLINDER, CV_TYPES::DISC, CV_TYPES::DISH, CV_TYPES::EXTRU, CV_TYPES::FACET, CV_TYPES::GBL_SENSOR, ccSelectChildrenDlg::getNameIsRegex(), ccSelectChildrenDlg::getNameMatchIsUsed(), ccSelectChildrenDlg::getSelectedName(), ccSelectChildrenDlg::getSelectedType(), ccSelectChildrenDlg::getStrictMatchState(), ccSelectChildrenDlg::getTypeIsUsed(), CV_TYPES::HIERARCHY_OBJECT, CV_TYPES::IMAGE, CV_TYPES::LABEL_2D, CV_TYPES::MESH, name, CV_TYPES::OBJECT, CV_TYPES::PLANE, CV_TYPES::POINT_CLOUD, CV_TYPES::POINT_KDTREE, CV_TYPES::POINT_OCTREE, CV_TYPES::POLY_LINE, CV_TYPES::PRIMITIVE, selectChildrenByTypeAndName(), CV_TYPES::SENSOR, CV_TYPES::SPHERE, CV_TYPES::SUB_MESH, MainWindow::TheInstance(), CV_TYPES::TORUS, type, CV_TYPES::VIEWPORT_2D_LABEL, and CV_TYPES::VIEWPORT_2D_OBJECT.
Referenced by ccDBRoot().
|
protected |
Selects objects by type and/or name.
Definition at line 1971 of file ecvDBRoot.cpp.
References ccHObject::filterChildren(), ccHObject::getChildrenNumber(), ccObject::getName(), m_contextMenuPos, m_dbTreeWidget, name, selectEntities(), type, and CVLog::Warning().
Referenced by selectByTypeAndName().
|
slot |
Selects multiple entities at once.
| entities | set of the entities to 'select' |
| incremental | whether to 'add' the input set to the selected entities set or to use it as replacement |
Definition at line 1132 of file ecvDBRoot.cpp.
References index(), ccObject::isA(), ccDrawableObject::isSelected(), CV_TYPES::LABEL_2D, and m_dbTreeWidget.
|
slot |
Selects multiple entities at once (shortcut to the other version)
| entIDs | list of the IDs of the entities to select |
Definition at line 1109 of file ecvDBRoot.cpp.
References find(), and CVLog::Warning().
Referenced by ecvFilterByLabelDlg::apply(), and selectChildrenByTypeAndName().
|
slot |
Selects a given entity.
If ctrl is pressed by the user at the same time, previous selection will be simply updated accordingly.
| obj | entity to select |
| forceAdditiveSelection | whether to force additive selection (just as if CTRL key is pressed) or not |
Definition at line 1054 of file ecvDBRoot.cpp.
References index(), ccObject::isA(), ccDrawableObject::isSelected(), CV_TYPES::LABEL_2D, m_dbTreeWidget, ccDrawableObject::setSelected(), and CVLog::Warning().
Referenced by cloudViewer::ModelViewerWidget::SelectObject(), and MainWindow::setSelectedInDB().
|
signal |
Referenced by changeSelection().
|
overridevirtual |
Definition at line 777 of file ecvDBRoot.cpp.
References context, ecvDisplayTools::getDataAxesGridProperties(), ccObject::getName(), ccHObject::getViewId(), ccHObject::hideBB(), ccGenericPrimitive::hideShowDrawings(), ccSensor::hideShowDrawings(), index(), ccObject::isA(), ccObject::isEnabled(), ccObject::isKindOf(), ccDrawableObject::isSelected(), ccDrawableObject::isVisible(), CV_TYPES::LABEL_2D, ccDrawableObject::nameShownIn3D(), CV_TYPES::POINT_KDTREE, CV_TYPES::POINT_OCTREE, CV_TYPES::PRIMITIVE, redrawCCObjectAndChildren(), reflectObjectPropChange(), MainWindow::refreshAll(), ecvDisplayTools::RemoveWidgets(), CV_TYPES::SENSOR, ccObject::setEnabled(), ccHObject::setForceRedrawRecursive(), ccObject::setName(), ccHObject::setRedrawFlagRecursive(), ecvDisplayTools::SetRedrawRecursive(), ccHObject::showBB(), MainWindow::TheInstance(), ecvDisplayTools::TheInstance(), ccHObjectCaster::To2DLabel(), ccHObjectCaster::To2DViewportLabel(), ccHObjectCaster::ToPrimitive(), ccHObjectCaster::ToSensor(), cc2DLabel::updateLabel(), cc2DViewportLabel::updateLabel(), updatePropertiesView(), ecvDisplayTools::UpdateScreen(), CV_TYPES::VIEWPORT_2D_LABEL, AxesGridProperties::visible, WIDGET_RECTANGLE_2D, and WIDGET_T2D.
| void ccDBRoot::show | ( | ) |
Definition at line 393 of file ecvDBRoot.cpp.
References m_dbTreeWidget, and m_propertiesTreeWidget.
|
protectedslot |
Definition at line 2284 of file ecvDBRoot.cpp.
References cc2DLabel::PickedPoint::cloud, CV_TYPES::FACET, ccHObject::filterChildren(), CV_TYPES::GBL_SENSOR, ccHObject::getChildrenNumber(), cc2DLabel::getPickedPoint(), ccDrawableObject::hasScalarFields(), CV_TYPES::HIERARCHY_OBJECT, CV_TYPES::IMAGE, index(), ccObject::isA(), ccObject::isKindOf(), ccObject::isLeaf(), CV_TYPES::LABEL_2D, m_addEmptyGroup, m_alignCameraWithEntity, m_alignCameraWithEntityReverse, m_collapseBranch, m_contextMenuPos, m_dbTreeWidget, m_deleteSelectedEntities, m_editLabelScalarValue, m_enableBubbleViewMode, m_expandBranch, m_exportImages, m_gatherInformation, m_selectByTypeAndName, m_sortChildrenAZ, m_sortChildrenType, m_sortChildrenZA, m_toggleSelectedEntities, m_toggleSelectedEntities3DName, m_toggleSelectedEntitiesColor, m_toggleSelectedEntitiesMat, m_toggleSelectedEntitiesNormals, m_toggleSelectedEntitiesSF, m_toggleSelectedEntitiesVisibility, CV_TYPES::MESH, CV_TYPES::PLANE, CV_TYPES::POINT_CLOUD, size, cc2DLabel::size(), and ccHObjectCaster::To2DLabel().
Referenced by ccDBRoot().
|
protected |
Shows properties view for a given element.
Definition at line 1201 of file ecvDBRoot.cpp.
References c_propViewLeftColumnWidth, ccPropertiesTreeDelegate::fillModel(), m_ccPropDelegate, and m_propertiesTreeWidget.
Referenced by reflectObjectPropChange(), and updatePropertiesView().
|
protectedslot |
Definition at line 1828 of file ecvDBRoot.cpp.
References SORT_A2Z, and sortSelectedEntitiesChildren().
Referenced by ccDBRoot().
|
protectedslot |
Definition at line 1832 of file ecvDBRoot.cpp.
References SORT_BY_TYPE, and sortSelectedEntitiesChildren().
Referenced by ccDBRoot().
|
protectedslot |
Definition at line 1830 of file ecvDBRoot.cpp.
References SORT_Z2A, and sortSelectedEntitiesChildren().
Referenced by ccDBRoot().
|
protected |
Sorts selected entities children.
Definition at line 1836 of file ecvDBRoot.cpp.
References ccHObject::getChild(), ccHObject::getChildrenNumber(), ccHObject::getClassID(), ccObject::getName(), m_dbTreeWidget, SORT_A2Z, SORT_BY_TYPE, SORT_Z2A, cloudViewer::utility::swap(), and ccHObject::swapChildren().
Referenced by sortChildrenAZ(), sortChildrenType(), and sortChildrenZA().
|
inlineoverridevirtual |
Definition at line 161 of file ecvDBRoot.h.
|
overridevirtual |
Definition at line 1338 of file ecvDBRoot.cpp.
|
inlineprotectedslot |
Definition at line 224 of file ecvDBRoot.h.
References TG_ENABLE, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
|
inlineprotectedslot |
Definition at line 242 of file ecvDBRoot.h.
References TG_3D_NAME, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
|
inlineprotectedslot |
Definition at line 230 of file ecvDBRoot.h.
References TG_COLOR, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
|
inlineprotectedslot |
Definition at line 239 of file ecvDBRoot.h.
References TG_MATERIAL, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
|
inlineprotectedslot |
Definition at line 233 of file ecvDBRoot.h.
References TG_NORMAL, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
|
protected |
Toggles a given property (enable state, visibility, normal, color, SF, etc.) on selected entities
Definition at line 2023 of file ecvDBRoot.cpp.
References hidePropertiesView(), ccObject::isEnabled(), m_dbTreeWidget, MainWindow::refreshAll(), ccObject::setEnabled(), ccHObject::setForceRedrawRecursive(), TG_3D_NAME, TG_COLOR, TG_ENABLE, TG_NORMAL, TG_SF, TG_VISIBLE, MainWindow::TheInstance(), ccDrawableObject::toggleColors(), ccDrawableObject::toggleNormals(), ccDrawableObject::toggleSF(), ccDrawableObject::toggleShowName(), ccDrawableObject::toggleVisibility(), and updatePropertiesView().
Referenced by toggleSelectedEntities(), toggleSelectedEntities3DName(), toggleSelectedEntitiesColor(), toggleSelectedEntitiesMat(), toggleSelectedEntitiesNormals(), toggleSelectedEntitiesSF(), and toggleSelectedEntitiesVisibility().
|
inlineprotectedslot |
Definition at line 236 of file ecvDBRoot.h.
References TG_SF, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
|
inlineprotectedslot |
Definition at line 227 of file ecvDBRoot.h.
References TG_VISIBLE, and toggleSelectedEntitiesProperty().
Referenced by ccDBRoot().
| void ccDBRoot::unloadAll | ( | ) |
Unloads all entities.
Definition at line 398 of file ecvDBRoot.cpp.
References dbIsEmpty(), ccHObject::getChild(), ccHObject::getChildrenNumber(), index(), m_treeRoot, parent(), MainWindow::refreshAll(), ccHObject::removeChild(), ecvDisplayTools::SetRemoveAllFlag(), MainWindow::TheInstance(), and updatePropertiesView().
Referenced by MainWindow::~MainWindow().
| void ccDBRoot::unselectAllEntities | ( | ) |
| void ccDBRoot::unselectEntity | ( | ccHObject * | obj | ) |
Unselects a given entity.
Definition at line 1035 of file ecvDBRoot.cpp.
References index(), ccDrawableObject::isSelected(), and m_dbTreeWidget.
Referenced by cloudViewer::ModelViewerWidget::SelectObject(), and MainWindow::setSelectedInDB().
|
slot |
| void ccDBRoot::updatePropertiesView | ( | ) |
Updates properties view.
Definition at line 1225 of file ecvDBRoot.cpp.
References hidePropertiesView(), m_dbTreeWidget, and showPropertiesView().
Referenced by changeSelection(), deleteSelectedEntities(), removeElement(), removeElements(), setData(), toggleSelectedEntitiesProperty(), unloadAll(), and MainWindow::updatePropertiesView().
|
protected |
Context menu action: add empty group.
Definition at line 329 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: use 3-points labels or planes to orient camera.
Definition at line 331 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: reverse of m_alignCameraWithEntity.
Definition at line 333 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Selected entity's properties delegate.
Definition at line 294 of file ecvDBRoot.h.
Referenced by getPropertiesDelegate(), hidePropertiesView(), reflectObjectPropChange(), showPropertiesView(), and ~ccDBRoot().
|
protected |
Context menu action: collapse tree branch.
Definition at line 299 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Last context menu pos.
Definition at line 340 of file ecvDBRoot.h.
Referenced by addEmptyGroup(), expandOrCollapseHoveredBranch(), selectChildrenByTypeAndName(), and showContextMenu().
|
protected |
Associated widget for DB tree.
Definition at line 286 of file ecvDBRoot.h.
Referenced by addElement(), addEmptyGroup(), alignCameraWithEntity(), countSelectedEntities(), deleteSelectedEntities(), editLabelScalarValue(), enableBubbleViewMode(), expandElement(), expandOrCollapseHoveredBranch(), exportImages(), gatherRecursiveInformation(), getSelectedEntities(), hide(), selectChildrenByTypeAndName(), selectEntities(), selectEntity(), show(), showContextMenu(), sortSelectedEntitiesChildren(), toggleSelectedEntitiesProperty(), unselectAllEntities(), unselectEntity(), and updatePropertiesView().
|
protected |
Context menu action: delete selected entities.
Definition at line 313 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: change current scalar value (via a 2D label)
Definition at line 337 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: enable bubble-view (on a sensor)
Definition at line 335 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: expand tree branch.
Definition at line 297 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: export images.
Definition at line 311 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: gather (recursive) information on selected entities.
Definition at line 301 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Selected entity's properties data model.
Definition at line 292 of file ecvDBRoot.h.
Referenced by hidePropertiesView(), and ~ccDBRoot().
|
protected |
Associated widget for selected entity's properties tree.
Definition at line 289 of file ecvDBRoot.h.
Referenced by hide(), hidePropertiesView(), reflectObjectPropChange(), show(), and showPropertiesView().
|
protected |
Context menu action: select object by type and/or by name.
Definition at line 309 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: sort children in alphabetical order.
Definition at line 303 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: sort children by type.
Definition at line 307 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: sort children in reverse alphabetical order.
Definition at line 305 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: enabled/disable selected entities.
Definition at line 315 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: hide/show selected entities 3D name.
Definition at line 327 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: hide/show selected entities color.
Definition at line 319 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: hide/show selected entities materials/textures.
Definition at line 323 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: hide/show selected entities normals.
Definition at line 321 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: hide/show selected entities SF.
Definition at line 325 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Context menu action: hide/show selected entities.
Definition at line 317 of file ecvDBRoot.h.
Referenced by showContextMenu().
|
protected |
Associated DB root.
Definition at line 283 of file ecvDBRoot.h.
Referenced by addElement(), deleteSelectedEntities(), dropMimeData(), find(), getRootEntity(), index(), parent(), removeElement(), removeElements(), rowCount(), unloadAll(), and ~ccDBRoot().