*/
bool pt_in_label_rect(int left, int right, const QPoint &point);
+ virtual QMenu* create_context_menu(QWidget *parent);
+
protected:
/**
* Gets the y-offset of the axis.
*/
int get_y() const;
+ /**
+ * Gets the text colour.
+ * @remarks This colour is computed by comparing the lightness
+ * of the trace colour against a threshold to determine whether
+ * white or black would be more visible.
+ */
+ QColor get_text_colour() const;
+
/**
* Paints a zero axis across the viewport.
* @param p the QPainter to paint into.
*/
QRectF get_label_rect(int right);
+private slots:
+ void on_action_set_name_triggered();
+
+ void on_action_set_colour_triggered();
+
signals:
void text_changed();