Initial commit

This commit is contained in:
jaseg 2020-08-04 01:04:52 +02:00
commit 872bb95acf
20 changed files with 1369 additions and 0 deletions

38
tagview.h Normal file
View file

@ -0,0 +1,38 @@
#ifndef TAGVIEW_H
#define TAGVIEW_H
#include "sqlitebackend.h"
#include "tagscene.h"
#include <QGraphicsView>
#include <QTimer>
class TagView : public QGraphicsView
{
public:
TagView(SQLiteSaveFile &proj);
public slots:
void zoomToFit();
void setZoom(qreal zoom);
void zoomIn(qreal delta);
void rotate(int angle);
protected:
void wheelEvent(QWheelEvent *evt) override;
private slots:
void saveCenter();
private:
void restoreViewport();
TagScene scene;
SQLiteSaveFile &proj;
QTimer saveCenterTimer;
int rotation;
double zoom;
};
#endif // TAGVIEW_H