projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
View: Make TimeItem derivatives snap to edges when ruler-dragged
[pulseview.git]
/
pv
/
views
/
trace
/
ruler.hpp
diff --git
a/pv/views/trace/ruler.hpp
b/pv/views/trace/ruler.hpp
index 661254a7280ebd3ce31d0aaac696db9cdc761031..448204b2410410bb7e78c7f635c2392d49937603 100644
(file)
--- a/
pv/views/trace/ruler.hpp
+++ b/
pv/views/trace/ruler.hpp
@@
-46,6
+46,11
@@
namespace trace {
class TimeItem;
class ViewItem;
class TimeItem;
class ViewItem;
+/**
+ * The Ruler class manages and displays the time scale above the trace canvas.
+ * It may also contain @ref TimeItem instances used to identify or highlight
+ * time-related information.
+ */
class Ruler : public MarginWidget
{
Q_OBJECT
class Ruler : public MarginWidget
{
Q_OBJECT
@@
-58,8
+63,6
@@
private:
/// Height of the ruler in multipes of the text height
static const float RulerHeight;
/// Height of the ruler in multipes of the text height
static const float RulerHeight;
- static const int MinorTickSubdivision;
-
/// Height of the hover arrow in multiples of the text height
static const float HoverArrowSize;
/// Height of the hover arrow in multiples of the text height
static const float HoverArrowSize;
@@
-152,7
+155,7
@@
private:
* Calculates the major and minor tick positions.
*
* @param major_period The period between the major ticks.
* Calculates the major and minor tick positions.
*
* @param major_period The period between the major ticks.
- * @param offset The time at the left border of the ruler.
+ * @param offset The
virtual
time at the left border of the ruler.
* @param scale The scale in seconds per pixel.
* @param width the Width of the ruler.
* @param format_function A function used to format the major tick times.
* @param scale The scale in seconds per pixel.
* @param width the Width of the ruler.
* @param format_function A function used to format the major tick times.
@@
-165,6
+168,7
@@
private:
const pv::util::Timestamp& offset,
const double scale,
const int width,
const pv::util::Timestamp& offset,
const double scale,
const int width,
+ const unsigned int minor_tick_count,
function<QString(const pv::util::Timestamp&)> format_function);
protected:
function<QString(const pv::util::Timestamp&)> format_function);
protected: