42#include <QAbstractItemModel>
44#include <QStyledItemDelegate>
52class MotionPlanningFrameJointsUI;
77 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
78 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
79 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
80 QVariant
data(
const QModelIndex& index,
int role)
const override;
81 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
82 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
105 const QModelIndex& index)
const;
116 bool eventFilter(QObject* target, QEvent* event)
override;
131 const robot_interaction::InteractionHandlerPtr& start_state_handler,
132 const robot_interaction::InteractionHandlerPtr& goal_state_handler);
146 Ui::MotionPlanningFrameJointsUI* ui_;
148 robot_interaction::InteractionHandlerPtr start_state_handler_;
149 robot_interaction::InteractionHandlerPtr goal_state_handler_;
150 std::unique_ptr<JMGItemModel> start_state_model_;
151 std::unique_ptr<JMGItemModel> goal_state_model_;
153 bool ignore_state_changes_ =
false;
155 Eigen::JacobiSVD<Eigen::MatrixXd> svd_;
156 Eigen::MatrixXd nullspace_;
157 std::vector<QSlider*> ns_sliders_;
176 void paint(QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
177 QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
180 void commitAndCloseEditor();
191 ProgressBarEditor(QWidget* parent =
nullptr,
double min = -1.0,
double max = 0.0,
int digits = 0);
232 return timer_interval_;
239 return QSlider::value() * maximum_ / QSlider::maximum();
248 using QSlider::setMaximum;
249 using QSlider::setMinimum;
250 using QSlider::setRange;
#define MOVEIT_CLASS_FORWARD(C)
A joint from the robot. Models the transform that this joint applies in the kinematic chain....
Representation of a robot's state. This includes position, velocity, acceleration and effort.
const moveit::core::RobotState & getRobotState() const
int columnCount(const QModelIndex &parent=QModelIndex()) const override
const moveit::core::JointModelGroup * getJointModelGroup() const
Qt::ItemFlags flags(const QModelIndex &index) const override
QVariant data(const QModelIndex &index, int role) const override
moveit::core::RobotState & getRobotState()
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
void updateRobotState(const moveit::core::RobotState &state)
call this on any external change of the RobotState
int rowCount(const QModelIndex &parent=QModelIndex()) const override
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Slider that jumps back to zero.
void setResolution(unsigned int resolution)
int timerInterval() const
void setTimerInterval(int ms)
void triggered(double value)
void mousePressEvent(QMouseEvent *event) override
void mouseReleaseEvent(QMouseEvent *event) override
void setMaximum(double value)
void timerEvent(QTimerEvent *event) override
Delegate to show the joint value as with a progress bar indicator between min and max.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
ProgressBarDelegate(QWidget *parent=nullptr)
Number editor via progress bar dragging.
void mouseMoveEvent(QMouseEvent *event) override
void setValue(double value)
void mouseReleaseEvent(QMouseEvent *event) override
void paintEvent(QPaintEvent *event) override
void valueChanged(double value)
void mousePressEvent(QMouseEvent *event) override