projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tie the "sticky scrolling" setting in with the settings mgmt
[pulseview.git]
/
pv
/
view
/
viewitempaintparams.hpp
diff --git
a/pv/view/viewitempaintparams.hpp
b/pv/view/viewitempaintparams.hpp
index 73551e6d7f67b7f85cc4c893bb2f8923d8ce6fa1..3b150a883243b5a0d4ac52300627bee0731a86d5 100644
(file)
--- a/
pv/view/viewitempaintparams.hpp
+++ b/
pv/view/viewitempaintparams.hpp
@@
-14,22
+14,26
@@
* 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/>.
*/
*/
-#ifndef PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
-#define PULSEVIEW_PV_VIEW_ROWITEMPAINTPARAMS_H
+#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWITEMPAINTPARAMS_HPP
+#define PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWITEMPAINTPARAMS_HPP
+
+#include "pv/util.hpp"
#include <QFont>
#include <QFont>
+#include <QRect>
namespace pv {
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
class ViewItemPaintParams
{
public:
class ViewItemPaintParams
{
public:
- ViewItemPaintParams(const QRect &rect, double scale, double offset);
+ ViewItemPaintParams(
+ const QRect &rect, double scale, const pv::util::Timestamp& offset);
QRect rect() const {
return rect_;
QRect rect() const {
return rect_;
@@
-39,7
+43,7
@@
public:
return scale_;
}
return scale_;
}
-
double
offset() const {
+
const pv::util::Timestamp&
offset() const {
return offset_;
}
return offset_;
}
@@
-68,7
+72,7
@@
public:
}
double pixels_offset() const {
}
double pixels_offset() const {
- return
offset_ / scale_
;
+ return
(offset_ / scale_).convert_to<double>()
;
}
public:
}
public:
@@
-79,10
+83,11
@@
public:
private:
QRect rect_;
double scale_;
private:
QRect rect_;
double scale_;
-
double
offset_;
+
pv::util::Timestamp
offset_;
};
};
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv
} // namespace pv
-#endif // PULSEVIEW_PV_VIEW
_ROWITEMPAINTPARAMS_H
+#endif // PULSEVIEW_PV_VIEW
S_TRACEVIEW_VIEWITEMPAINTPARAMS_HPP