Go to the documentation of this file.
32 #include <QStringList>
33 #include <QStandardItemModel>
34 #include <QItemSelectionModel>
45 using StateUpdateMap = std::map<QString, QPair<bool, ArmarXManagerItem::ObjectMap> >;
48 public QStandardItemModel
132 void populate(
const QStringList& managerList);
181 QBrush
getBrush(armarx::ManagedIceObjectState state)
const;
197 QItemSelectionModel* selectionModel);
208 QList<QPersistentModelIndex> getPersistentModelIndex(
209 QItemSelectionModel* selectionModel);
212 QStandardItem* findItem(
const QString& name, QStandardItem* item);
213 QStandardItem* findItemByUserData(Qt::ItemDataRole role,
const QVariant&
data, QStandardItem* item);
214 void syncStringListChildren(QStandardItem* item,
const std::vector<QString>& strings);
216 static std::string GenerateDependencyGraph(
const std::map<std::string, DependencyMap>& dependenciesMap);
224 std::map<std::string, DependencyMap> dependenciesMap;
ArmarXManagerItem * getManagerItemByName(const QString &name)
Returns the requested manager item by its name.
QStringList toStringList() const
Returns the model as a string list containing the manager names.
std::map< QString, QPair< bool, ArmarXManagerItem::ObjectMap > > StateUpdateMap
void updateItem(QStandardItem *item)
ScalarT Orientation(const VectorXD< 2, ScalarT > &p1, const VectorXD< 2, ScalarT > &p2, const VectorXD< 2, ScalarT > &c)
ManagerPrxMap getManagerProxyMap() const
std::mutex & getMutex()
Returns the access mutex.
ArmarXManagerModel * clone()
Returns a clone of this ArmarXManagerModel.
void populate(const QStringList &managerList)
Populates this model with the given manager name list.
void copyFrom(ArmarXManagerModel *source)
Copies the source model content to this one.
void setIceManager(IceManagerPtr iceManager)
void deleteSelection(QItemSelectionModel *selectionModel)
Deletes the selected set of rows from this model.
IceManagerPtr getIceManager() const
void upsertManagerDetails(const ArmarXManagerItem::ManagerData &data)
QBrush getBrush(armarx::ManagedIceObjectState state) const
Returns an instance of state dependent brush.
std::map< QString, ManagerData > ManagerDataMap
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns the data header.
ArmarXManagerModel()
Constructs an ArmarXManagerModel.
std::map< QString, ArmarXManagerInterfacePrx > ManagerPrxMap
void updateManagerDetails(const ArmarXManagerItem::ManagerDataMap &managerDataMap, bool deactivateIfMissing=true)
ArmarXManagerItem * getItem(int row, int column=0) const
Returns a requested Model item.
~ArmarXManagerModel() override
Model destructor.
void moveSelectionTo(QItemSelectionModel *selectionModel, ArmarXManagerModel *destinationModel)
Takes the specified selected rows via the selection model from this and appends the rows to the given...
This file offers overloads of toIce() and fromIce() functions for STL container types.
void takeSelectionFrom(QItemSelectionModel *selectionModel, ArmarXManagerModel *sourceModel)
Takes the specified selected rows via the selection model from the source model and appends the rows ...