30#include <QItemSelectionModel>
33#include <QStandardItemModel>
45 using StateUpdateMap = std::map<QString, QPair<bool, ArmarXManagerItem::ObjectMap>>;
68 bool deactivateIfMissing =
true);
135 void populate(
const QStringList& managerList);
155 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
183 QBrush
getBrush(armarx::ManagedIceObjectState state)
const;
198 QItemSelectionModel* selectionModel);
209 QList<QPersistentModelIndex> getPersistentModelIndex(QItemSelectionModel* selectionModel);
212 QStandardItem* findItem(
const QString& name, QStandardItem* item);
214 findItemByUserData(Qt::ItemDataRole role,
const QVariant&
data, QStandardItem* item);
215 void syncStringListChildren(QStandardItem* item,
const std::vector<QString>& strings);
std::map< QString, ManagerData > ManagerDataMap
void upsertManagerDetails(const ArmarXManagerItem::ManagerData &data)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns the data header.
ArmarXManagerModel * clone()
Returns a clone of this ArmarXManagerModel.
void moveSelectionTo(QItemSelectionModel *selectionModel, ArmarXManagerModel *destinationModel)
Takes the specified selected rows via the selection model from this and appends the rows to the given...
void setIceManager(IceManagerPtr iceManager)
QStringList toStringList() const
Returns the model as a string list containing the manager names.
ArmarXManagerItem * getItem(int row, int column=0) const
Returns a requested Model item.
QBrush getBrush(armarx::ManagedIceObjectState state) const
Returns an instance of state dependent brush.
ManagerPrxMap getManagerProxyMap()
void takeSelectionFrom(QItemSelectionModel *selectionModel, ArmarXManagerModel *sourceModel)
Takes the specified selected rows via the selection model from the source model and appends the rows ...
std::mutex & getMutex()
Returns the access mutex.
ArmarXManagerModel()
Constructs an ArmarXManagerModel.
~ArmarXManagerModel() override
Model destructor.
ArmarXManagerItem * getManagerItemByName(const QString &name)
Returns the requested manager item by its name.
IceManagerPtr getIceManager() const
void updateManagerDetails(const ArmarXManagerItem::ManagerDataMap &managerDataMap, bool deactivateIfMissing=true)
void deleteSelection(QItemSelectionModel *selectionModel)
Deletes the selected set of rows from this model.
void populate(const QStringList &managerList)
Populates this model with the given manager name list.
void updateItem(QStandardItem *item)
void copyFrom(ArmarXManagerModel *source)
Copies the source model content to this one.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::map< QString, QPair< bool, ArmarXManagerItem::ObjectMap > > StateUpdateMap
std::map< QString, ArmarXManagerInterfacePrx > ManagerPrxMap
IceUtil::Handle< IceManager > IceManagerPtr
IceManager smart pointer.