return make_pair(-NominalHeight / 2, NominalHeight / 2);
}
+int AnalogSignal::scale_handle_offset() const
+{
+ return -NominalHeight / 3;
+}
+
+void AnalogSignal::scale_handle_dragged(int offset)
+{
+ (void)offset;
+}
+
void AnalogSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
if (channel_->enabled())
*/
std::pair<int, int> v_extents() const;
+ /**
+ * Returns the offset to show the drag handle.
+ */
+ int scale_handle_offset() const;
+
+ /**
+ * Handles the scale handle being dragged to an offset.
+ * @param offset the offset the scale handle was dragged to.
+ */
+ void scale_handle_dragged(int offset);
+
/**
* Paints the background layer of the signal with a QPainter
* @param p the QPainter to paint into.
return make_pair(-SignalHeight - SignalMargin, SignalMargin);
}
+int LogicSignal::scale_handle_offset() const
+{
+ return SignalHeight;
+}
+
+void LogicSignal::scale_handle_dragged(int offset)
+{
+ (void)offset;
+}
+
void LogicSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
if (channel_->enabled())
*/
std::pair<int, int> v_extents() const;
+ /**
+ * Returns the offset to show the drag handle.
+ */
+ int scale_handle_offset() const;
+
+ /**
+ * Handles the scale handle being dragged to an offset.
+ * @param offset the offset the scale handle was dragged to.
+ */
+ void scale_handle_dragged(int offset);
+
/**
* Paints the background layer of the signal with a QPainter
* @param p the QPainter to paint into.
void delete_pressed();
+ /**
+ * Returns the offset to show the drag handle.
+ */
+ virtual int scale_handle_offset() const = 0;
+
+ /**
+ * Handles the scale handle being dragged to an offset.
+ * @param offset the offset the scale handle was dragged to.
+ */
+ virtual void scale_handle_dragged(int offset) = 0;
+
+ /**
+ * Handles the scale handle being being released.
+ */
+ virtual void scale_handle_released() {};
+
private Q_SLOTS:
void on_disable();