-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
executable file
·53 lines (42 loc) · 1.04 KB
/
Copy pathmainwindow.cpp
File metadata and controls
executable file
·53 lines (42 loc) · 1.04 KB
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
47
48
49
50
51
52
53
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <cmath>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_lineEdit_editingFinished()
{
}
void MainWindow::on_pushButton_3_clicked()
{
alimentacion = new(Graficador);
alimentacion->setTiempoMuestreo(0.01);
for(int i = 0; i<630;i++)
{
alimentacion->agregarPunto(220*sin(0.01*i));
}
alimentacion->setRangoX(0,6.3);
alimentacion->setRangoY(-300,300);
alimentacion->show();
alimentacion->setNombre("Alimentacion");
}
void MainWindow::on_pushButton_clicked()
{
miGrafica = new(Graficador);
miGrafica->setTiempoMuestreo(0.001);
miGrafica->setNombre("Curva Torque Deslizamiento");
for(int i = 0; i<1000; i++)
{
miGrafica->agregarPunto(miMotor.respuestaTorqueDeslizamiento(0.001*i));
}
miGrafica->setRangoX(0,1);
miGrafica->EtiquetaX("Desplazamiento");
miGrafica->show();
}