connect(&m_edit, SIGNAL(modified()), this, SIGNAL(modified()));
connect(&m_edit, SIGNAL(currentPoint(const BPoint&)), this, SLOT(slotUpdatePointEntries(const BPoint&)));
- connect(m_pX, SIGNAL(valueChanged(double, bool)), this, SLOT(slotUpdatePointP()));
- connect(m_pY, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointP()));
- connect(m_h1X, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH1()));
- connect(m_h1Y, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH1()));
- connect(m_h2X, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH2()));
- connect(m_h2Y, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH2()));
+ connect(m_pX, SIGNAL(valueChanged(double, bool)), this, SLOT(slotUpdatePointP(double, bool)));
+ connect(m_pY, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointP(double, bool)));
+ connect(m_h1X, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH1(double, bool)));
+ connect(m_h1Y, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH1(double, bool)));
+ connect(m_h2X, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH2(double, bool)));
+ connect(m_h2Y, SIGNAL(valueChanged(double,bool)), this, SLOT(slotUpdatePointH2(double, bool)));
connect(m_ui.buttonLinkHandles, SIGNAL(toggled(bool)), this, SLOT(slotSetHandlesLinked(bool)));
connect(m_ui.buttonZoomIn, SIGNAL(clicked()), &m_edit, SLOT(slotZoomIn()));
blockSignals(false);
}
-void BezierSplineWidget::slotUpdatePointP()
+void BezierSplineWidget::slotUpdatePointP(double value, bool final)
{
+ Q_UNUSED(value)
+
BPoint p = m_edit.getCurrentPoint();
p.setP(QPointF(m_pX->value(), m_pY->value()));
- m_edit.updateCurrentPoint(p);
+ m_edit.updateCurrentPoint(p, final);
}
-void BezierSplineWidget::slotUpdatePointH1()
+void BezierSplineWidget::slotUpdatePointH1(double value, bool final)
{
+ Q_UNUSED(value)
+
BPoint p = m_edit.getCurrentPoint();
p.setH1(QPointF(m_h1X->value(), m_h1Y->value()));
- m_edit.updateCurrentPoint(p);
+ m_edit.updateCurrentPoint(p, final);
}
-void BezierSplineWidget::slotUpdatePointH2()
+void BezierSplineWidget::slotUpdatePointH2(double value, bool final)
{
+ Q_UNUSED(value)
+
BPoint p = m_edit.getCurrentPoint();
p.setH2(QPointF(m_h2X->value(), m_h2Y->value()));
- m_edit.updateCurrentPoint(p);
+ m_edit.updateCurrentPoint(p, final);
}
void BezierSplineWidget::slotSetHandlesLinked(bool linked)
/** @brief Sets the spinboxes for modifing the selected point to @param p. */
void slotUpdatePointEntries(const BPoint &p);
- /** @brief Updates the editor and thus the spline if the current point's p was modified using the spinboxes. */
- void slotUpdatePointP();
- /** @brief Updates the editor and thus the spline if the current point's h1 was modified using the spinboxes. */
- void slotUpdatePointH1();
- /** @brief Updates the editor and thus the spline if the current point's h2 was modified using the spinboxes. */
- void slotUpdatePointH2();
+ /** @brief Updates the spline if the current point's p was modified using the spinboxes.
+ * @param value (optional) not used, neccessary to be able to connect to DragValue's valueChanged.
+ * @param final (default = true) emit signal modified? */
+ void slotUpdatePointP(double value = 1, bool final = true);
+ /** @brief Updates the spline if the current point's h1 was modified using the spinboxes.
+ * @param value (optional) not used, neccessary to be able to connect to DragValue's valueChanged.
+ * @param final (default = true) emit signal modified? */
+ void slotUpdatePointH1(double value = 1, bool final = true);
+ /** @brief Updates the spline if the current point's h2 was modified using the spinboxes.
+ * @param value (optional) not used, neccessary to be able to connect to DragValue's valueChanged.
+ * @param final (default = true) emit signal modified? */
+ void slotUpdatePointH2(double value = 1, bool final = true);
/** @brief Increases the number of lines in the editor's grid. If there are already 8 lines the number is set to 0. */
void slotGridChange();