Root data object for the CORBA-based SALOME application. More...
#include <SalomeApp_DataObject.h>

Public Types | |
| enum | { ValueId = EntryId + 1, IORId, RefEntryId } |
Column id. More... | |
| enum | { EntryId = VisibilityId + 1 } |
Column id. More... | |
| enum | ColorRole { Text, Base, Foreground, Background, Highlight, HighlightedText } |
Color role. More... | |
| enum | { NameId, VisibilityId } |
Column id. More... | |
Public Member Functions | |
| SalomeApp_RootObject (LightApp_Study *) | |
| Constructor. | |
| virtual | ~SalomeApp_RootObject () |
| Destructor. | |
| QString | name () const |
| Get data object name. | |
| QString | entry () const |
| Get object string identifier. | |
| QString | text (const int=NameId) const |
| Get object text data for the specified column. | |
| QPixmap | icon (const int=NameId) const |
| Get data object icon for the specified column. | |
| QColor | color (const ColorRole, const int=NameId) const |
| Get data object color for the specified column. | |
| QString | toolTip (const int=NameId) const |
| Get data object tooltip for the specified column. | |
| void | setToSynchronize (bool value) |
| bool | toSynchronize () const |
| virtual QFont | font (const int=NameId) const |
| Get font to be used for data object rendering in the item views. | |
| virtual | _PTR (SObject) object() const |
| _PTR (SObject) referencedObject() const | |
| bool | isReference () const |
| Check if the data object is a reference. | |
| bool | hasChildren () const |
| Check if object has children. | |
| bool | expandable () const |
| Check if the object is expandable (e.g. in the data tree view) | |
| virtual bool | isVisible () const |
| Check if the object is visible. | |
| virtual QString | componentDataType () const |
| Get component type. | |
| virtual bool | customSorting (const int=NameId) const |
| Check if the specified column supports custom sorting. | |
| virtual bool | compare (const QVariant &, const QVariant &, const int=NameId) const |
| Compares data from two items for sorting purposes. | |
| virtual void | insertChildAtTag (SalomeApp_DataObject *, int) |
| virtual void | updateItem () |
| virtual SUIT_DataObjectKey * | key () const |
| Get the data object unique key. | |
| virtual SUIT_DataObject * | componentObject () const |
| Get the component object. | |
| virtual int | groupId () const |
| virtual QVariant | customData (Qtx::CustomDataType type) |
| return custom data for data object | |
| virtual bool | renameAllowed (const int=NameId) const |
| Check if this object is can't be renamed in place. | |
| virtual bool | setName (const QString &) |
| Set name of the this object. | |
| CAM_Module * | module () const |
| Get CAM module. | |
| virtual CAM_DataModel * | dataModel () const |
| Get CAM data model. | |
| SUIT_DataObject * | root () const |
| Get the root object. | |
| SUIT_DataObject * | lastChild () const |
| Get the last child object. | |
| SUIT_DataObject * | firstChild () const |
| Get the first child object. | |
| int | childCount () const |
| Get the number of the child objects. | |
| int | childPos (const SUIT_DataObject *) const |
| Get the index of the specified object in the child list. | |
| SUIT_DataObject * | childObject (const int) const |
| Get child object by the specified index. | |
| int | level () const |
| Get the object level in the tree structure. | |
| int | position () const |
| Get the position of the data object in its parent's children list. | |
| SUIT_DataObject * | nextBrother () const |
| Get the next sibling data object in the children list. | |
| SUIT_DataObject * | prevBrother () const |
| Get the previous sibling data object in the children list. | |
| bool | autoDeleteChildren () const |
| Get "auto-delete children" flag. | |
| virtual void | setAutoDeleteChildren (const bool) |
| Set "auto-delete children" flag. | |
| virtual void | children (DataObjectList &, const bool=false) const |
| Get all children. | |
| virtual DataObjectList | children (const bool=false) |
| Get all children. . | |
| void | appendChild (SUIT_DataObject *) |
| Add new child object to the end of the children list. | |
| virtual void | insertChild (SUIT_DataObject *, int) |
| Insert new child object to the list of the children. | |
| virtual void | removeChild (SUIT_DataObject *, const bool=false) |
| Remove the specified child object reference. | |
| bool | replaceChild (SUIT_DataObject *, SUIT_DataObject *, const bool=false) |
| Replace the specified child object by another object. | |
| void | reparentChildren (const SUIT_DataObject *) |
| Change the parent for all children from specified object to this one. | |
| virtual SUIT_DataObject * | parent () const |
| Get the parent object. | |
| virtual void | setParent (SUIT_DataObject *) |
| Change the parent object. | |
| virtual void | assignParent (SUIT_DataObject *) |
| void | insertChildAtPos (SUIT_DataObject *obj, int position) |
| Insert new child object into the list of the children (faster version of insertChild without signal). | |
| bool | modified () |
| void | setModified (bool modified) |
| virtual QString | statusTip (const int=NameId) const |
| Get data object status tip for the specified column. | |
| virtual QString | whatsThis (const int=NameId) const |
| Get data object "what's this" information for the specified column. | |
| virtual int | alignment (const int=NameId) const |
| Get data object text alignment for the specified column. | |
| virtual bool | isDragable () const |
| Check if the object is draggable. | |
| virtual bool | isDropAccepted (SUIT_DataObject *obj) |
| Check if the drop operation fo this object is possible. | |
| virtual bool | isEnabled () const |
| Check if this object is enabled. | |
| virtual bool | isSelectable () const |
| Check if this object is selectable. | |
| virtual bool | isCheckable (const int=NameId) const |
| Check if this object is checkable for the specified column. | |
| virtual bool | isOn (const int=NameId) const |
| Get the checked state of the object (if it is checkable) for the specified column. | |
| virtual void | setOn (const bool, const int=NameId) |
| Set the checked state of the object (if it is checkable) for the specified column. | |
| virtual bool | isOpen () const |
| Get the "opened" state of the object. | |
| virtual void | setOpen (const bool) |
| Set the "opened" state of the object. | |
| virtual void | update () |
| Updates necessary internal fields of data object. | |
| void | deleteLater () |
| Schedule this object for the late deleting. | |
| void | dump (const int indent=2) const |
| Dump the object tree recursively to the standard output. | |
| void | setStudy (LightApp_Study *) |
| LightApp_Study * | study () const |
Static Public Member Functions | |
| static Signal * | signal () |
| Get global signal handler. | |
| static bool | connect (const char *, QObject *, const char *) |
| Connect to the signal handlerx. | |
| static bool | disconnect (const char *, QObject *, const char *) |
| Disconnect from the signal handler. | |
Protected Attributes | |
| bool | _toSynchronize |
| QString | myCompDataType |
| SUIT_DataObject * | myCompObject |
Friends | |
| class | SUIT_DataObject::Signal |
This class is to be instanciated by only one object - the root object of the SalomeApp data object tree. This object is not shown in the object browser. The goal of this class is to provide a unified access to SalomeApp_Study object from SalomeApp_DataObject instances.
anonymous enum [inherited] |
enum SUIT_DataObject::ColorRole [inherited] |
| SalomeApp_RootObject::SalomeApp_RootObject | ( | LightApp_Study * | study | ) |
| study | pointer to the study |
| SalomeApp_RootObject::~SalomeApp_RootObject | ( | ) | [virtual] |
| QString SalomeApp_RootObject::name | ( | ) | const [virtual] |
Reimplemented from SalomeApp_DataObject.
| QString SalomeApp_RootObject::entry | ( | ) | const [virtual] |
Reimplemented from SalomeApp_DataObject.
| QString SalomeApp_RootObject::text | ( | const int | id = NameId | ) | const [virtual] |
| QPixmap SalomeApp_RootObject::icon | ( | const int | id = NameId | ) | const [virtual] |
| id | column id |
Reimplemented from SalomeApp_DataObject.
| QColor SalomeApp_RootObject::color | ( | const ColorRole | role, |
| const int | id = NameId |
||
| ) | const [virtual] |
| role | color role |
| id | column id (not used) |
Reimplemented from SalomeApp_DataObject.
| QString SalomeApp_RootObject::toolTip | ( | const int | id = NameId | ) | const [virtual] |
| id | column id (not used) |
Reimplemented from SalomeApp_DataObject.
| void SalomeApp_RootObject.setToSynchronize | ( | bool | value | ) |
| bool SalomeApp_RootObject.toSynchronize | ( | ) | const |
| QFont SalomeApp_DataObject::font | ( | const int | id = NameId | ) | const [virtual, inherited] |
| id | column id |
Reimplemented from SUIT_DataObject.
References SalomeApp_DataObject.expandable(), SalomeApp_DataObject.hasChildren(), and SUIT_DataObject.NameId.
| virtual SalomeApp_DataObject._PTR | ( | SObject | ) | const [virtual, inherited] |
| SalomeApp_DataObject._PTR | ( | SObject | ) | const [inherited] |
| bool SalomeApp_DataObject::isReference | ( | ) | const [inherited] |
true if this data object actually refers to another one References SalomeApp_DataObject._PTR().
| bool SalomeApp_DataObject::hasChildren | ( | ) | const [inherited] |
true if object has at least one child sub-object and false otherwise References SalomeApp_DataObject._PTR(), and PyInterp.obj.
| bool SalomeApp_DataObject::expandable | ( | ) | const [virtual, inherited] |
true if object is expandable and false otherwise Reimplemented from SUIT_DataObject.
References SalomeApp_DataObject._PTR().
| bool SalomeApp_DataObject::isVisible | ( | ) | const [virtual, inherited] |
true if this object is displayable or false otherwise Reimplemented from LightApp_DataObject.
References SalomeApp_DataObject._PTR(), SalomeApp_DataObject.isReference(), and SalomeApp_DataObject.name().
| QString SalomeApp_DataObject::componentDataType | ( | ) | const [virtual, inherited] |
Reimplemented from LightApp_DataObject.
References SalomeApp_DataObject._PTR(), LightApp_DataObject.componentObject(), and LightApp_DataObject.myCompDataType.
| bool SalomeApp_DataObject::customSorting | ( | const int | id = NameId | ) | const [virtual, inherited] |
| id | column id |
true if column sorting should be customized Reimplemented from LightApp_DataObject.
References LightApp_DataObject.EntryId, and SalomeApp_DataObject.RefEntryId.
| bool SalomeApp_DataObject::compare | ( | const QVariant & | left, |
| const QVariant & | right, | ||
| const int | id = NameId |
||
| ) | const [virtual, inherited] |
This method is called only for those columns for which customSorting() method returns true.
| left | first data to compare |
| right | second data to compare |
| id | column id |
Reimplemented from LightApp_DataObject.
References LightApp_DataObject.EntryId, and SalomeApp_DataObject.RefEntryId.
| void SalomeApp_DataObject::insertChildAtTag | ( | SalomeApp_DataObject * | obj, |
| int | tag | ||
| ) | [virtual, inherited] |
| void SalomeApp_DataObject::updateItem | ( | ) | [virtual, inherited] |
References SUIT_DataObject.modified(), and SUIT_DataObject.setModified().
| SUIT_DataObjectKey * LightApp_DataObject::key | ( | ) | const [virtual, inherited] |
| SUIT_DataObject * LightApp_DataObject::componentObject | ( | ) | const [virtual, inherited] |
References LightApp_DataObject.myCompObject, SUIT_DataObject.parent(), and SUIT_DataObject.root().
| int LightApp_DataObject::groupId | ( | ) | const [virtual, inherited] |
Reimplemented from SUIT_DataObject.
References CAM_DataObject.dataModel(), and LightApp_DataModel.groupId().
| QVariant LightApp_DataObject::customData | ( | Qtx::CustomDataType | type | ) | [virtual, inherited] |
Reimplemented from SUIT_DataObject.
References LightApp_DataObject.EntryId, and Qtx.IdType.
| bool LightApp_DataObject::renameAllowed | ( | const int | id = NameId | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns false (all objects can not be renamed).
| id | column id |
true if the item can be renamed by the user in place (e.g. in the Object browser) Reimplemented from SUIT_DataObject.
References SUIT_Study.application(), LightApp_DataObject.entry(), CAM_DataObject.module(), SUIT_DataObject.NameId, LightApp_Application.renameAllowed(), LightApp_Module.renameAllowed(), SUIT_DataObject.root(), and LightApp_RootObject.study().
| bool LightApp_DataObject::setName | ( | const QString & | name | ) | [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns false.
true if rename operation finished successfully, false otherwise. Reimplemented from SUIT_DataObject.
Reimplemented in SALOME_PYQT_DataObjectLight.
References SUIT_Study.application(), LightApp_DataObject.entry(), CAM_DataObject.module(), LightApp_Application.renameObject(), LightApp_Module.renameObject(), SUIT_DataObject.root(), and LightApp_RootObject.study().
| CAM_Module * CAM_DataObject::module | ( | ) | const [inherited] |
References CAM_DataObject.dataModel(), and CAM_DataModel.module().
| CAM_DataModel * CAM_DataObject::dataModel | ( | ) | const [virtual, inherited] |
Reimplemented in CAM_ModuleObject.
References CAM_DataObject.dataModel(), and SUIT_DataObject.parent().
| SUIT_DataObject * SUIT_DataObject::root | ( | ) | const [inherited] |
References SUIT_DataObject.parent(), and SUIT_DataObject.root().
| SUIT_DataObject * SUIT_DataObject::lastChild | ( | ) | const [inherited] |
References SUIT_DataObject.myChildren.
| SUIT_DataObject * SUIT_DataObject::firstChild | ( | ) | const [inherited] |
References SUIT_DataObject.myChildren.
| int SUIT_DataObject::childCount | ( | ) | const [inherited] |
References SUIT_DataObject.myChildren.
| int SUIT_DataObject::childPos | ( | const SUIT_DataObject * | obj | ) | const [inherited] |
| obj | child object |
References SUIT_DataObject.myChildren.
| SUIT_DataObject * SUIT_DataObject::childObject | ( | const int | idx | ) | const [inherited] |
| idx | child object index |
References SUIT_DataObject.myChildren.
| int SUIT_DataObject::level | ( | ) | const [inherited] |
| int SUIT_DataObject::position | ( | ) | const [inherited] |
References SUIT_DataObject.childPos(), and SUIT_DataObject.myParent.
| SUIT_DataObject * SUIT_DataObject::nextBrother | ( | ) | const [inherited] |
References SUIT_DataObject.childObject(), SUIT_DataObject.childPos(), and SUIT_DataObject.myParent.
| SUIT_DataObject * SUIT_DataObject::prevBrother | ( | ) | const [inherited] |
References SUIT_DataObject.childObject(), SUIT_DataObject.childPos(), and SUIT_DataObject.myParent.
| bool SUIT_DataObject::autoDeleteChildren | ( | ) | const [inherited] |
true if the object should delete all its children on destroying References SUIT_DataObject.myAutoDel.
| void SUIT_DataObject::setAutoDeleteChildren | ( | const bool | on | ) | [virtual, inherited] |
If this flag is on (default), the object will delete all its children on destroying.
| on | new flag value |
References SUIT_DataObject.myAutoDel.
| void SUIT_DataObject::children | ( | DataObjectList & | lst, |
| const bool | rec = false |
||
| ) | const [virtual, inherited] |
If parameter rec is true then function collects all the children recursively.
| lst | returning list of children |
| rec | if true collect all children recursively |
References SUIT_DataObject.myChildren.
| DataObjectList SUIT_DataObject::children | ( | const bool | rec = false | ) | [virtual, inherited] |
If parameter rec is true then function collects all the children recursively.
| rec | if true collect all children recursively |
References SUIT_DataObject.children().
| void SUIT_DataObject::appendChild | ( | SUIT_DataObject * | obj | ) | [inherited] |
| obj | child object being added |
References SUIT_DataObject.insertChild(), and SUIT_DataObject.myChildren.
| void SUIT_DataObject::insertChild | ( | SUIT_DataObject * | obj, |
| int | position | ||
| ) | [virtual, inherited] |
| obj | child object being added |
| position | child position |
Reimplemented in LightApp_ModuleObject.
References SUIT_DataObject.Signal.emitInserted(), SUIT_DataObject.myChildren, SUIT_DataObject.position(), SUIT_DataObject.setParent(), and SUIT_DataObject.signal().
| void SUIT_DataObject::removeChild | ( | SUIT_DataObject * | obj, |
| const bool | del = false |
||
| ) | [virtual, inherited] |
| obj | child object being removed |
| del | if true, the child object is destroyed |
References SUIT_DataObject.deleteLater(), SUIT_DataObject.Signal.emitRemoved(), SUIT_DataObject.myChildren, SUIT_DataObject.setParent(), and SUIT_DataObject.signal().
| bool SUIT_DataObject::replaceChild | ( | SUIT_DataObject * | src, |
| SUIT_DataObject * | trg, | ||
| const bool | del = false |
||
| ) | [inherited] |
| src | child object being replaced |
| trg | new child object |
| del | if true, the previous object is destroyed |
true if the object has been replaced References SUIT_DataObject.childPos(), SUIT_DataObject.deleteLater(), SUIT_DataObject.insertChild(), and SUIT_DataObject.removeChild().
| void SUIT_DataObject::reparentChildren | ( | const SUIT_DataObject * | obj | ) | [inherited] |
| obj | object which children to be reparented |
References SUIT_DataObject.children().
| SUIT_DataObject * SUIT_DataObject::parent | ( | ) | const [virtual, inherited] |
References SUIT_DataObject.myParent.
| void SUIT_DataObject::setParent | ( | SUIT_DataObject * | p | ) | [virtual, inherited] |
| p | new parent object |
References SUIT_DataObject.appendChild(), SUIT_DataObject.myParent, SUIT_DataObject.parent(), and SUIT_DataObject.removeChild().
| void SUIT_DataObject::assignParent | ( | SUIT_DataObject * | p | ) | [virtual, inherited] |
References SUIT_DataObject.myParent.
| void SUIT_DataObject::insertChildAtPos | ( | SUIT_DataObject * | obj, |
| int | position | ||
| ) | [inherited] |
| obj | child object being added |
| position | child position |
References SUIT_DataObject.assignParent(), SUIT_DataObject.myChildren, and SUIT_DataObject.position().
| bool SUIT_DataObject.modified | ( | ) | [inherited] |
| void SUIT_DataObject.setModified | ( | bool | modified | ) | [inherited] |
| QString SUIT_DataObject::statusTip | ( | const int | = NameId | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns null string.
The parameter id specifies the column identificator
| id | column id |
| QString SUIT_DataObject::whatsThis | ( | const int | = NameId | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns null string.
The parameter id specifies the column identificator
| id | column id |
| int SUIT_DataObject::alignment | ( | const int | = NameId | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns default alignment which is Qt:AlignLeft.
The parameter id specifies the column identificator (to display, for example, in the tree view widget).
| id | column id |
| bool SUIT_DataObject::isDragable | ( | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns false (all objects could not be dragged).
true if it is possible to drag this object | bool SUIT_DataObject::isDropAccepted | ( | SUIT_DataObject * | obj | ) | [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns false (drop operation is not allowed).
| obj | object being dropped |
true if it is possible to drop an object obj to this object | bool SUIT_DataObject::isEnabled | ( | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns true (all objects are enabled).
true if the user can interact with the item | bool SUIT_DataObject::isSelectable | ( | ) | const [virtual, inherited] |
This method can be re-implemented in the subclasses. Default implementation returns true (all objects are selectable).
true if the item can be selected | bool SUIT_DataObject::isCheckable | ( | const int | = NameId | ) | const [virtual, inherited] |
| bool SUIT_DataObject::isOn | ( | const int | id = NameId | ) | const [virtual, inherited] |
Default implementation supports the checked state for the first ("Name") column only.
| id | column id |
References SUIT_DataObject.myCheck, and SUIT_DataObject.NameId.
| void SUIT_DataObject::setOn | ( | const bool | on, |
| const int | id = NameId |
||
| ) | [virtual, inherited] |
Default implementation supports the checked state for the first ("Name") column only.
| on | new checked state of the object for the specified column |
| id | column id |
References SUIT_DataObject.myCheck, and SUIT_DataObject.NameId.
| bool SUIT_DataObject::isOpen | ( | ) | const [virtual, inherited] |
| void SUIT_DataObject::setOpen | ( | const bool | on | ) | [virtual, inherited] |
| void SUIT_DataObject::update | ( | ) | [virtual, inherited] |
| SUIT_DataObject::Signal * SUIT_DataObject::signal | ( | ) | [static, inherited] |
References SUIT_DataObject.mySignal.
| bool SUIT_DataObject::connect | ( | const char * | sig, |
| QObject * | reciever, | ||
| const char * | slot | ||
| ) | [static, inherited] |
| sig | signal name |
| reciever | signal receiver object |
| slot | slot name |
true if connection is successfull References SUIT_DataObject.signal().
| bool SUIT_DataObject::disconnect | ( | const char * | sig, |
| QObject * | reciever, | ||
| const char * | slot | ||
| ) | [static, inherited] |
| sig | signal name |
| reciever | signal receiver object |
| slot | slot name |
true if disconnection is successfull References SUIT_DataObject.signal().
| void SUIT_DataObject::deleteLater | ( | ) | [inherited] |
The object will be deleted when control returns to the event loop. Note that entering and leaving a new event loop (e.g., by opening a modal dialog) will not perform the deferred deletion; for the object to be deleted, the control must return to the event loop from which deleteLater() was called.
References SUIT_DataObject.Signal.deleteLater(), SUIT_DataObject.parent(), SUIT_DataObject.removeChild(), and SUIT_DataObject.signal().
| void SUIT_DataObject::dump | ( | const int | indent = 2 | ) | const [inherited] |
| indent | current indentation level |
References SUIT_DataObject.myChildren, and SUIT_DataObject.name().
| void LightApp_RootObject::setStudy | ( | LightApp_Study * | study | ) | [inherited] |
References LightApp_RootObject.myStudy, and LightApp_RootObject.study().
| LightApp_Study * LightApp_RootObject::study | ( | ) | const [inherited] |
References LightApp_RootObject.myStudy.
friend class SUIT_DataObject::Signal [friend, inherited] |
bool SalomeApp_RootObject._toSynchronize [protected] |
QString LightApp_DataObject.myCompDataType [protected, inherited] |
SUIT_DataObject* LightApp_DataObject.myCompObject [protected, inherited] |