17 #ifndef GAZEBO_GUI_PLOT_PALETTE_HH_
18 #define GAZEBO_GUI_PLOT_PALETTE_HH_
71 const QModelIndex &_srcParent)
const;
79 QModelIndex &_srcParent, QString _word)
const;
86 const QModelIndex &_srcParent)
const;
93 const QString &_word)
const;
97 public:
void SetSearch(
const QString &_search);
104 class PalettePrivate;
114 public:
Palette(QWidget *_parent);
120 private:
void FillTopics();
123 private:
void FillModels();
126 private:
void FillSim();
133 private:
void FillFromMsg(google::protobuf::Message *_msg,
134 QStandardItem *_item,
const std::string &_uri);
140 private:
void InsertPoseItem(QStandardItem *_item,
141 const common::URI &_uri,
const std::string &_query);
150 private:
void InsertVector3dItem(QStandardItem *_item,
151 const common::URI &_uri,
const std::string &_query);
157 private:
void InsertQuaterniondItem(QStandardItem *_item,
158 const common::URI &_uri,
const std::string &_query);
164 private:
void InsertAxisItem(QStandardItem *_item,
165 const common::URI &_uri,
const std::string &_query);
169 private slots:
void UpdateSearch(
const QString &_search);
175 private:
void ExpandChildren(QSortFilterProxyModel *_model,
176 QTreeView *_tree,
const QModelIndex &_srcParent)
const;
183 private:
void OnIntrospectionUpdate(
const std::set<std::string> &_items,
193 Q_SIGNALS:
void IntrospectionUpdateSignal(
194 const std::set<std::string> &_items);
198 private slots:
void IntrospectionUpdateSlot(
199 const std::set<std::string> &_items);
203 private slots:
void ExpandTree(
const QModelIndex &_index);
207 private: std::unique_ptr<PalettePrivate> dataPtr;
std::vector< common::Param * > Param_V
Definition: CommonTypes.hh:97
bool hasAcceptedChildren(const int _srcRow, const QModelIndex &_srcParent) const
Check if any of the children is fully accepted.
A complete URI.
Definition: URI.hh:176
bool filterAcceptsRow(const int _srcRow, const QModelIndex &_srcParent) const
Customize so we accept rows where:
bool filterAcceptsRowItself(const int _srcRow, const QModelIndex &_srcParent, QString _word) const
Check if row contains the word on itself.
Customize the proxy model to display search results.
Definition: Palette.hh:47
QString search
Full search string.
Definition: Palette.hh:100
A palette for the plot window, where plottable items can be dragged from.
Definition: Palette.hh:108
void SetSearch(const QString &_search)
Set a new search value.
bool hasChildAcceptsItself(const QModelIndex &_srcParent, const QString &_word) const
Check if any of the children accepts a specific word.