projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
org.sigrok.PulseView.appdata.xml: Add <mimetype> tag.
[pulseview.git]
/
pv
/
view
/
cursorpair.cpp
diff --git
a/pv/view/cursorpair.cpp
b/pv/view/cursorpair.cpp
index f9d3e53ddd3fec6bae38fc39dfdaa3d257ef87f8..05b9dfcad744bb6fb996ac4d91e178241bbe1702 100644
(file)
--- a/
pv/view/cursorpair.cpp
+++ b/
pv/view/cursorpair.cpp
@@
-14,18
+14,17
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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/>.
*/
#include "cursorpair.hpp"
*/
#include "cursorpair.hpp"
+#include "pv/util.hpp"
#include "ruler.hpp"
#include "view.hpp"
#include "ruler.hpp"
#include "view.hpp"
-#include "pv/util.hpp"
-#include <cassert>
#include <algorithm>
#include <algorithm>
+#include <cassert>
using std::max;
using std::make_pair;
using std::max;
using std::make_pair;
@@
-34,7
+33,8
@@
using std::shared_ptr;
using std::pair;
namespace pv {
using std::pair;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const int CursorPair::DeltaPadding = 8;
const QColor CursorPair::ViewportFillColour(220, 231, 243);
const int CursorPair::DeltaPadding = 8;
const QColor CursorPair::ViewportFillColour(220, 231, 243);
@@
-144,7
+144,7
@@
void CursorPair::paint_label(QPainter &p, const QRect &rect, bool hover)
}
}
}
}
-void CursorPair::paint_back(QPainter &p,
const
ViewItemPaintParams &pp)
+void CursorPair::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
if (!enabled())
return;
{
if (!enabled())
return;
@@
-187,10
+187,9
@@
pair<float, float> CursorPair::get_cursor_offsets() const
assert(first_);
assert(second_);
assert(first_);
assert(second_);
- return pair<float, float>(
- ((first_->time() - view_.offset()) / view_.scale()).convert_to<float>(),
- ((second_->time() - view_.offset()) / view_.scale()).convert_to<float>());
+ return pair<float, float>(first_->get_x(), second_->get_x());
}
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv
} // namespace pv