summaryrefslogtreecommitdiffstats
path: root/Project/ControlEditor.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-04-27 20:38:55 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-04-27 20:38:55 -0300
commit50f31898499d1d1e1ebc8ab9c9c26d3b4ec1b3c1 (patch)
treef4a509a9e20d6ece771a718638b9f31a2a268ef8 /Project/ControlEditor.cpp
parentee58faacaaaf83293ead87696847b018f9a1281d (diff)
downloadPSP.git-50f31898499d1d1e1ebc8ab9c9c26d3b4ec1b3c1.tar.gz
PSP.git-50f31898499d1d1e1ebc8ab9c9c26d3b4ec1b3c1.tar.xz
PSP.git-50f31898499d1d1e1ebc8ab9c9c26d3b4ec1b3c1.zip
More methods implemented
buggy
Diffstat (limited to 'Project/ControlEditor.cpp')
-rw-r--r--Project/ControlEditor.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp
index 927654e..a3ab3d9 100644
--- a/Project/ControlEditor.cpp
+++ b/Project/ControlEditor.cpp
@@ -14,6 +14,7 @@
#include "Gain.h"
#include "ChartView.h"
+#include "ElementPlotData.h"
ControlElementButton::ControlElementButton(wxWindow* parent, wxString label, wxImage image, wxWindowID id)
: wxWindow(parent, id)
@@ -617,7 +618,30 @@ void ControlEditor::OnKeyDown(wxKeyEvent& event)
{
//tests
if(event.ControlDown() && event.ShiftDown()) {
- ChartView* cView = new ChartView(this);
+ std::vector<double> time, x2, x3;
+ for(int i=0; i<100; ++i) {
+ time.push_back(i);
+ x2.push_back(std::pow(static_cast<double>(i),2));
+ x3.push_back(std::pow(static_cast<double>(i),3));
+ }
+ std::vector<ElementPlotData> epdList;
+
+ ElementPlotData curve1Data(_("Func. polinomiais 1"), ElementPlotData::CT_BUS);
+ curve1Data.AddData(x2, _("x^2"));
+ curve1Data.AddData(x3, _("x^3"));
+ epdList.push_back(curve1Data);
+
+ ElementPlotData curve2Data(_("Func. polinomiais 2"), ElementPlotData::CT_BUS);
+ curve2Data.AddData(x2, _("x^2"));
+ curve2Data.AddData(x3, _("x^3"));
+ epdList.push_back(curve2Data);
+
+ ElementPlotData curve3Data(_("Func. polinomiais 3"), ElementPlotData::CT_SYNC_GENERATOR);
+ curve3Data.AddData(x2, _("x^2"));
+ curve3Data.AddData(x3, _("x^3"));
+ epdList.push_back(curve3Data);
+
+ ChartView* cView = new ChartView(this, epdList, time);
cView->Show();
}
}