ArmarXManagerModel Class Reference

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

+ Inheritance diagram for ArmarXManagerModel:

Public Types

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

Public Slots

void deleteSelection (QItemSelectionModel *selectionModel)
 Deletes the selected set of rows from this model.
 
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.
 
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.
 
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.
 
ArmarXManagerModel * clone ()
 Returns a clone of this ArmarXManagerModel.
 
void copyFrom (ArmarXManagerModel *source)
 Copies the source model content to this one.
 
bool empty () const
 
QBrush getBrush (armarx::ManagedIceObjectState state) const
 Returns an instance of state dependent brush.
 
IceManagerPtr getIceManager () const
 
ArmarXManagerItem * getItem (int row, int column=0) const
 Returns a requested Model item.
 
ArmarXManagerItem * getManagerItemByName (const QString &name)
 Returns the requested manager item by its name.
 
ManagerPrxMap getManagerProxyMap ()
 
ManagerPrxMap getManagerProxyMap (const QStringList &managerNames) const
 
std::mutex & getMutex ()
 Returns the access mutex.
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 Returns the data header.
 
void populate (const QStringList &managerList)
 Populates this model with the given manager name list.
 
void setIceManager (IceManagerPtr iceManager)
 
QStringList toStringList () const
 Returns the model as a string list containing the manager names.
 
 ~ArmarXManagerModel () override
 Model destructor.
 

Member Enumeration Documentation

◆ ApplicationRowType

enum class ApplicationRowType
strong
Enumerator
Endpoint 
ApplicationProperties 
Components 

◆ UserDataRoles

enum class UserDataRoles : int
strong
Enumerator
ComponentStarted 
ResolvedDependency 
RowType 
End 

Constructor & Destructor Documentation

◆ ArmarXManagerModel()

◆ ~ArmarXManagerModel()

~ArmarXManagerModel ( )
override

Model destructor.

Member Function Documentation

◆ clone()

ArmarXManagerModel * clone ( )

Returns a clone of this ArmarXManagerModel.

Returns
pointer to a clone of this model

◆ 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

◆ deleteSelection

void deleteSelection ( QItemSelectionModel * selectionModel)
slot

Deletes the selected set of rows from this model.

Parameters
selectionModelThe selected rows

◆ empty()

bool empty ( ) const

◆ getBrush()

QBrush getBrush ( armarx::ManagedIceObjectState state) const

Returns an instance of state dependent brush.

◆ getIceManager()

IceManagerPtr getIceManager ( ) const

◆ 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

◆ 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

◆ getManagerProxyMap() [1/2]

ManagerPrxMap getManagerProxyMap ( )

◆ getManagerProxyMap() [2/2]

ManagerPrxMap getManagerProxyMap ( const QStringList & managerNames) const

◆ getMutex()

std::mutex & getMutex ( )

Returns the access mutex.

◆ headerData()

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

Returns the data header.

◆ 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

◆ populate()

void populate ( const QStringList & managerList)

Populates this model with the given manager name list.

Parameters
managerListThe manager names to populate this model with.

◆ setIceManager()

void setIceManager ( IceManagerPtr iceManager)

◆ 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

◆ toStringList()

QStringList toStringList ( ) const

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

Returns
Manager names as string list

◆ updateItem

void updateItem ( QStandardItem * item)
slot

◆ updateManagerDetails

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

◆ upsertManagerDetails

void upsertManagerDetails ( const ArmarXManagerItem::ManagerData & data)
slot

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