X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Flogicsignal.h;h=958abd8f1890c26f7661ee75884b9d3cc096b3ed;hp=17f6eb26d862eede6bf8c968d7cb5deee8303bb7;hb=18f7104f875a71bceeb152398b682737528a4ad7;hpb=e183f4e328db8bb134652254ba9bf0707dc16c66 diff --git a/pv/view/logicsignal.h b/pv/view/logicsignal.h index 17f6eb26..958abd8f 100644 --- a/pv/view/logicsignal.h +++ b/pv/view/logicsignal.h @@ -23,10 +23,15 @@ #include "signal.h" -#include +#include class QToolBar; +namespace sigrok { + class Device; + class TriggerMatchType; +} + namespace pv { namespace data { @@ -49,15 +54,16 @@ private: static const QColor SignalColours[10]; public: - LogicSignal(boost::shared_ptr dev_inst, - const sr_probe *const probe, - boost::shared_ptr data); + LogicSignal(pv::SigSession &session, + std::shared_ptr device, + std::shared_ptr channel, + std::shared_ptr data); virtual ~LogicSignal(); - boost::shared_ptr data() const; + std::shared_ptr data() const; - boost::shared_ptr logic_data() const; + std::shared_ptr logic_data() const; /** * Paints the background layer of the signal with a QPainter @@ -76,7 +82,6 @@ public: void paint_mid(QPainter &p, int left, int right); private: - void paint_caps(QPainter &p, QLineF *const lines, std::vector< std::pair > &edges, bool level, double samples_per_pixel, double pixels_offset, @@ -84,26 +89,19 @@ private: void init_trigger_actions(QWidget *parent); + QAction* match_action(const sigrok::TriggerMatchType *match); + const sigrok::TriggerMatchType *action_match(QAction *action); void populate_popup_form(QWidget *parent, QFormLayout *form); - - void add_trigger_action(const char *trig_types, char type, - QAction *action); - - void update_trigger_actions(); - - void set_trigger(char type); + void modify_trigger(); -private slots: - void on_trigger_none(); - void on_trigger_rising(); - void on_trigger_high(); - void on_trigger_falling(); - void on_trigger_low(); - void on_trigger_change(); +private Q_SLOTS: + void on_trigger(); private: - boost::shared_ptr _data; + std::shared_ptr _device; + std::shared_ptr _data; + const sigrok::TriggerMatchType *_trigger_match; QToolBar *_trigger_bar; QAction *_trigger_none; QAction *_trigger_rising;