ItemBounder.hpp
1 #pragma once
2 #include <score_lib_base_export.h>
3 
4 #include <utility>
5 class QGraphicsItem;
6 namespace score
7 {
8 
9 class SCORE_LIB_BASE_EXPORT ItemBounder
10 {
11 public:
12  // Returns: new X, boolean indicating if we moved
13  std::pair<double, bool> bound(QGraphicsItem* parent, double x0, double w) noexcept;
14 
15  double x() const noexcept { return m_x; }
16 
17 private:
18  double m_x{};
19 };
20 
21 }
Definition: ItemBounder.hpp:10
Base toolkit upon which the software is built.
Definition: Application.cpp:90