Extract mouse handling events to it's own class

This commit is contained in:
Luis Ángel San Martín
2025-05-03 15:10:16 +02:00
parent 9e37947479
commit 7db47f9147
5 changed files with 136 additions and 65 deletions

View File

@ -17,6 +17,7 @@
#include <QSettings>
#include "scroll_management.h"
#include "mouse_handler.h"
class ComicDB;
class Comic;
@ -185,6 +186,9 @@ private:
int animationDuration() const;
void animateScroll(QPropertyAnimation &scroller, const QScrollBar &scrollBar, int delta);
//! Mouse handler
std::unique_ptr<YACReader::MouseHandler> mouseHandler;
public:
Viewer(QWidget *parent = nullptr);
~Viewer();
@ -213,6 +217,8 @@ signals:
void magnifyingGlassZoomIn();
void magnifyingGlassZoomOut();
void resetMagnifyingGlass();
friend class YACReader::MouseHandler;
};
#endif