projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Device: Make capability listing more robust
[pulseview.git]
/
pv
/
view
/
cursor.hpp
diff --git
a/pv/view/cursor.hpp
b/pv/view/cursor.hpp
index 8679a2866c3b986e33532b71a660abc651dba031..e78920e2c3e8df29572fb1d7cd6e62e5b9033e97 100644
(file)
--- a/
pv/view/cursor.hpp
+++ b/
pv/view/cursor.hpp
@@
-14,12
+14,11
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
*/
-#ifndef PULSEVIEW_PV_VIEW
_CURSOR_H
-#define PULSEVIEW_PV_VIEW
_CURSOR_H
+#ifndef PULSEVIEW_PV_VIEW
S_TRACEVIEW_CURSOR_HPP
+#define PULSEVIEW_PV_VIEW
S_TRACEVIEW_CURSOR_HPP
#include "timemarker.hpp"
#include "timemarker.hpp"
@@
-27,24
+26,20
@@
#include <QSizeF>
#include <QSizeF>
+using std::shared_ptr;
+
class QPainter;
namespace pv {
class QPainter;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
class Cursor : public TimeMarker
{
Q_OBJECT
public:
class Cursor : public TimeMarker
{
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,31
+51,28
@@
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.
- * @param rect The rectangle of the ruler client area.
- * @param prefix The index of the SI prefix to use.
+ * Gets the text to show in the marker.
*/
*/
- void paint_label(QPainter &p, const QRect &rect,
- unsigned int prefix);
+ QString get_text() const;
-private:
- void compute_text_size(QPainter &p, unsigned int prefix);
-
- std::shared_ptr<Cursor> get_other_cursor() const;
+ /**
+ * Gets the marker label rectangle.
+ * @param rect The rectangle of the ruler client area.
+ * @return Returns the label rectangle.
+ */
+ QRectF label_rect(const QRectF &rect) const;
private:
private:
-
QSizeF text_size_
;
+
shared_ptr<Cursor> get_other_cursor() const
;
};
};
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv
} // namespace pv
-#endif // PULSEVIEW_PV_VIEW
_CURSOR_H
+#endif // PULSEVIEW_PV_VIEW
S_TRACEVIEW_CURSOR_HPP