-
Notifications
You must be signed in to change notification settings - Fork 0
/
c2dplot.cpp
46 lines (37 loc) · 1001 Bytes
/
c2dplot.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <QtUiTools>
#include <QtWidgets/QtWidgets>
#include "c2dplot.h"
C2DPlot::C2DPlot():CPlot("2D") {
setName("2D Plot");
//constructSettingsWidget();
m_scene = new QGraphicsScene();
}
C2DPlot::~C2DPlot() {
delete m_scene;
}
QWidget* C2DPlot::constructSettingsWidget(QWidget* parent_) {
QUiLoader loader;
QFile file("c2dplot_settings.ui");
file.open(QFile::ReadOnly);
QWidget* settingsWidget = loader.load(&file,parent_);
file.close();
return settingsWidget;
}
void C2DPlot::constructFromXML(QXmlStreamReader *xml_) {
//TODO
setName(xml_->attributes().value("name").toString());
while(xml_->readNextStartElement()) {
//if(xml_->name()=="Axis") {
//}
}
xml_->skipCurrentElement();
}
QWidget* C2DPlot::getSettingsWidget(QWidget *parent_) {
return constructSettingsWidget(parent_);
}
QGraphicsScene* C2DPlot::getGraphicsScene() {
return m_scene;
}
CPlot* C2DPlot::CreatePlot() {
return new C2DPlot();
}