summaryrefslogtreecommitdiff
path: root/src/charts/ChartView.cpp
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/charts/ChartView.cpp
Initial mirror commitHEADmaster
Diffstat (limited to 'src/charts/ChartView.cpp')
-rw-r--r--src/charts/ChartView.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/charts/ChartView.cpp b/src/charts/ChartView.cpp
new file mode 100644
index 0000000..24a08c5
--- /dev/null
+++ b/src/charts/ChartView.cpp
@@ -0,0 +1,12 @@
+#include "ChartView.h"
+
+ChartView::ChartView(QGraphicsScene* scene):
+ QGraphicsView(scene)
+{
+ setRenderHints(QPainter::Antialiasing);
+}
+
+void ChartView::resizeEvent(QResizeEvent*)
+{
+ fitInView(scene()->sceneRect(), Qt::KeepAspectRatio);
+}