17 #ifndef GAZEBO_GUI_PLOT_VARIABLE_PILL_CONTAINER_HH_
18 #define GAZEBO_GUI_PLOT_VARIABLE_PILL_CONTAINER_HH_
32 class VariablePillContainerPrivate;
50 public:
void SetText(
const std::string &_text);
54 public: std::string Text()
const;
59 public:
void SetMaxSize(
const int _max);
64 public:
int MaxSize()
const;
69 public:
void SetVariablePillLabel(
const unsigned int _id,
70 const std::string &_text);
76 public:
unsigned int AddVariablePill(
const std::string &_name,
87 public:
void RemoveVariablePill(
VariablePill *_variable);
91 public:
void RemoveVariablePill(
const unsigned int _id);
95 public:
unsigned int VariablePillCount()
const;
100 public:
VariablePill *GetVariablePill(
const unsigned int _id)
const;
108 protected:
void dragEnterEvent(QDragEnterEvent *_evt);
112 protected:
void dropEvent(QDropEvent *_evt);
116 protected:
virtual void keyPressEvent(QKeyEvent *_event);
120 protected:
void mouseReleaseEvent(QMouseEvent *_event);
125 private:
bool IsDragValid(QDropEvent *_evt)
const;
133 Q_SIGNALS:
void VariableAdded(
const unsigned int _id,
134 const std::string &_name,
const unsigned int _targetId);
142 Q_SIGNALS:
void VariableRemoved(
const unsigned int _id,
143 const unsigned int _targetId);
150 Q_SIGNALS:
void VariableMoved(
const unsigned int _id,
151 const unsigned int _targetId);
156 Q_SIGNALS:
void VariableLabelChanged(
const unsigned int _id,
157 const std::string &_label);
162 private slots:
void OnAddVariable(
const unsigned int _id,
163 const std::string &_label);
167 private slots:
void OnRemoveVariable(
const unsigned int _id);
171 private slots:
void OnMoveVariable(
const unsigned int _id);
176 private slots:
void OnSetVariableLabel(
const std::string &_label);
180 private: std::unique_ptr<VariablePillContainerPrivate> dataPtr;
static const unsigned int EmptyVariable
Empty variable id used to indicate non-existent variable.
Definition: VariablePill.hh:169
A container for holding variable pills.
Definition: VariablePillContainer.hh:37
A variable pill.
Definition: VariablePill.hh:40