diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-01-04 16:00:52 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-01-04 16:00:52 +0100 |
commit | 738ecbd5fad2b46836bfd6a94aeebf165ae2bbca (patch) | |
tree | df04709807cc9ec8481a3ebc7d80ac25e5b2f457 /src/gui/tikzview.h | |
parent | 0421a96749743868554d44585050b1b3d04864d2 (diff) |
relocated source code to the root
Diffstat (limited to 'src/gui/tikzview.h')
-rw-r--r-- | src/gui/tikzview.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gui/tikzview.h b/src/gui/tikzview.h new file mode 100644 index 0000000..fc3cba4 --- /dev/null +++ b/src/gui/tikzview.h @@ -0,0 +1,32 @@ +/** + * Display a Graph, and manage any user input that purely changes the view (e.g. Zoom). This + * serves as the view in the MVC (TikzDocument, TikzView, TikzScene). + */ + +#ifndef TIKZVIEW_H +#define TIKZVIEW_H + +#include <QObject> +#include <QWidget> +#include <QGraphicsView> +#include <QPainter> +#include <QGraphicsItem> +#include <QStyleOptionGraphicsItem> +#include <QRectF> +#include <QMouseEvent> + +class TikzView : public QGraphicsView +{ + Q_OBJECT +public: + explicit TikzView(QWidget *parent = 0); +public slots: + void zoomIn(); + void zoomOut(); +protected: + void drawBackground(QPainter *painter, const QRectF &rect); +private: + float _scale; +}; + +#endif // TIKZVIEW_H |