Mercurial > hg > svgui
diff widgets/Panner.h @ 1324:13d9b422f7fe zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Sep 2018 13:51:31 +0100 |
parents | 13f5f84fbfad |
children | a18e78b9c78b |
line wrap: on
line diff
--- a/widgets/Panner.h Mon Dec 12 15:18:52 2016 +0000 +++ b/widgets/Panner.h Mon Sep 17 13:51:31 2018 +0100 @@ -13,11 +13,13 @@ COPYING included with this distribution for more information. */ -#ifndef _PANNER_H_ -#define _PANNER_H_ +#ifndef SV_PANNER_H +#define SV_PANNER_H #include <QWidget> +#include "WheelCounter.h" + class Panner : public QWidget { Q_OBJECT @@ -109,6 +111,12 @@ */ void scroll(bool up); + /** + * Move up (if up is true) or down a bit. This is basically the + * same action as rolling the mouse wheel n notches. + */ + void scroll(bool up, int n); + void resetToDefault(); protected: @@ -145,6 +153,8 @@ QPoint m_clickPos; float m_dragStartX; float m_dragStartY; + + WheelCounter m_wheelCounter; }; #endif