Back to index

salome-gui  6.5.0
Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | Friends
TREEDATA_EXPORT Protocol Reference

#include <DataModel.hxx>

Inheritance diagram for TREEDATA_EXPORT:
Inheritance graph
[legend]
Collaboration diagram for TREEDATA_EXPORT:
Collaboration graph
[legend]

List of all members.

Public Slots

virtual void processItemList (QStringList itemNameIdList, int actionId)
virtual void processItemList (QStringList itemNameIdList, int actionId)

Signals

void itemListToProcess (QStringList itemNameIdList, int actionId)

Public Member Functions

 DataModel ()
 ~DataModel ()
virtual DataObjectnewDataObject ()=0
 This function can be used to create a specific instance of DataObject.
bool addDataObject (DataObject *dataObject)
 Function to add data object to the model.
bool removeDataObject (string nameId)
 Functions to remove data object from the model.
bool removeDataObject (DataObject *dataObject)
DataObjectgetDataObject (string nameId)
 Function to retrieve a data object in the model.
map< string, DataObject * >
::iterator 
begin ()
map< string, DataObject * >
::iterator 
end ()
 DataObject ()
 ~DataObject ()
void setLabel (string label)
string getLabel ()
void setProperty (string key, string value)
string getProperty (string key)
virtual string getPath ()=0
 This function specifies the localization of the object in the hierarchical organization that can be defined by the DataModel it belongs to.
string getPathName ()
string getNameId ()
string toString ()
 This function can be used for debug.
 DataProcessor (DataModel *dataModel)
DataObjectVectorextract (QStringList itemNameIdList)
void process (QStringList itemNameIdList)
 DockWidgets (SalomeApp_Application *salomeApp, bool tabify=false, const char *title="Data Model")
void tabify (bool tabify)
void show (bool isVisible)
void setDataView (QTreeView *dataView)
void setPropertiesView (QTreeView *propertyView)
 TreeGuiManager (SalomeApp_Application *salomeApp, const char *title="Data Model")
void tabifyDockWidgets (bool tabify)
void showDockWidgets (bool isVisible)
SalomeApp_ApplicationgetSalomeApplication ()
TreeModelgetDataTreeModel ()
TreeViewgetDataTreeView ()
void setDataModel (DataModel *dataModel)
DataModelgetDataModel ()
 TreeItem (const QString &nameId, const QVector< QVariant > &columnValues, TreeItem *parent=0)
 ~TreeItem ()
QString nameId ()
void associateToModel (TreeModel *model)
TreeModelassociatedModel ()
QModelIndex modelIndex (int column=0)
TreeItemparent ()
void appendChild (TreeItem *child)
void appendChild (DataObject *dataObject, const QStringList &relativePath=QStringList())
void appendChild (const QString &nameId, const QVector< QVariant > &columnValues, const QStringList &relativePath=QStringList())
TreeItemchild (int row)
TreeItemchildById (const QString &nameId)
TreeItemchildByLabel (const QString &label)
int childCount () const
int columnCount () const
int rowIndex () const
QVariant data (int column) const
bool setData (int column, const QVariant &value)
 TreeModel (const QStringList &headers, QObject *parent=0)
 ~TreeModel ()
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex parent (const QModelIndex &index) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Qt::ItemFlags flags (const QModelIndex &index) const
bool addData (DataObject *dataObject)
bool addData (DataObject *dataObject, const QStringList &path)
TreeItemgetRootItem ()
 TreeObserver ()
void observe (TreeView *treeView)
 TreeView (QWidget *parent=0)
 ~TreeView ()
int addAction (QString label)
void clearActions ()

Static Public Attributes

static const string pathsep

Protected Member Functions

virtual void preprocess (QStringList itemNameIdList)
virtual void postprocess (QStringList itemNameIdList)
virtual void processDataObject (DataObject *dataObject)=0
void contextMenuEvent (QContextMenuEvent *event)

Private Slots

void processMenuAction (QAction *actionSelected)

Private Member Functions

void initialize (const QString &nameId, const QVector< QVariant > &columnValues, TreeItem *parent)
TreeItemgetItem (const QModelIndex &index=QModelIndex()) const
QString _idToName (int actionId)
int _nameToId (QString actionName)

Private Attributes

map< string, DataObject * > _mapDataObjects
string _label
 The name this object can be displayed with.
string _nameId
 The identifier of this object.
map< string, string > _properties
 The dictionnary of properties that characterize this object.
DataModel_dataModel
SalomeApp_Application_salomeApp
QDockWidget * _dwDataPanel
QTreeView * _tvDataView
DockWidgets_dockWidgets
TreeView_dataTreeView
TreeModel_dataTreeModel
QList< TreeItem * > _childItems
QMap< QString, TreeItem * > _childItemsMapById
QMap< QString, TreeItem * > _childItemsMapByLabel
QString _itemNameId
QVector< QVariant > _itemData
TreeItem_parentItem
TreeModel_associatedModel
TreeItem_rootItem
int _lastActionId
QList< QAction * > _listActions

Static Private Attributes

static int _lastId
static const string _BASENAME

Friends

class TreeItem
class TreeView

Detailed Description

Definition at line 31 of file DataModel.hxx.


Constructor & Destructor Documentation


Member Function Documentation

QString TREEDATA_EXPORT::_idToName ( int  actionId) [private]
int TREEDATA_EXPORT::_nameToId ( QString  actionName) [private]
int TREEDATA_EXPORT::addAction ( QString  label)
bool TREEDATA_EXPORT::addData ( DataObject dataObject)
bool TREEDATA_EXPORT::addData ( DataObject dataObject,
const QStringList &  path 
)

Function to add data object to the model.

void TREEDATA_EXPORT::appendChild ( DataObject dataObject,
const QStringList &  relativePath = QStringList() 
)
void TREEDATA_EXPORT::appendChild ( const QString &  nameId,
const QVector< QVariant > &  columnValues,
const QStringList &  relativePath = QStringList() 
)
map<string, DataObject *>::iterator TREEDATA_EXPORT::begin ( )
TreeItem* TREEDATA_EXPORT::childById ( const QString &  nameId)
TreeItem* TREEDATA_EXPORT::childByLabel ( const QString &  label)
int TREEDATA_EXPORT::columnCount ( const QModelIndex &  parent = QModelIndex()) const
void TREEDATA_EXPORT::contextMenuEvent ( QContextMenuEvent *  event) [protected]
QVariant TREEDATA_EXPORT::data ( int  column) const
QVariant TREEDATA_EXPORT::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
TREEDATA_EXPORT::DockWidgets ( SalomeApp_Application salomeApp,
bool  tabify = false,
const char *  title = "Data Model" 
)
map<string, DataObject *>::iterator TREEDATA_EXPORT::end ( )
DataObjectVector* TREEDATA_EXPORT::extract ( QStringList  itemNameIdList)
Qt::ItemFlags TREEDATA_EXPORT::flags ( const QModelIndex &  index) const

Function to retrieve a data object in the model.

TreeItem* TREEDATA_EXPORT::getItem ( const QModelIndex &  index = QModelIndex()) const [private]
virtual string TREEDATA_EXPORT::getPath ( ) [pure virtual]

This function specifies the localization of the object in the hierarchical organization that can be defined by the DataModel it belongs to.

string TREEDATA_EXPORT::getProperty ( string  key)
QVariant TREEDATA_EXPORT::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
QModelIndex TREEDATA_EXPORT::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
void TREEDATA_EXPORT::initialize ( const QString &  nameId,
const QVector< QVariant > &  columnValues,
TreeItem parent 
) [private]
void TREEDATA_EXPORT::itemListToProcess ( QStringList  itemNameIdList,
int  actionId 
) [signal]
QModelIndex TREEDATA_EXPORT::modelIndex ( int  column = 0)
virtual DataObject* TREEDATA_EXPORT::newDataObject ( ) [pure virtual]

This function can be used to create a specific instance of DataObject.

Note that this function is a pure virtual method and then no default behavior is done. In particular, the newly created object is not automatically added to the data model. This behavior should be implemented in a dedicated version of this class.

QModelIndex TREEDATA_EXPORT::parent ( const QModelIndex &  index) const
virtual void TREEDATA_EXPORT::postprocess ( QStringList  itemNameIdList) [inline, protected, virtual]

Definition at line 58 of file DataProcessor.hxx.

                                                       {
      // Implement something to be executed at the end of the process function
  };
virtual void TREEDATA_EXPORT::preprocess ( QStringList  itemNameIdList) [inline, protected, virtual]

Definition at line 55 of file DataProcessor.hxx.

                                                      {
      // Implement something to be executed at the begining of the process function
  };
void TREEDATA_EXPORT::process ( QStringList  itemNameIdList)
virtual void TREEDATA_EXPORT::processDataObject ( DataObject dataObject) [protected, pure virtual]
virtual void TREEDATA_EXPORT::processItemList ( QStringList  itemNameIdList,
int  actionId 
) [virtual, slot]
virtual void TREEDATA_EXPORT::processItemList ( QStringList  itemNameIdList,
int  actionId 
) [virtual, slot]
void TREEDATA_EXPORT::processMenuAction ( QAction *  actionSelected) [private, slot]
bool TREEDATA_EXPORT::removeDataObject ( string  nameId)

Functions to remove data object from the model.

int TREEDATA_EXPORT::rowCount ( const QModelIndex &  parent = QModelIndex()) const
bool TREEDATA_EXPORT::setData ( int  column,
const QVariant &  value 
)
bool TREEDATA_EXPORT::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
void TREEDATA_EXPORT::setDataView ( QTreeView *  dataView)
bool TREEDATA_EXPORT::setHeaderData ( int  section,
Qt::Orientation  orientation,
const QVariant &  value,
int  role = Qt::EditRole 
)
void TREEDATA_EXPORT::setLabel ( string  label)
void TREEDATA_EXPORT::setPropertiesView ( QTreeView *  propertyView)
void TREEDATA_EXPORT::setProperty ( string  key,
string  value 
)
void TREEDATA_EXPORT::show ( bool  isVisible)
void TREEDATA_EXPORT::tabify ( bool  tabify)

This function can be used for debug.

TREEDATA_EXPORT::TreeGuiManager ( SalomeApp_Application salomeApp,
const char *  title = "Data Model" 
)
TREEDATA_EXPORT::TreeItem ( const QString &  nameId,
const QVector< QVariant > &  columnValues,
TreeItem parent = 0 
)
TREEDATA_EXPORT::TreeModel ( const QStringList &  headers,
QObject parent = 0 
)
TREEDATA_EXPORT::TreeView ( QWidget *  parent = 0)

Friends And Related Function Documentation

friend class TreeItem [friend]

Definition at line 51 of file TreeModel.hxx.

friend class TreeView [friend]

Definition at line 52 of file TreeModel.hxx.


Member Data Documentation

Definition at line 78 of file TreeItem.hxx.

const string TREEDATA_EXPORT::_BASENAME [static, private]

Definition at line 65 of file DataObject.hxx.

Definition at line 71 of file TreeItem.hxx.

QMap<QString, TreeItem *> TREEDATA_EXPORT::_childItemsMapById [private]

Definition at line 72 of file TreeItem.hxx.

Definition at line 73 of file TreeItem.hxx.

Definition at line 65 of file DataProcessor.hxx.

Definition at line 57 of file TreeGuiManager.hxx.

Definition at line 55 of file TreeGuiManager.hxx.

Definition at line 54 of file TreeGuiManager.hxx.

QDockWidget* TREEDATA_EXPORT::_dwDataPanel [private]

Definition at line 47 of file DockWidgets.hxx.

QVector<QVariant> TREEDATA_EXPORT::_itemData [private]

Definition at line 76 of file TreeItem.hxx.

QString TREEDATA_EXPORT::_itemNameId [private]

Definition at line 75 of file TreeItem.hxx.

string TREEDATA_EXPORT::_label [private]

The name this object can be displayed with.

Definition at line 58 of file DataObject.hxx.

Definition at line 47 of file TreeView.hxx.

int TREEDATA_EXPORT::_lastId [static, private]

Definition at line 64 of file DataObject.hxx.

QList<QAction*> TREEDATA_EXPORT::_listActions [private]

Definition at line 48 of file TreeView.hxx.

map<string, DataObject *> TREEDATA_EXPORT::_mapDataObjects [private]

Definition at line 59 of file DataModel.hxx.

string TREEDATA_EXPORT::_nameId [private]

The identifier of this object.

An identifier is invariant all the session long

Definition at line 60 of file DataObject.hxx.

Definition at line 77 of file TreeItem.hxx.

map<string, string> TREEDATA_EXPORT::_properties [private]

The dictionnary of properties that characterize this object.

Definition at line 62 of file DataObject.hxx.

Definition at line 102 of file TreeModel.hxx.

Definition at line 46 of file DockWidgets.hxx.

QTreeView* TREEDATA_EXPORT::_tvDataView [private]

Definition at line 48 of file DockWidgets.hxx.

const string TREEDATA_EXPORT::pathsep [static]

Definition at line 51 of file DataObject.hxx.


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