Go to the documentation of this file.
   29 #ifndef PROPERTY_MODEL_H 
   30 #define PROPERTY_MODEL_H 
   32 #include <QAbstractItemModel> 
   59   QVariant 
data(
const QModelIndex& 
index, 
int role) 
const override;
 
   61   headerData(
int section, Qt::Orientation orientation, 
int role = Qt::DisplayRole) 
const override;
 
   63   QModelIndex 
index(
int row, 
int column, 
const QModelIndex& 
parent = QModelIndex()) 
const override;
 
   64   QModelIndex 
parent(
const QModelIndex& 
index) 
const override;
 
   71   int rowCount(
const QModelIndex& 
parent = QModelIndex()) 
const override;
 
   75   int columnCount(
const QModelIndex&  = QModelIndex())
 const override 
   81   Qt::ItemFlags 
flags(
const QModelIndex& 
index) 
const override;
 
   82   bool setData(
const QModelIndex& 
index, 
const QVariant& value, 
int role = Qt::EditRole) 
override;
 
   86     return Qt::MoveAction;
 
   95   QMimeData* 
mimeData(
const QModelIndexList& indexes) 
const override;
 
  105                     Qt::DropAction action,
 
  107                     int destination_column,
 
  108                     const QModelIndex& destination_parent) 
override;
 
  171 #endif // PROPERTY_MODEL_H 
  
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
void emitPropertyHiddenChanged(const Property *property)
Emit the propertyHiddenChanged() signal for the given Property.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
void expand(const QModelIndex &index)
Emitted when a Property wants to expand (display its children).
void collapse(const QModelIndex &index)
Emitted when a Property wants to collapse (hide its children).
void expandProperty(Property *property)
Expand (show the children of) the given Property.
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int destination_row, int destination_column, const QModelIndex &destination_parent) override
Override from QAbstractItemModel. Takes a (non-standard) mime-encoded version of an index list and dr...
~PropertyTreeModel() override
Destructor. Deletes the root property (and thus the entire property tree).
Property * getProp(const QModelIndex &index) const
return the Property at the given index, or the root property if the index is invalid.
QModelIndex parentIndex(const Property *child) const
Same as parent() but taking a Property pointer instead of an index.
int columnCount(const QModelIndex &=QModelIndex()) const override
Return the number of columns under the given parent index, which is always 2 for this model.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Return the number of rows under the given parent index.
void propertyHiddenChanged(const Property *property)
Emitted when a property within the model is hidden or shown.
void collapseProperty(Property *property)
Collapse (hide the children of) the given Property.
A single element of a property tree, with a name, value, description, and possibly children.
void emitDataChanged(Property *property, bool emit_config_changed=true)
void configChanged()
Emitted when a Property which should be saved changes.
QModelIndex parent(const QModelIndex &index) const override
QModelIndex indexOf(Property *property) const
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Property * getRoot() const
void printPersistentIndices()
For debugging only. Uses printf() to print the property names of current persistent indices.
void beginInsert(Property *parent_property, int row_within_parent, int count=1)
Property * root_property_
void beginRemove(Property *parent_property, int row_within_parent, int count=1)
QStringList mimeTypes() const override
Returns a list with just "application/x-rviz-" plus drag_drop_class_.
Qt::ItemFlags flags(const QModelIndex &index) const override
QMimeData * mimeData(const QModelIndexList &indexes) const override
Override from QAbstractItemModel. Returns a (non-standard) mime-encoded version of the given indexes.
QVariant data(const QModelIndex &index, int role) const override
Qt::DropActions supportedDropActions() const override
PropertyTreeModel(Property *root_property, QObject *parent=nullptr)
Constructor.
void setDragDropClass(const QString &drag_drop_class)
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall 
autogenerated on Sun May 4 2025 02:31:26