projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AnalogSignal: Apply scale handle dragging
[pulseview.git]
/
pv
/
view
/
analogsignal.hpp
diff --git
a/pv/view/analogsignal.hpp
b/pv/view/analogsignal.hpp
index 58c2d3cb7b622e419ce1fcb19d83ed5edf7480fb..aa53f9ddb25ab49c500a93c56f6c4660c879eab5 100644
(file)
--- a/
pv/view/analogsignal.hpp
+++ b/
pv/view/analogsignal.hpp
@@
-70,6
+70,11
@@
public:
*/
void scale_handle_dragged(int offset);
*/
void scale_handle_dragged(int offset);
+ /**
+ * @copydoc pv::view::Signal::signal_scale_handle_drag_release()
+ */
+ void scale_handle_drag_release();
+
/**
* Paints the background layer of the signal with a QPainter
* @param p the QPainter to paint into.
/**
* Paints the background layer of the signal with a QPainter
* @param p the QPainter to paint into.
@@
-95,9
+100,16
@@
private:
int y, int left, const int64_t start, const int64_t end,
const double pixels_offset, const double samples_per_pixel);
int y, int left, const int64_t start, const int64_t end,
const double pixels_offset, const double samples_per_pixel);
+ /**
+ * Computes the scale factor from the scale index.
+ */
+ float scale() const;
+
private:
std::shared_ptr<pv::data::Analog> data_;
private:
std::shared_ptr<pv::data::Analog> data_;
- float scale_;
+
+ int scale_index_;
+ int scale_index_drag_offset_;
};
} // namespace view
};
} // namespace view