X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Flogic.hpp;h=e7f7a055da3db150f12f8365edf16af3b7aec59c;hb=e9c8e87cf09ad9761bea1193b25d01a87f8e0dd6;hp=baad18f79bd82048c40f6a76872975ab6066ad3a;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f;p=pulseview.git diff --git a/pv/data/logic.hpp b/pv/data/logic.hpp index baad18f7..e7f7a055 100644 --- a/pv/data/logic.hpp +++ b/pv/data/logic.hpp @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ #ifndef PULSEVIEW_PV_DATA_LOGIC_HPP @@ -25,17 +24,21 @@ #include +#include + namespace pv { namespace data { class LogicSegment; -class Logic : public SignalData +class Logic : public QObject, public SignalData { + Q_OBJECT + public: Logic(unsigned int num_channels); - int get_num_channels() const; + unsigned int num_channels() const; void push_segment( std::shared_ptr &segment); @@ -47,7 +50,16 @@ public: void clear(); - uint64_t get_max_sample_count() const; + uint64_t max_sample_count() const; + + void notify_samples_added(QObject* segment, uint64_t start_sample, + uint64_t end_sample); + +Q_SIGNALS: + void samples_cleared(); + + void samples_added(QObject* segment, uint64_t start_sample, + uint64_t end_sample); private: const unsigned int num_channels_;