projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manpage: Document the new 'b' keyboard shortcut.
[pulseview.git]
/
pv
/
view
/
cursor.hpp
diff --git
a/pv/view/cursor.hpp
b/pv/view/cursor.hpp
index 5df0ca2c3e4b34e176717a1175c0f6febdcec560..e64beaa9f626d68e6de7ebcd090231a6f73892da 100644
(file)
--- a/
pv/view/cursor.hpp
+++ b/
pv/view/cursor.hpp
@@
-18,8
+18,8
@@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_VIEW_CURSOR_H
-#define PULSEVIEW_PV_VIEW_CURSOR_H
+#ifndef PULSEVIEW_PV_VIEW_CURSOR_H
PP
+#define PULSEVIEW_PV_VIEW_CURSOR_H
PP
#include "timemarker.hpp"
#include "timemarker.hpp"
@@
-37,14
+37,7
@@
class Cursor : public TimeMarker
Q_OBJECT
public:
Q_OBJECT
public:
- static const QColor LineColour;
static const QColor FillColour;
static const QColor FillColour;
- static const QColor HighlightColour;
- static const QColor TextColour;
-
- static const int Offset;
-
- static const int ArrowSize;
public:
/**
public:
/**
@@
-56,29
+49,27
@@
public:
public:
/**
public:
/**
- * Gets the marker label rectangle.
- * @param rect The rectangle of the ruler client area.
- * @return Returns the label rectangle.
+ * Returns true if the item is visible and enabled.
*/
*/
-
QRectF get_label_rect(const QRect &rect
) const;
+
bool enabled(
) const;
/**
/**
- * Paints the cursor's label to the ruler.
- * @param p The painter to draw with.
+ * Gets the text to show in the marker.
+ */
+ QString get_text() const;
+
+ /**
+ * Gets the marker label rectangle.
* @param rect The rectangle of the ruler client area.
* @param rect The rectangle of the ruler client area.
+ * @return Returns the label rectangle.
*/
*/
-
void paint_label(QPainter &p, const QRect &rect)
;
+
QRectF label_rect(const QRectF &rect) const
;
private:
private:
- void compute_text_size(QPainter &p, unsigned int prefix);
-
std::shared_ptr<Cursor> get_other_cursor() const;
std::shared_ptr<Cursor> get_other_cursor() const;
-
-private:
- QSizeF text_size_;
};
} // namespace view
} // namespace pv
};
} // namespace view
} // namespace pv
-#endif // PULSEVIEW_PV_VIEW_CURSOR_H
+#endif // PULSEVIEW_PV_VIEW_CURSOR_H
PP