chore: adjusted the project directory structure
This commit is contained in:
34
app/navigatorview.h
Normal file
34
app/navigatorview.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef NAVIGATORVIEW_H
|
||||
#define NAVIGATORVIEW_H
|
||||
|
||||
#include <QGraphicsView>
|
||||
|
||||
class OpacityHelper;
|
||||
class GraphicsView;
|
||||
class NavigatorView : public QGraphicsView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
NavigatorView(QWidget *parent = nullptr);
|
||||
|
||||
void setMainView(GraphicsView *mainView);
|
||||
void setOpacity(qreal opacity, bool animated = true);
|
||||
|
||||
public slots:
|
||||
void updateMainViewportRegion();
|
||||
|
||||
private:
|
||||
void mousePressEvent(QMouseEvent * event) override;
|
||||
void mouseMoveEvent(QMouseEvent * event) override;
|
||||
void mouseReleaseEvent(QMouseEvent * event) override;
|
||||
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
bool m_mouseDown = false;
|
||||
QPolygon m_viewportRegion;
|
||||
QGraphicsView *m_mainView = nullptr;
|
||||
OpacityHelper *m_opacityHelper = nullptr;
|
||||
};
|
||||
|
||||
#endif // NAVIGATORVIEW_H
|
Reference in New Issue
Block a user