projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement LogicSegment::get_surrounding_edges() and use it
[pulseview.git]
/
pv
/
views
/
trace
/
view.hpp
diff --git
a/pv/views/trace/view.hpp
b/pv/views/trace/view.hpp
index 9529e7a3fee25a3c057a76c5c1c76a5ebc0c4d08..8e78b6260e2143dcbb141ad2a5aa0f1b4836c822 100644
(file)
--- a/
pv/views/trace/view.hpp
+++ b/
pv/views/trace/view.hpp
@@
-31,8
+31,9
@@
#include <QSizeF>
#include <QSplitter>
#include <QSizeF>
#include <QSplitter>
-#include <pv/
data/signaldata
.hpp>
+#include <pv/
globalsettings
.hpp>
#include <pv/util.hpp>
#include <pv/util.hpp>
+#include <pv/data/signaldata.hpp>
#include <pv/views/viewbase.hpp>
#include "cursorpair.hpp"
#include <pv/views/viewbase.hpp>
#include "cursorpair.hpp"
@@
-63,12
+64,10
@@
namespace views {
namespace trace {
namespace trace {
-class CursorHeader;
class DecodeTrace;
class Header;
class Ruler;
class Signal;
class DecodeTrace;
class Header;
class Ruler;
class Signal;
-class Trace;
class Viewport;
class TriggerMarker;
class Viewport;
class TriggerMarker;
@@
-81,7
+80,7
@@
public:
bool viewportEvent(QEvent *event);
};
bool viewportEvent(QEvent *event);
};
-class View : public ViewBase, public TraceTreeItemOwner
+class View : public ViewBase, public TraceTreeItemOwner
, public GlobalSettingsInterface
{
Q_OBJECT
{
Q_OBJECT
@@
-102,6
+101,14
@@
private:
public:
explicit View(Session &session, bool is_main_view=false, QWidget *parent = nullptr);
public:
explicit View(Session &session, bool is_main_view=false, QWidget *parent = nullptr);
+ ~View();
+
+ /**
+ * Resets the view to its default state after construction. It does however
+ * not reset the signal bases or any other connections with the session.
+ */
+ virtual void reset_view_state();
+
Session& session();
const Session& session() const;
Session& session();
const Session& session() const;
@@
-225,8
+232,6
@@
public:
void zoom_fit(bool gui_state);
void zoom_fit(bool gui_state);
- void zoom_one_to_one();
-
/**
* Sets the scale and offset.
* @param scale The new view scale in seconds per pixel.
/**
* Sets the scale and offset.
* @param scale The new view scale in seconds per pixel.
@@
-239,15
+244,15
@@
public:
pair<pv::util::Timestamp, pv::util::Timestamp> get_time_extents() const;
/**
pair<pv::util::Timestamp, pv::util::Timestamp> get_time_extents() const;
/**
- * Enables or disables colo
u
red trace backgrounds. If they're not
- * colo
u
red then they will use alternating colors.
+ * Enables or disables colored trace backgrounds. If they're not
+ * colored then they will use alternating colors.
*/
*/
- void enable_colo
u
red_bg(bool state);
+ void enable_colored_bg(bool state);
/**
/**
- * Returns true if the trace background should be drawn with a colo
u
red background.
+ * Returns true if the trace background should be drawn with a colored background.
*/
*/
- bool colo
u
red_bg() const;
+ bool colored_bg() const;
/**
* Enable or disable showing sampling points.
/**
* Enable or disable showing sampling points.
@@
-298,6
+303,10
@@
public:
void restack_all_trace_tree_items();
void restack_all_trace_tree_items();
+ int header_width() const;
+
+ void on_setting_changed(const QString &key, const QVariant &value);
+
Q_SIGNALS:
void hover_point_changed(const QPoint &hp);
Q_SIGNALS:
void hover_point_changed(const QPoint &hp);
@@
-332,6
+341,9
@@
Q_SIGNALS:
/// @param mode is a value of Trace::SegmentDisplayMode
void segment_display_mode_changed(int mode, bool segment_selectable);
/// @param mode is a value of Trace::SegmentDisplayMode
void segment_display_mode_changed(int mode, bool segment_selectable);
+ /// Emitted when the cursors are shown/hidden
+ void cursor_state_changed(bool show);
+
public Q_SLOTS:
void trigger_event(int segment_id, util::Timestamp location);
public Q_SLOTS:
void trigger_event(int segment_id, util::Timestamp location);
@@
-382,6
+394,8
@@
private:
bool eventFilter(QObject *object, QEvent *event);
bool eventFilter(QObject *object, QEvent *event);
+ virtual void contextMenuEvent(QContextMenuEvent *event);
+
void resizeEvent(QResizeEvent *event);
void update_hover_point();
void resizeEvent(QResizeEvent *event);
void update_hover_point();
@@
-485,7
+499,7
@@
private:
bool header_was_shrunk_;
bool sticky_scrolling_;
bool header_was_shrunk_;
bool sticky_scrolling_;
- bool colo
u
red_bg_;
+ bool colored_bg_;
bool always_zoom_to_fit_;
pv::util::Timestamp tick_period_;
bool always_zoom_to_fit_;
pv::util::Timestamp tick_period_;