28 #ifndef DATATOOLS_CONFIGURATION_UI_VARIANT_REGISTRY_TREE_MODEL_H 29 #define DATATOOLS_CONFIGURATION_UI_VARIANT_REGISTRY_TREE_MODEL_H 36 #include <QAbstractItemModel> 37 #include <QModelIndex> 40 #include <boost/scoped_ptr.hpp> 48 namespace configuration {
52 class variant_registry;
117 QVariant
data(
int column_)
const;
120 bool setData(
int column_,
const QVariant & value_);
141 virtual void tree_dump(std::ostream & out = std::clog,
142 const std::string & title_ =
"",
143 const std::string & indent_ =
"",
144 bool inherit_ =
false)
const;
151 QList<tree_item *> _children_;
190 QModelIndex
index(
int row_,
192 const QModelIndex &parent_)
const;
195 QModelIndex
parent(
const QModelIndex &child_)
const;
198 Qt::ItemFlags
flags(
const QModelIndex &index_)
const;
201 int rowCount(
const QModelIndex &parent_)
const;
207 QVariant
data(
const QModelIndex &index_,
int role_)
const;
210 bool setData(
const QModelIndex & index_,
const QVariant & value_,
int role_ = Qt::EditRole);
213 bool unsetData(
const QModelIndex & index_,
int role_ = Qt::EditRole);
218 Qt::Orientation orientation_,
223 const std::string & registry_name_ =
"");
259 virtual void tree_dump(std::ostream & out = std::clog,
260 const std::string & title_ =
"",
261 const std::string & indent_ =
"",
262 bool inherit_ =
false)
const;
302 tree_item * _node_from_index_(
const QModelIndex & index_)
const;
308 std::string _registry_name_;
311 boost::scoped_ptr<std::string> _restore_buffer_;
321 #endif // DATATOOLS_CONFIGURATION_UI_VARIANT_REGISTRY_TREE_MODEL_H
Utilities for logging information.