]> sigrok.org Git - pulseview.git/commitdiff
Removed SigSession from Trace
authorJoel Holdsworth <redacted>
Mon, 10 Feb 2014 21:46:18 +0000 (21:46 +0000)
committerJoel Holdsworth <redacted>
Tue, 11 Feb 2014 21:44:46 +0000 (21:44 +0000)
pv/sigsession.cpp
pv/view/analogsignal.cpp
pv/view/analogsignal.h
pv/view/decodetrace.cpp
pv/view/decodetrace.h
pv/view/logicsignal.cpp
pv/view/logicsignal.h
pv/view/signal.cpp
pv/view/signal.h
pv/view/trace.cpp
pv/view/trace.h

index a2f44dab1aaf01a462ef8383f83759f5b8147925..5da1551fc51cee4e1e5e3f539654359280933c37 100644 (file)
@@ -442,7 +442,7 @@ void SigSession::update_signals(shared_ptr<DevInst> dev_inst)
                        switch(probe->type) {
                        case SR_PROBE_LOGIC:
                                signal = shared_ptr<view::Signal>(
-                                       new view::LogicSignal(*this, dev_inst,
+                                       new view::LogicSignal(dev_inst,
                                                probe, _logic_data));
                                break;
 
@@ -451,7 +451,7 @@ void SigSession::update_signals(shared_ptr<DevInst> dev_inst)
                                shared_ptr<data::Analog> data(
                                        new data::Analog());
                                signal = shared_ptr<view::Signal>(
-                                       new view::AnalogSignal(*this, dev_inst,
+                                       new view::AnalogSignal(dev_inst,
                                                probe, data));
                                break;
                        }
index 84e55cc3b6e0a2f9c48b1554395f69d8c9490606..292d5f9e55809c0cf755af8ace4b141abdd7678c 100644 (file)
@@ -44,10 +44,9 @@ const QColor AnalogSignal::SignalColours[4] = {
 
 const float AnalogSignal::EnvelopeThreshold = 256.0f;
 
-AnalogSignal::AnalogSignal(pv::SigSession &session,
-       shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
-       shared_ptr<data::Analog> data) :
-       Signal(session, dev_inst, probe),
+AnalogSignal::AnalogSignal(shared_ptr<pv::DevInst> dev_inst,
+       sr_probe *const probe, shared_ptr<data::Analog> data) :
+       Signal(dev_inst, probe),
        _data(data),
        _scale(1.0f)
 {
index 7c506a7a652378f24b5b30c0526d28e3d394aa7b..a312b3e8ab41a7387d30348f8abf53970ef72c0c 100644 (file)
@@ -42,8 +42,8 @@ private:
        static const float EnvelopeThreshold;
 
 public:
-       AnalogSignal(pv::SigSession &session,
-               boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
+       AnalogSignal(boost::shared_ptr<pv::DevInst> dev_inst,
+               sr_probe *const probe,
                boost::shared_ptr<pv::data::Analog> data);
 
        virtual ~AnalogSignal();
index 61f285657d48a147833b4489aaf887a5d1f87888..ddf006ce9139e6c35792ffb128360a0e7ee89705 100644 (file)
@@ -111,8 +111,9 @@ const QColor DecodeTrace::OutlineColours[16] = {
 
 DecodeTrace::DecodeTrace(pv::SigSession &session,
        boost::shared_ptr<pv::data::DecoderStack> decoder_stack, int index) :
-       Trace(session, QString::fromUtf8(
+       Trace(QString::fromUtf8(
                decoder_stack->stack().front()->decoder()->name)),
+       _session(session),
        _decoder_stack(decoder_stack),
        _delete_mapper(this),
        _show_hide_mapper(this)
index cd8a82d667f83b24cc5a123a9592cbe0f1399ec0..08558c98091af6668dca55c992df1784ee51c595 100644 (file)
@@ -39,6 +39,8 @@ class QComboBox;
 
 namespace pv {
 
+class SigSession;
+
 namespace data {
 class DecoderStack;
 
@@ -158,6 +160,7 @@ private slots:
        void on_show_hide_decoder(int index);
 
 private:
+       pv::SigSession &_session;
        boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
 
        uint64_t _decode_start, _decode_end;
index 57a988c38e736fc908c99cbd0b64d337a871c910..7eb56da649b1ab2f68bf05c1819ffd017f5caeff 100644 (file)
@@ -63,10 +63,9 @@ const QColor LogicSignal::SignalColours[10] = {
        QColor(0xEE, 0xEE, 0xEC),       // White
 };
 
-LogicSignal::LogicSignal(pv::SigSession &session,
-       shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
-       shared_ptr<data::Logic> data) :
-       Signal(session, dev_inst, probe),
+LogicSignal::LogicSignal(shared_ptr<pv::DevInst> dev_inst,
+       sr_probe *const probe, shared_ptr<data::Logic> data) :
+       Signal(dev_inst, probe),
        _data(data),
        _trigger_none(NULL),
        _trigger_rising(NULL),
index 701dbbf7b03bad413a9e610787607e2e6a314b39..cc63884e586b9f5ae253067e25aa3303be8af3cc 100644 (file)
@@ -49,8 +49,8 @@ private:
        static const QColor SignalColours[10];
 
 public:
-       LogicSignal(pv::SigSession &session,
-               boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe,
+       LogicSignal(boost::shared_ptr<pv::DevInst> dev_inst,
+               sr_probe *const probe,
                boost::shared_ptr<pv::data::Logic> data);
 
        virtual ~LogicSignal();
index ba1271b0c4251afee4f3dedfff8b534d59a3d647..f054eb2a6a2546f57eacef1025f1a0d54079bf77 100644 (file)
@@ -54,9 +54,9 @@ const char *const ProbeNames[] = {
        "SCL"
 };
 
-Signal::Signal(pv::SigSession &session, shared_ptr<pv::DevInst> dev_inst,
+Signal::Signal(shared_ptr<pv::DevInst> dev_inst,
        sr_probe *const probe) :
-       Trace(session, probe->name),
+       Trace(probe->name),
        _dev_inst(dev_inst),
        _probe(probe),
        _name_widget(NULL),
index 70b908b1030efe928bcc011fd244998cbf94e305..a8642d244240f501fc39632318218d319f9047eb 100644 (file)
@@ -47,8 +47,7 @@ class Signal : public Trace
        Q_OBJECT
 
 protected:
-       Signal(pv::SigSession &session, boost::shared_ptr<pv::DevInst> dev_inst,
-               sr_probe *const probe);
+       Signal(boost::shared_ptr<pv::DevInst> dev_inst, sr_probe *const probe);
 
 public:
        /**
index 4fe9628c587e19228dbf013841045c0a3c67f891..d4bc69f2f93346222c57861d5b26c4bc3157754f 100644 (file)
@@ -40,8 +40,7 @@ namespace view {
 const QPen Trace::AxisPen(QColor(128, 128, 128, 64));
 const int Trace::LabelHitPadding = 2;
 
-Trace::Trace(pv::SigSession &session, QString name) :
-       _session(session),
+Trace::Trace(QString name) :
        _name(name),
        _v_offset(0),
        _popup(NULL),
index 2d8c7cf1f17d35bafec31ac567c3ba66d94bc56a..ace93d507a0a6c5832ff34f115468e400d360854 100644 (file)
@@ -34,9 +34,6 @@
 class QFormLayout;
 
 namespace pv {
-
-class SigSession;
-
 namespace view {
 
 class View;
@@ -50,7 +47,7 @@ private:
        static const int LabelHitPadding;
 
 protected:
-       Trace(SigSession &session, QString name);
+       Trace(QString name);
 
 public:
        /**
@@ -189,7 +186,6 @@ signals:
        void colour_changed();
 
 protected:
-       pv::SigSession &_session;
        pv::view::View *_view;
 
        QString _name;