X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fsignalbase.hpp;fp=pv%2Fdata%2Fsignalbase.hpp;h=a55b3fc2d3fa458c7d97f522d2e503674d421ecc;hp=89bfc25298369bf1431e3fa05f325bba1abd0e74;hb=f6a93932056dab5e2f75207b65197b436d4141a5;hpb=144e72c9ec677e7df35d37d7de6e8a18bb3f2ba1 diff --git a/pv/data/signalbase.hpp b/pv/data/signalbase.hpp index 89bfc252..a55b3fc2 100644 --- a/pv/data/signalbase.hpp +++ b/pv/data/signalbase.hpp @@ -87,6 +87,7 @@ private: class SignalBase : public QObject, public enable_shared_from_this { Q_OBJECT + Q_PROPERTY(QString error_message READ get_error_message) public: enum ChannelType { @@ -225,6 +226,11 @@ public: */ QColor bgcolor() const; + /** + * Returns the current error message text. + */ + virtual QString get_error_message() const; + /** * Sets the internal data object. */ @@ -346,7 +352,12 @@ public: void start_conversion(bool delayed_start=false); +protected: + virtual void set_error_message(QString msg); + private: + void stop_conversion(); + bool conversion_is_a2l() const; uint8_t convert_a2l_threshold(float threshold, float value); @@ -359,19 +370,14 @@ private: shared_ptr lsegment); void conversion_thread_proc(); - void stop_conversion(); - Q_SIGNALS: void enabled_changed(const bool &value); - void name_changed(const QString &name); - void color_changed(const QColor &color); - + void error_message_changed(const QString &msg); void conversion_type_changed(const ConversionType t); void samples_cleared(); - void samples_added(uint64_t segment_id, uint64_t start_sample, uint64_t end_sample); @@ -409,6 +415,8 @@ protected: QString internal_name_, name_; QColor color_, bgcolor_; unsigned int index_; + + QString error_message_; }; } // namespace data