30#include <QItemSelectionModel>
33#include <QStandardItemModel>
45 using StateUpdateMap = std::map<QString, QPair<bool, ArmarXManagerItem::ObjectMap>>;
68 bool deactivateIfMissing =
true);
133 void populate(
const QStringList& managerList);
153 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
181 QBrush
getBrush(armarx::ManagedIceObjectState state)
const;
196 QItemSelectionModel* selectionModel);
207 QList<QPersistentModelIndex> getPersistentModelIndex(QItemSelectionModel* selectionModel);
210 QStandardItem* findItem(
const QString& name, QStandardItem* item);
212 findItemByUserData(Qt::ItemDataRole role,
const QVariant&
data, QStandardItem* item);
213 void syncStringListChildren(QStandardItem* item,
const std::vector<QString>& strings);
216 GenerateDependencyGraph(
const std::map<std::string, DependencyMap>& dependenciesMap);
225 std::map<std::string, DependencyMap> dependenciesMap;
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.
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.
ManagerPrxMap getManagerProxyMap() const
~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.