20 #include <QStringList> 22 #include <variant_topic_tools/ArrayDataType.h> 23 #include <variant_topic_tools/BuiltinDataType.h> 24 #include <variant_topic_tools/MessageDataType.h> 40 variant_topic_tools::MessageDataType messageType =
dataType_;
42 for (
size_t i = 0; i < messageType.getNumVariableMembers(); ++i)
44 getType(),
this, QString::fromStdString(messageType.
45 getVariableMember(i).
getName())));
48 variant_topic_tools::ArrayDataType arrayType =
dataType_;
50 if (!arrayType.isDynamic()) {
51 for (
size_t i = 0; i < arrayType.getNumMembers(); ++i)
56 for (
size_t i = 0; i <= 9; ++i)
64 for (QList<MessageFieldItem*>::iterator it =
children_.begin();
86 for (QList<MessageFieldItem*>::const_iterator it =
children_.begin();
88 if ((*it)->name_ == name)
96 QStringList names = path.split(
"/");
98 if (!names.isEmpty()) {
138 QStringList names = path.split(
"/");
140 if (
dataType_.isArray() && QRegExp(
"[1-9][0-9]*").exactMatch(
142 variant_topic_tools::ArrayDataType arrayType =
dataType_;
144 if (arrayType.isDynamic()) {
150 for (
size_t i = 0; i <= 9; ++i)
155 for (
size_t row = 0; row <
children_.count(); ++row) {
159 variant_topic_tools::ArrayDataType arrayType = child->
dataType_;
161 if (arrayType.isDynamic()) {
163 for (
size_t i = 0; i <= 9; ++i)
164 child->
children_[i]->name_ = QString::number(i);
174 if (!names.isEmpty()) {
179 child->
update(names.join(
"/"));
const QString & getName() const
MessageFieldItem(const variant_topic_tools::DataType &dataType, MessageFieldItem *parent=0, const QString &name=QString())
MessageFieldItem * getChild(size_t row) const
size_t getNumColumns() const
const variant_topic_tools::DataType & getDataType() const
MessageFieldItem * parent_
MessageFieldItem * getParent() const
size_t getNumChildren() const
MessageFieldItem * getDescendant(const QString &path) const
void update(const QString &path)
variant_topic_tools::DataType dataType_
void appendChild(MessageFieldItem *child)
QList< MessageFieldItem * > children_