projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LogicSegment: Remove constructor requiring sigrok::Logic
[pulseview.git]
/
pv
/
data
/
signalbase.hpp
diff --git
a/pv/data/signalbase.hpp
b/pv/data/signalbase.hpp
index 6667dd76847cab8ce3235c99d6ec19deb73544fb..4889d16acd4bc1ba75878cfe132e2d07b1202193 100644
(file)
--- a/
pv/data/signalbase.hpp
+++ b/
pv/data/signalbase.hpp
@@
-28,10
+28,10
@@
#include <libsigrokcxx/libsigrokcxx.hpp>
#include <libsigrokcxx/libsigrokcxx.hpp>
+using std::shared_ptr;
namespace sigrok {
class Channel;
namespace sigrok {
class Channel;
-class ChannelType;
}
namespace pv {
}
namespace pv {
@@
-46,18
+46,27
@@
class SignalBase : public QObject
{
Q_OBJECT
{
Q_OBJECT
+public:
+ enum ChannelType {
+ AnalogChannel = 1,
+ LogicChannel,
+ DecodeChannel,
+ A2LChannel, // Analog converted to logic, joint representation
+ MathChannel
+ };
+
private:
static const int ColourBGAlpha;
public:
private:
static const int ColourBGAlpha;
public:
- SignalBase(s
td::shared_ptr<sigrok::Channel> channel
);
+ SignalBase(s
hared_ptr<sigrok::Channel> channel, ChannelType channel_type
);
virtual ~SignalBase() {}
public:
/**
* Returns the underlying SR channel.
*/
virtual ~SignalBase() {}
public:
/**
* Returns the underlying SR channel.
*/
- s
td::s
hared_ptr<sigrok::Channel> channel() const;
+ shared_ptr<sigrok::Channel> channel() const;
/**
* Returns enabled status of this channel.
/**
* Returns enabled status of this channel.
@@
-73,7
+82,7
@@
public:
/**
* Gets the type of this channel.
*/
/**
* Gets the type of this channel.
*/
-
const sigrok::ChannelType *
type() const;
+
ChannelType
type() const;
/**
* Gets the index number of this channel.
/**
* Gets the index number of this channel.
@@
-113,25
+122,24
@@
public:
/**
* Sets the internal data object.
*/
/**
* Sets the internal data object.
*/
- void set_data(s
td::s
hared_ptr<pv::data::SignalData> data);
+ void set_data(shared_ptr<pv::data::SignalData> data);
/**
* Get the internal data as analog data object in case of analog type.
*/
/**
* Get the internal data as analog data object in case of analog type.
*/
- s
td::s
hared_ptr<pv::data::Analog> analog_data() const;
+ shared_ptr<pv::data::Analog> analog_data() const;
/**
* Get the internal data as logic data object in case of logic type.
*/
/**
* Get the internal data as logic data object in case of logic type.
*/
- s
td::s
hared_ptr<pv::data::Logic> logic_data() const;
+ shared_ptr<pv::data::Logic> logic_data() const;
#ifdef ENABLE_DECODE
bool is_decode_signal() const;
#ifdef ENABLE_DECODE
bool is_decode_signal() const;
- s
td::s
hared_ptr<pv::data::DecoderStack> decoder_stack() const;
+ shared_ptr<pv::data::DecoderStack> decoder_stack() const;
- void set_decoder_stack(std::shared_ptr<pv::data::DecoderStack>
- decoder_stack);
+ void set_decoder_stack(shared_ptr<pv::data::DecoderStack> decoder_stack);
#endif
void save_settings(QSettings &settings) const;
#endif
void save_settings(QSettings &settings) const;
@@
-146,11
+154,12
@@
Q_SIGNALS:
void colour_changed(const QColor &colour);
private:
void colour_changed(const QColor &colour);
private:
- std::shared_ptr<sigrok::Channel> channel_;
- std::shared_ptr<pv::data::SignalData> data_;
+ shared_ptr<sigrok::Channel> channel_;
+ ChannelType channel_type_;
+ shared_ptr<pv::data::SignalData> data_;
#ifdef ENABLE_DECODE
#ifdef ENABLE_DECODE
- s
td::s
hared_ptr<pv::data::DecoderStack> decoder_stack_;
+ shared_ptr<pv::data::DecoderStack> decoder_stack_;
#endif
QString internal_name_, name_;
#endif
QString internal_name_, name_;