ParaView
|
is a helper for to work with SILs. More...
#include <vtkSMSILModel.h>
Public Types | |
enum | CheckState { UNCHECKED = 0, PARTIAL = 1, CHECKED = 2 } |
typedef vtkSMObject | Superclass |
![]() | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | GetNumberOfChildren (vtkIdType vertexid) |
Returns the number of children for the given vertex. More... | |
vtkIdType | GetChildVertex (vtkIdType parentid, int child_index) |
Returns the vertex id for the n-th child where n=child_index. More... | |
vtkIdType | GetParentVertex (vtkIdType parent) |
Returns the parent vertex i.e. More... | |
const char * | GetName (vtkIdType vertex) |
Get the name for the vertex. More... | |
int | GetCheckStatus (vtkIdType vertex) |
Get the check state for a vertex. More... | |
void | UpdatePropertyValue (vtkSMStringVectorProperty *) |
Updates the property using the check states maintained by the model. More... | |
void | UpdateStateFromProperty (vtkSMStringVectorProperty *) |
Updates the check states maintained internally by the model using the status from the property. More... | |
vtkIdType | FindVertex (const char *name) |
Locate a vertex with the given name. More... | |
void | GetLeaves (std::set< vtkIdType > &leaves, vtkIdType root, bool traverse_cross_edges) |
void | Initialize (vtkGraph *sil) |
Initialize the model using a SIL. More... | |
virtual vtkGraph * | GetSIL () |
Initialize the model using a SIL. More... | |
void | Initialize (vtkSMProxy *, vtkSMStringVectorProperty *) |
Initialize the model using a proxy and its property. More... | |
virtual vtkSMProxy * | GetProxy () |
Initialize the model using a proxy and its property. More... | |
virtual vtkSMStringVectorProperty * | GetProperty () |
Initialize the model using a proxy and its property. More... | |
bool | SetCheckState (vtkIdType vertex, int status) |
Set the check state for a vertex. More... | |
bool | SetCheckState (const char *name, int status) |
Set the check state for a vertex. More... | |
void | CheckAll () |
Convenience methods to check/uncheck all items. More... | |
void | UncheckAll () |
Convenience methods to check/uncheck all items. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
Static Public Member Functions | |
static vtkSMSILModel * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMSILModel * | SafeDownCast (vtkObject *o) |
![]() | |
static vtkSMObject * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMObject * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkSMSILModel () | |
virtual | ~vtkSMSILModel () |
void | UpdateProperty () |
void | OnPropertyModified () |
void | OnDomainModified () |
void | Check (vtkIdType vertexid, bool checked, vtkIdType inedgeid=-1) |
Called to check/uncheck an item. More... | |
void | UpdateCheck (vtkIdType vertexid) |
Determine vertexid's check state using its immediate children. More... | |
void | SetSIL (vtkGraph *) |
![]() | |
vtkSMObject () | |
~vtkSMObject () | |
Protected Attributes | |
bool | BlockUpdate |
vtkSMProxy * | Proxy |
vtkSMStringVectorProperty * | Property |
vtkGraph * | SIL |
vtkCommand * | PropertyObserver |
vtkCommand * | DomainObserver |
is a helper for to work with SILs.
vtkSMSILModel makes it easier to make checks/unchecks for the SIL while respecting the links/dependencies defined by the SIL.
There are two ways of initializing the model:
Definition at line 47 of file vtkSMSILModel.h.
typedef vtkSMObject vtkSMSILModel::Superclass |
Definition at line 51 of file vtkSMSILModel.h.
Enumerator | |
---|---|
UNCHECKED | |
PARTIAL | |
CHECKED |
Definition at line 54 of file vtkSMSILModel.h.
|
protected |
|
protectedvirtual |
|
static |
|
virtual |
Reimplemented from vtkSMObject.
|
static |
|
virtual |
Reimplemented from vtkSMObject.
|
static |
void vtkSMSILModel::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
void vtkSMSILModel::Initialize | ( | vtkGraph * | sil | ) |
Initialize the model using a SIL.
There are two ways of initializing the model:
|
virtual |
Initialize the model using a SIL.
There are two ways of initializing the model:
void vtkSMSILModel::Initialize | ( | vtkSMProxy * | , |
vtkSMStringVectorProperty * | |||
) |
Initialize the model using a proxy and its property.
If a property is set, then the model keeps the property updated when the check states are changed or when the property changes, the model's internal check states are updated. If the property has a SILDomain, then the model attaches itself to the domain so that whenever the domains is updated (i.e. a new SIL is obtained from the server) the model updates the sil as well.
There are two ways of initializing the model:
|
virtual |
Initialize the model using a proxy and its property.
If a property is set, then the model keeps the property updated when the check states are changed or when the property changes, the model's internal check states are updated. If the property has a SILDomain, then the model attaches itself to the domain so that whenever the domains is updated (i.e. a new SIL is obtained from the server) the model updates the sil as well.
There are two ways of initializing the model:
|
virtual |
Initialize the model using a proxy and its property.
If a property is set, then the model keeps the property updated when the check states are changed or when the property changes, the model's internal check states are updated. If the property has a SILDomain, then the model attaches itself to the domain so that whenever the domains is updated (i.e. a new SIL is obtained from the server) the model updates the sil as well.
There are two ways of initializing the model:
int vtkSMSILModel::GetNumberOfChildren | ( | vtkIdType | vertexid | ) |
Returns the number of children for the given vertex.
A node is a child node if it has no out-going edges or all out-going edges have "CrossEdges" set to 1. If vertex id is invalid, returns -1.
vtkIdType vtkSMSILModel::GetChildVertex | ( | vtkIdType | parentid, |
int | child_index | ||
) |
Returns the vertex id for the n-th child where n=child_index.
Returns 0 if request is invalid.
vtkIdType vtkSMSILModel::GetParentVertex | ( | vtkIdType | parent | ) |
Returns the parent vertex i.e.
the vertex at the end of an in-edge which is not a cross-edge. It's an error to call this method for the root vertex id i.e. 0.
const char* vtkSMSILModel::GetName | ( | vtkIdType | vertex | ) |
Get the name for the vertex.
int vtkSMSILModel::GetCheckStatus | ( | vtkIdType | vertex | ) |
Get the check state for a vertex.
bool vtkSMSILModel::SetCheckState | ( | vtkIdType | vertex, |
int | status | ||
) |
Set the check state for a vertex.
Returns true if the status was changed, false if unaffected.
|
inline |
Set the check state for a vertex.
Returns true if the status was changed, false if unaffected.
Definition at line 134 of file vtkSMSILModel.h.
void vtkSMSILModel::CheckAll | ( | ) |
Convenience methods to check/uncheck all items.
void vtkSMSILModel::UncheckAll | ( | ) |
Convenience methods to check/uncheck all items.
void vtkSMSILModel::UpdatePropertyValue | ( | vtkSMStringVectorProperty * | ) |
Updates the property using the check states maintained by the model.
void vtkSMSILModel::UpdateStateFromProperty | ( | vtkSMStringVectorProperty * | ) |
Updates the check states maintained internally by the model using the status from the property.
vtkIdType vtkSMSILModel::FindVertex | ( | const char * | name | ) |
Locate a vertex with the given name.
Returns -1 if the vertex is not found.
void vtkSMSILModel::GetLeaves | ( | std::set< vtkIdType > & | leaves, |
vtkIdType | root, | ||
bool | traverse_cross_edges | ||
) |
|
protected |
|
protected |
|
protected |
|
protected |
Called to check/uncheck an item.
|
protected |
Determine vertexid's check state using its immediate children.
If the check-state for the vertex has changed, then it propagates the call to the parent node.
|
protected |
|
protected |
Definition at line 188 of file vtkSMSILModel.h.
|
protected |
Definition at line 192 of file vtkSMSILModel.h.
|
protected |
Definition at line 193 of file vtkSMSILModel.h.
|
protected |
Definition at line 194 of file vtkSMSILModel.h.
|
protected |
Definition at line 195 of file vtkSMSILModel.h.
|
protected |
Definition at line 196 of file vtkSMSILModel.h.