projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix variable naming
[pulseview.git]
/
pv
/
views
/
trace
/
viewitem.hpp
diff --git
a/pv/views/trace/viewitem.hpp
b/pv/views/trace/viewitem.hpp
index f3e0f9b67f5470b6942ae52d10351a2c58ea5db2..5ce3bb608ec68156ba06c53b12409619e9772ec9 100644
(file)
--- a/
pv/views/trace/viewitem.hpp
+++ b/
pv/views/trace/viewitem.hpp
@@
-23,6
+23,7
@@
#include <list>
#include <QPen>
#include <list>
#include <QPen>
+#include <QPoint>
#include "viewitempaintparams.hpp"
#include "viewitempaintparams.hpp"
@@
-52,12
+53,16
@@
public:
public:
ViewItem();
public:
ViewItem();
-public:
/**
* Returns true if the item is visible and enabled.
*/
virtual bool enabled() const = 0;
/**
* Returns true if the item is visible and enabled.
*/
virtual bool enabled() const = 0;
+ /**
+ * Returns true if the item may be selected.
+ */
+ virtual bool is_selectable(QPoint pos) const;
+
/**
* Returns true if the item has been selected by the user.
*/
/**
* Returns true if the item has been selected by the user.
*/
@@
-71,7
+76,7
@@
public:
/**
* Returns true if the item may be dragged/moved.
*/
/**
* Returns true if the item may be dragged/moved.
*/
- virtual bool is_draggable() const;
+ virtual bool is_draggable(
QPoint pos
) const;
/**
* Returns true if the item is being dragged.
/**
* Returns true if the item is being dragged.
@@
-145,7
+150,6
@@
public:
*/
virtual void paint_fore(QPainter &p, ViewItemPaintParams &pp);
*/
virtual void paint_fore(QPainter &p, ViewItemPaintParams &pp);
-public:
/**
* Gets the text color.
* @remarks This color is computed by comparing the lightness
/**
* Gets the text color.
* @remarks This color is computed by comparing the lightness
@@
-155,7
+159,9
@@
public:
static QColor select_text_color(QColor background);
public:
static QColor select_text_color(QColor background);
public:
- virtual QMenu* create_context_menu(QWidget *parent);
+ virtual QMenu* create_header_context_menu(QWidget *parent);
+
+ virtual QMenu* create_view_context_menu(QWidget *parent, QPoint &click_pos);
virtual pv::widgets::Popup* create_popup(QWidget *parent);
virtual pv::widgets::Popup* create_popup(QWidget *parent);