Version: 9.12.0
GEOMGUI_TextTreeWdg Class Reference

Tree view contains Dimension and Annotation text items: More...

#include <GEOMGUI_TextTreeWdg.h>

Inheritance diagram for GEOMGUI_TextTreeWdg:
Inheritance graph

Classes

class  VisualProperty
 Common interface for working with shape dimension and annotation properties of object in a unified way irrespectively of the implementation. More...
 

Public Types

enum  BranchType { DimensionShape , AnnotationShape }
 

Public Slots

void updateTree ()
 
void updateBranches (const QString &theEntry)
 
void updateDimensionBranch (const QString &theEntry)
 
void updateAnnotationBranch (const QString &theEntry)
 
void updateObjectName (const QString &theEntry)
 

Public Member Functions

 GEOMGUI_TextTreeWdg (SalomeApp_Application *app)
 
 ~GEOMGUI_TextTreeWdg ()
 
int getWinID ()
 
void removeBranch (const BranchType &theBranchType, const QString &theEntry, bool force=true)
 
int idFromItem (QTreeWidgetItem *theItem)
 
QString entryFromItem (QTreeWidgetItem *theShapeItem) const
 
QTreeWidgetItemitemFromEntry (const BranchType &theBranchType, QString theEntry)
 
void setAllShapeItemsVisibility (const BranchType &theBranchType, const QString &theEntry, const bool theVisibility)
 
void setShapeItemVisibility (const BranchType &theBranchType, const QString &theEntry, QTreeWidgetItem *theWidgetItem, const bool theVisibility)
 
void updateVisibility ()
 
void getSelected (QMap< QString, QList< int > > &theAnnotations)
 
void setSelected (const QMap< QString, QList< int > > &theAnnotations)
 
QList< QString > getAllEntries (const BranchType &theBranchType)
 
QString getSingleSelectedObject ()
 

Protected Member Functions

void createActions ()
 
void redisplay (QString theEntry)
 

Private Slots

void onUpdateVisibilityColumn (QString theEntry, Qtx::VisibilityState theState)
 
void onItemClicked (QTreeWidgetItem *, int)
 
void setVisibility (QTreeWidgetItem *theItem, bool visibility)
 
void showContextMenu (const QPoint &pos)
 

Private Member Functions

bool setShapeItemVisibility (QSharedPointer< VisualProperty > &theProps, QTreeWidgetItem *theWidgetItem, const bool theVisibility)
 
QSharedPointer< VisualPropertygetVisualProperty (const BranchType &theBranchType, SalomeApp_Study *theStudy, const std::string &theEntry)
 
void fillBranch (const BranchType &theBranchType, const QString &theEntry)
 
void updateVisibilityColumn (const BranchType &theBranchType, QString theEntry, Qtx::VisibilityState theState)
 
QTreeWidgetItemgetPropertyRootItem (const BranchType &theBranchType)
 
QHash< QString, QTreeWidgetItem * > & getObjects (const BranchType &theBranchType)
 
BranchType branchTypeFromItem (QTreeWidgetItem *theItem)
 

Private Attributes

int myWindowID
 
QIcon myVisibleIcon
 
QIcon myInvisibleIcon
 
QHash< QString, QTreeWidgetItem * > myDimensionObjects
 
QHash< QString, QTreeWidgetItem * > myAnnotationObjects
 
SalomeApp_Study * myStudy
 
QTreeWidgetItemmyDimensionsItem
 
QTreeWidgetItemmyAnnotationsItem
 
GEOM_Displayer myDisplayer
 
QMap< int, QAction * > myActions
 menu actions list More...
 

Detailed Description

  • text visibility in OCC viewer
  • text object name

Member Enumeration Documentation

◆ BranchType

Enumerator
DimensionShape 
AnnotationShape 

Constructor & Destructor Documentation

◆ GEOMGUI_TextTreeWdg()

◆ ~GEOMGUI_TextTreeWdg()

GEOMGUI_TextTreeWdg::~GEOMGUI_TextTreeWdg ( )

Member Function Documentation

◆ branchTypeFromItem()

GEOMGUI_TextTreeWdg::BranchType GEOMGUI_TextTreeWdg::branchTypeFromItem ( QTreeWidgetItem theItem)
private

◆ createActions()

void GEOMGUI_TextTreeWdg::createActions ( )
protected

◆ entryFromItem()

QString GEOMGUI_TextTreeWdg::entryFromItem ( QTreeWidgetItem theShapeItem) const

◆ fillBranch()

void GEOMGUI_TextTreeWdg::fillBranch ( const BranchType theBranchType,
const QString &  theEntry 
)
private

◆ getAllEntries()

QList< QString > GEOMGUI_TextTreeWdg::getAllEntries ( const BranchType theBranchType)

References getObjects().

◆ getObjects()

QHash< QString, QTreeWidgetItem * > & GEOMGUI_TextTreeWdg::getObjects ( const BranchType theBranchType)
private

◆ getPropertyRootItem()

QTreeWidgetItem * GEOMGUI_TextTreeWdg::getPropertyRootItem ( const BranchType theBranchType)
private

◆ getSelected()

void GEOMGUI_TextTreeWdg::getSelected ( QMap< QString, QList< int > > &  theAnnotations)

References entryFromItem(), and idFromItem().

◆ getSingleSelectedObject()

QString GEOMGUI_TextTreeWdg::getSingleSelectedObject ( )

References AnnotationShape, and getObjects().

◆ getVisualProperty()

QSharedPointer< GEOMGUI_TextTreeWdg::VisualProperty > GEOMGUI_TextTreeWdg::getVisualProperty ( const BranchType theBranchType,
SalomeApp_Study *  theStudy,
const std::string &  theEntry 
)
private

References AnnotationShape, and DimensionShape.

◆ getWinID()

int GEOMGUI_TextTreeWdg::getWinID ( )
inline

◆ idFromItem()

int GEOMGUI_TextTreeWdg::idFromItem ( QTreeWidgetItem theItem)

◆ itemFromEntry()

QTreeWidgetItem * GEOMGUI_TextTreeWdg::itemFromEntry ( const BranchType theBranchType,
QString  theEntry 
)

References getObjects().

◆ onItemClicked

◆ onUpdateVisibilityColumn

void GEOMGUI_TextTreeWdg::onUpdateVisibilityColumn ( QString  theEntry,
Qtx::VisibilityState  theState 
)
privateslot

◆ redisplay()

void GEOMGUI_TextTreeWdg::redisplay ( QString  theEntry)
protected

◆ removeBranch()

void GEOMGUI_TextTreeWdg::removeBranch ( const BranchType theBranchType,
const QString &  theEntry,
bool  force = true 
)

◆ setAllShapeItemsVisibility()

void GEOMGUI_TextTreeWdg::setAllShapeItemsVisibility ( const BranchType theBranchType,
const QString &  theEntry,
const bool  theVisibility 
)

◆ setSelected()

void GEOMGUI_TextTreeWdg::setSelected ( const QMap< QString, QList< int > > &  theAnnotations)

◆ setShapeItemVisibility() [1/2]

void GEOMGUI_TextTreeWdg::setShapeItemVisibility ( const BranchType theBranchType,
const QString &  theEntry,
QTreeWidgetItem theWidgetItem,
const bool  theVisibility 
)

◆ setShapeItemVisibility() [2/2]

bool GEOMGUI_TextTreeWdg::setShapeItemVisibility ( QSharedPointer< VisualProperty > &  theProps,
QTreeWidgetItem theWidgetItem,
const bool  theVisibility 
)
private

◆ setVisibility

void GEOMGUI_TextTreeWdg::setVisibility ( QTreeWidgetItem theItem,
bool  visibility 
)
privateslot

◆ showContextMenu

◆ updateAnnotationBranch

void GEOMGUI_TextTreeWdg::updateAnnotationBranch ( const QString &  theEntry)
slot

References AnnotationShape, and fillBranch().

◆ updateBranches

void GEOMGUI_TextTreeWdg::updateBranches ( const QString &  theEntry)
slot

◆ updateDimensionBranch

void GEOMGUI_TextTreeWdg::updateDimensionBranch ( const QString &  theEntry)
slot

References DimensionShape, and fillBranch().

◆ updateObjectName

void GEOMGUI_TextTreeWdg::updateObjectName ( const QString &  theEntry)
slot

◆ updateTree

void GEOMGUI_TextTreeWdg::updateTree ( )
slot

◆ updateVisibility()

void GEOMGUI_TextTreeWdg::updateVisibility ( )

◆ updateVisibilityColumn()

void GEOMGUI_TextTreeWdg::updateVisibilityColumn ( const BranchType theBranchType,
QString  theEntry,
Qtx::VisibilityState  theState 
)
private

Member Data Documentation

◆ myActions

QMap<int, QAction*> GEOMGUI_TextTreeWdg::myActions
private

◆ myAnnotationObjects

QHash<QString, QTreeWidgetItem*> GEOMGUI_TextTreeWdg::myAnnotationObjects
private

◆ myAnnotationsItem

QTreeWidgetItem* GEOMGUI_TextTreeWdg::myAnnotationsItem
private

◆ myDimensionObjects

QHash<QString, QTreeWidgetItem*> GEOMGUI_TextTreeWdg::myDimensionObjects
private

◆ myDimensionsItem

QTreeWidgetItem* GEOMGUI_TextTreeWdg::myDimensionsItem
private

◆ myDisplayer

GEOM_Displayer GEOMGUI_TextTreeWdg::myDisplayer
private

◆ myInvisibleIcon

QIcon GEOMGUI_TextTreeWdg::myInvisibleIcon
private

◆ myStudy

SalomeApp_Study* GEOMGUI_TextTreeWdg::myStudy
private

◆ myVisibleIcon

QIcon GEOMGUI_TextTreeWdg::myVisibleIcon
private

◆ myWindowID

int GEOMGUI_TextTreeWdg::myWindowID
private

The documentation for this class was generated from the following files: