ArmarXManagerModel Class Reference

#include <ArmarXGui/gui-plugins/SystemStateMonitorPlugin/ArmarXManagerModel.h>

+ Inheritance diagram for ArmarXManagerModel:

Public Types

enum  ApplicationRowType { Endpoint, ApplicationProperties, Components }
 
enum  UserDataRoles : int { ComponentStarted = Qt::UserRole + 1, ResolvedDependency, RowType, End }
 

Public Slots

void deleteSelection (QItemSelectionModel *selectionModel)
 Deletes the selected set of rows from this model. More...
 
void moveSelectionTo (QItemSelectionModel *selectionModel, ArmarXManagerModel *destinationModel)
 Takes the specified selected rows via the selection model from this and appends the rows to the given destination model. More...
 
void takeSelectionFrom (QItemSelectionModel *selectionModel, ArmarXManagerModel *sourceModel)
 Takes the specified selected rows via the selection model from the source model and appends the rows to this one. More...
 
void updateItem (QStandardItem *item)
 
void updateManagerDetails (const ArmarXManagerItem::ManagerDataMap &managerDataMap, bool deactivateIfMissing=true)
 
void upsertManagerDetails (const ArmarXManagerItem::ManagerData &data)
 

Public Member Functions

 ArmarXManagerModel ()
 Constructs an ArmarXManagerModel. More...
 
ArmarXManagerModelclone ()
 Returns a clone of this ArmarXManagerModel. More...
 
void copyFrom (ArmarXManagerModel *source)
 Copies the source model content to this one. More...
 
bool empty () const
 
QBrush getBrush (armarx::ManagedIceObjectState state) const
 Returns an instance of state dependent brush. More...
 
IceManagerPtr getIceManager () const
 
ArmarXManagerItemgetItem (int row, int column=0) const
 Returns a requested Model item. More...
 
ArmarXManagerItemgetManagerItemByName (const QString &name)
 Returns the requested manager item by its name. More...
 
ManagerPrxMap getManagerProxyMap () const
 
ManagerPrxMap getManagerProxyMap (const QStringList &managerNames) const
 
std::mutex & getMutex ()
 Returns the access mutex. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 Returns the data header. More...
 
void populate (const QStringList &managerList)
 Populates this model with the given manager name list. More...
 
void setIceManager (IceManagerPtr iceManager)
 
QStringList toStringList () const
 Returns the model as a string list containing the manager names. More...
 
 ~ArmarXManagerModel () override
 Model destructor. More...
 

Detailed Description

Definition at line 47 of file ArmarXManagerModel.h.

Member Enumeration Documentation

◆ ApplicationRowType

enum ApplicationRowType
strong
Enumerator
Endpoint 
ApplicationProperties 
Components 

Definition at line 168 of file ArmarXManagerModel.h.

◆ UserDataRoles

enum UserDataRoles : int
strong
Enumerator
ComponentStarted 
ResolvedDependency 
RowType 
End 

Definition at line 161 of file ArmarXManagerModel.h.

Constructor & Destructor Documentation

◆ ArmarXManagerModel()

Constructs an ArmarXManagerModel.

Definition at line 46 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~ArmarXManagerModel()

~ArmarXManagerModel ( )
override

Model destructor.

Definition at line 53 of file ArmarXManagerModel.cpp.

Member Function Documentation

◆ clone()

ArmarXManagerModel * clone ( )

Returns a clone of this ArmarXManagerModel.

Returns
pointer to a clone of this model

Definition at line 677 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyFrom()

void copyFrom ( ArmarXManagerModel source)

Copies the source model content to this one.

After the copy, this model is basically a clone of the source model

Parameters
sourceSource model to copy all content from

Definition at line 695 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:

◆ deleteSelection

void deleteSelection ( QItemSelectionModel *  selectionModel)
slot

Deletes the selected set of rows from this model.

Parameters
selectionModelThe selected rows

Definition at line 563 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ empty()

bool empty ( ) const

Definition at line 657 of file ArmarXManagerModel.cpp.

◆ getBrush()

QBrush getBrush ( armarx::ManagedIceObjectState  state) const

Returns an instance of state dependent brush.

Definition at line 724 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ getIceManager()

IceManagerPtr getIceManager ( ) const

Definition at line 718 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ getItem()

ArmarXManagerItem * getItem ( int  row,
int  column = 0 
) const

Returns a requested Model item.

Parameters
rowThe row index of the item
columnThe column index of the item
Pointerto the ArmarXManagerItem

Definition at line 59 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ getManagerItemByName()

ArmarXManagerItem * getManagerItemByName ( const QString &  name)

Returns the requested manager item by its name.

Parameters
nameRequested manager item name
Returns
pointer to the manager item if exists, NULL otherwise

Definition at line 65 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getManagerProxyMap() [1/2]

ManagerPrxMap getManagerProxyMap ( ) const

Definition at line 84 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:

◆ getManagerProxyMap() [2/2]

ManagerPrxMap getManagerProxyMap ( const QStringList &  managerNames) const

Definition at line 114 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:

◆ getMutex()

std::mutex & getMutex ( )

Returns the access mutex.

Definition at line 624 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ headerData()

QVariant headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

Returns the data header.

Definition at line 603 of file ArmarXManagerModel.cpp.

◆ moveSelectionTo

void moveSelectionTo ( QItemSelectionModel *  selectionModel,
ArmarXManagerModel destinationModel 
)
slot

Takes the specified selected rows via the selection model from this and appends the rows to the given destination model.

Parameters
selectionModelThe selected rows
destinationModelManager destination model

Definition at line 524 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ populate()

void populate ( const QStringList &  managerList)

Populates this model with the given manager name list.

Parameters
managerListThe manager names to populate this model with.

Definition at line 663 of file ArmarXManagerModel.cpp.

◆ setIceManager()

void setIceManager ( IceManagerPtr  iceManager)

Definition at line 712 of file ArmarXManagerModel.cpp.

◆ takeSelectionFrom

void takeSelectionFrom ( QItemSelectionModel *  selectionModel,
ArmarXManagerModel sourceModel 
)
slot

Takes the specified selected rows via the selection model from the source model and appends the rows to this one.

Parameters
selectionModelThe selected rows
sourceModelManager source model

Definition at line 532 of file ArmarXManagerModel.cpp.

+ Here is the caller graph for this function:

◆ toStringList()

QStringList toStringList ( ) const

Returns the model as a string list containing the manager names.

Returns
Manager names as string list

Definition at line 644 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:

◆ updateItem

void updateItem ( QStandardItem *  item)
slot

Definition at line 630 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateManagerDetails

void updateManagerDetails ( const ArmarXManagerItem::ManagerDataMap managerDataMap,
bool  deactivateIfMissing = true 
)
slot

Definition at line 138 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upsertManagerDetails

void upsertManagerDetails ( const ArmarXManagerItem::ManagerData data)
slot

Definition at line 501 of file ArmarXManagerModel.cpp.

+ Here is the call graph for this function:

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