From 56c9ebb2e41bd0487199ed95838cd9e1c1d9dd8d Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 24 Sep 2015 17:48:33 -0300 Subject: Added placeholder object for history graph; smaller main window. --- historygraph.cpp | 14 ++++++++++++++ historygraph.h | 20 ++++++++++++++++++++ main_view.qml | 8 ++++++-- pm.pro | 2 ++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 historygraph.cpp create mode 100644 historygraph.h diff --git a/historygraph.cpp b/historygraph.cpp new file mode 100644 index 0000000..1a4532a --- /dev/null +++ b/historygraph.cpp @@ -0,0 +1,14 @@ +#include "historygraph.h" + +HistoryGraph::HistoryGraph(QQuickItem *parent) + : QQuickItem(parent) +{ +} + +void HistoryGraph::addHistoryItem(const int &item) +{} + +QSGNode *HistoryGraph::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) +{ + return oldNode; +} diff --git a/historygraph.h b/historygraph.h new file mode 100644 index 0000000..b854d1e --- /dev/null +++ b/historygraph.h @@ -0,0 +1,20 @@ +#ifndef HISTORYGRAPH_H +#define HISTORYGRAPH_H + +#include +#include + +class HistoryGraph : public QQuickItem +{ + Q_OBJECT +public: + HistoryGraph(QQuickItem *parent = 0); + +public slots: + void addHistoryItem(const int &item); + +protected: + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); +}; + +#endif // HISTORYGRAPH_H diff --git a/main_view.qml b/main_view.qml index 9eea63e..4c349f9 100644 --- a/main_view.qml +++ b/main_view.qml @@ -8,7 +8,7 @@ import PM 1.0 ApplicationWindow { title: "Projection Manipulation" visible: true - width: 1200 + width: 900 height: 600 menuBar: MenuBar { @@ -81,7 +81,11 @@ ApplicationWindow { Layout.fillWidth: true Layout.minimumHeight: 150 - // ... + HistoryGraph { + id: history + objectName: "history" + anchors.fill: parent + } } } diff --git a/pm.pro b/pm.pro index 48c4d35..6d67c88 100644 --- a/pm.pro +++ b/pm.pro @@ -5,6 +5,7 @@ QMAKE_LIBS += -larmadillo -fopenmp HEADERS += colorscale.h \ continuouscolorscale.h \ scatterplot.h \ + historygraph.h \ interactionhandler.h \ selectionhandler.h \ effectivenessobserver.h \ @@ -16,6 +17,7 @@ SOURCES += main.cpp \ colorscale.cpp \ continuouscolorscale.cpp \ scatterplot.cpp \ + historygraph.cpp \ interactionhandler.cpp \ selectionhandler.cpp \ effectivenessobserver.cpp \ -- cgit v1.2.3