projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
org.sigrok.PulseView.appdata.xml: Add <mimetype> tag.
[pulseview.git]
/
pv
/
view
/
view.hpp
diff --git
a/pv/view/view.hpp
b/pv/view/view.hpp
index e083fa13fdc1899d31da1ad6fe5978ebc2bb5483..8ef8812cf5443aaaf1553343eeda27df6b77073b 100644
(file)
--- a/
pv/view/view.hpp
+++ b/
pv/view/view.hpp
@@
-20,8
+20,7
@@
#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEW_HPP
#define PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEW_HPP
#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEW_HPP
#define PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEW_HPP
-#include <stdint.h>
-
+#include <cstdint>
#include <list>
#include <memory>
#include <set>
#include <list>
#include <memory>
#include <set>
@@
-30,11
+29,10
@@
#include <QAbstractScrollArea>
#include <QSizeF>
#include <QAbstractScrollArea>
#include <QSizeF>
-#include <QTimer>
#include <pv/data/signaldata.hpp>
#include <pv/data/signaldata.hpp>
-#include <pv/views/viewbase.hpp>
#include <pv/util.hpp>
#include <pv/util.hpp>
+#include <pv/views/viewbase.hpp>
#include "cursorpair.hpp"
#include "flag.hpp"
#include "cursorpair.hpp"
#include "flag.hpp"
@@
-55,6
+53,10
@@
namespace pv {
class Session;
class Session;
+namespace data {
+class Logic;
+}
+
namespace views {
namespace TraceView {
namespace views {
namespace TraceView {
@@
-68,16
+70,18
@@
class Trace;
class Viewport;
class TriggerMarker;
class Viewport;
class TriggerMarker;
-class CustomAbstractScrollArea : public QAbstractScrollArea {
+class CustomAbstractScrollArea : public QAbstractScrollArea
+{
Q_OBJECT
public:
Q_OBJECT
public:
- CustomAbstractScrollArea(QWidget *parent =
0
);
+ CustomAbstractScrollArea(QWidget *parent =
nullptr
);
void setViewportMargins(int left, int top, int right, int bottom);
bool viewportEvent(QEvent *event);
};
void setViewportMargins(int left, int top, int right, int bottom);
bool viewportEvent(QEvent *event);
};
-class View : public ViewBase, public TraceTreeItemOwner {
+class View : public ViewBase, public TraceTreeItemOwner
+{
Q_OBJECT
private:
Q_OBJECT
private:
@@
-91,12
+95,11
@@
private:
static const pv::util::Timestamp MinScale;
static const int MaxScrollValue;
static const pv::util::Timestamp MinScale;
static const int MaxScrollValue;
- static const int MaxViewAutoUpdateRate;
static const int ScaleUnits[3];
public:
static const int ScaleUnits[3];
public:
- explicit View(Session &session, bool is_main_view=false, QWidget *parent =
0
);
+ explicit View(Session &session, bool is_main_view=false, QWidget *parent =
nullptr
);
Session& session();
const Session& session() const;
Session& session();
const Session& session() const;
@@
-108,7
+111,7
@@
public:
virtual void clear_signals();
virtual void clear_signals();
- v
irtual v
oid add_signal(const shared_ptr<Signal> signal);
+ void add_signal(const shared_ptr<Signal> signal);
#ifdef ENABLE_DECODE
virtual void clear_decode_signals();
#ifdef ENABLE_DECODE
virtual void clear_decode_signals();
@@
-211,11
+214,21
@@
public:
*/
void enable_coloured_bg(bool state);
*/
void enable_coloured_bg(bool state);
+ /**
+ * Returns true if the trace background should be drawn with a coloured background.
+ */
+ bool coloured_bg() const;
+
/**
* Enable or disable showing sampling points.
*/
void enable_show_sampling_points(bool state);
/**
* Enable or disable showing sampling points.
*/
void enable_show_sampling_points(bool state);
+ /**
+ * Enable or disable showing the analog minor grid.
+ */
+ void enable_show_analog_minor_grid(bool state);
+
/**
* Returns true if cursors are displayed. false otherwise.
*/
/**
* Returns true if cursors are displayed. false otherwise.
*/
@@
-302,6
+315,8
@@
private:
*/
void calculate_tick_spacing();
*/
void calculate_tick_spacing();
+ void adjust_top_margin();
+
void update_scroll();
void reset_scroll();
void update_scroll();
void reset_scroll();
@@
-341,9
+356,8
@@
private Q_SLOTS:
void signals_changed();
void capture_state_updated(int state);
void signals_changed();
void capture_state_updated(int state);
- void data_updated();
- void perform_delayed_view_update();
+ v
irtual v
oid perform_delayed_view_update();
void process_sticky_events();
void process_sticky_events();
@@
-408,7
+422,6
@@
private:
bool sticky_scrolling_;
bool coloured_bg_;
bool always_zoom_to_fit_;
bool sticky_scrolling_;
bool coloured_bg_;
bool always_zoom_to_fit_;
- QTimer delayed_view_updater_;
pv::util::Timestamp tick_period_;
pv::util::SIPrefix tick_prefix_;
pv::util::Timestamp tick_period_;
pv::util::SIPrefix tick_prefix_;
@@
-433,8
+446,6
@@
private:
// A nonzero value indicates the v offset to restore. See View::resizeEvent()
int saved_v_offset_;
// A nonzero value indicates the v offset to restore. See View::resizeEvent()
int saved_v_offset_;
-
- bool size_finalized_;
};
} // namespace TraceView
};
} // namespace TraceView