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
/// 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;
* 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.
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:
void resizeEvent(QResizeEvent*) override;
private Q_SLOTS:
- void hover_point_changed();
+ void hover_point_changed(const QPoint &hp);
// Resets the 'tick_position_cache_'.
void invalidate_tick_position_cache();