PulseView  unreleased development snapshot
A Qt-based sigrok GUI
triggermarker.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of the PulseView project.
3  *
4  * Copyright (C) 2014 Joel Holdsworth <joel@airwebreathe.org.uk>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef PULSEVIEW_PV_VIEWS_TRACE_TRIGGERMARKER_HPP
21 #define PULSEVIEW_PV_VIEWS_TRACE_TRIGGERMARKER_HPP
22 
23 #include "timeitem.hpp"
24 
25 #include <QPoint>
26 
27 namespace pv {
28 namespace views {
29 namespace trace {
30 
35 class TriggerMarker : public TimeItem
36 {
37  Q_OBJECT
38 
39 public:
40  static const QColor Color;
41 
42 public:
49 
53  TriggerMarker(const TriggerMarker &marker);
54 
58  bool enabled() const override;
59 
63  bool is_draggable(QPoint pos) const override;
64 
68  void set_time(const pv::util::Timestamp& time) override;
69 
70  virtual const pv::util::Timestamp time() const override;
71 
72  float get_x() const override;
73 
78  QPoint drag_point(const QRect &rect) const override;
79 
85  void paint_fore(QPainter &p, ViewItemPaintParams &pp) override;
86 
87 private:
89 };
90 
91 } // namespace trace
92 } // namespace views
93 } // namespace pv
94 
95 #endif // PULSEVIEW_PV_VIEWS_TRACE_TRIGGERMARKER_HPP
QPoint drag_point(const QRect &rect) const override
void set_time(const pv::util::Timestamp &time) override
TriggerMarker(View &view, const pv::util::Timestamp &time)
void paint_fore(QPainter &p, ViewItemPaintParams &pp) override
float get_x() const override
virtual const pv::util::Timestamp time() const override
bool is_draggable(QPoint pos) const override
bool enabled() const override
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 24 >, boost::multiprecision::et_off > Timestamp
Timestamp type providing yoctosecond resolution.
Definition: util.hpp:67