SelectableItem();
public:
+ /**
+ * Returns true if the item is visible and enabled.
+ */
+ virtual bool enabled() const = 0;
+
/**
* Returns true if the item has been selected by the user.
*/
*/
virtual QPoint point() const = 0;
+ /**
+ * Computes the outline rectangle of a label.
+ * @param rect the rectangle of the header area.
+ * @return Returns the rectangle of the signal label.
+ */
+ virtual QRectF label_rect(const QRectF &rect) const = 0;
+
+public:
+ /**
+ * 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.
+ */
+ static QColor select_text_colour(QColor background);
+
public:
virtual QMenu* create_context_menu(QWidget *parent);