]> sigrok.org Git - pulseview.git/blobdiff - pv/data/analog.hpp
Fix random clazy warnings
[pulseview.git] / pv / data / analog.hpp
index 777deb6d01b4e161905bb8830f184c1a0d164624..c0b9a0134d72d9b5028f75b5d19040a71d81c991 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
  */
 
 #ifndef PULSEVIEW_PV_DATA_ANALOG_HPP
 #include <deque>
 #include <memory>
 
+#include <QObject>
+
+using std::deque;
+using std::shared_ptr;
+using std::vector;
+
 namespace pv {
 namespace data {
 
@@ -33,23 +38,40 @@ class AnalogSegment;
 
 class Analog : public SignalData
 {
+       Q_OBJECT
+
 public:
        Analog();
 
-       void push_segment(
-               std::shared_ptr<AnalogSegment> &segment);
+       void push_segment(shared_ptr<AnalogSegment> &segment);
 
-       const std::deque< std::shared_ptr<AnalogSegment> >&
-               analog_segments() const;
+       const deque< shared_ptr<AnalogSegment> >& analog_segments() const;
 
-       std::vector< std::shared_ptr<Segment> > segments() const;
+       vector< shared_ptr<Segment> > segments() const;
+
+       uint32_t get_segment_count() const;
 
        void clear();
 
-       uint64_t get_max_sample_count() const;
+       double get_samplerate() const;
+
+       uint64_t max_sample_count() const;
+
+       void notify_samples_added(QObject* segment, uint64_t start_sample,
+               uint64_t end_sample);
+
+       void notify_min_max_changed(float min, float max);
+
+Q_SIGNALS:
+       void samples_cleared();
+
+       void samples_added(QObject* segment, uint64_t start_sample,
+               uint64_t end_sample);
+
+       void min_max_changed(float min, float max);
 
 private:
-       std::deque< std::shared_ptr<AnalogSegment> > segments_;
+       deque< shared_ptr<AnalogSegment> > segments_;
 };
 
 } // namespace data