X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdata%2Flogic.hpp;h=d11e0cca67677b5a833ef66fb9390ed4237a406e;hb=e4e5a958507a2c4e2643f21e3c735021da97e577;hp=baad18f79bd82048c40f6a76872975ab6066ad3a;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f;p=pulseview.git
diff --git a/pv/data/logic.hpp b/pv/data/logic.hpp
index baad18f..d11e0cc 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,6 +24,12 @@
#include
+#include
+
+using std::deque;
+using std::shared_ptr;
+using std::vector;
+
namespace pv {
namespace data {
@@ -32,26 +37,37 @@ class LogicSegment;
class Logic : public SignalData
{
+ Q_OBJECT
+
public:
Logic(unsigned int num_channels);
- int get_num_channels() const;
+ unsigned int num_channels() const;
+
+ void push_segment(shared_ptr &segment);
- void push_segment(
- std::shared_ptr &segment);
+ const deque< shared_ptr >& logic_segments() const;
- const std::deque< std::shared_ptr >&
- logic_segments() const;
+ vector< shared_ptr > segments() const;
- std::vector< std::shared_ptr > segments() const;
+ uint32_t get_segment_count() const;
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_;
- std::deque< std::shared_ptr > segments_;
+ deque< shared_ptr > segments_;
};
} // namespace data