No Description

xyplotwindow.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include "qcustomplot.h"
  5. namespace Ui {
  6. class XYPlotWindow;
  7. }
  8. class XYPlotWindow : public QMainWindow
  9. {
  10. Q_OBJECT
  11. public:
  12. /// \fn XYPlotWindow::XYPlotWindow(QWidget *parent)
  13. /// \~English
  14. /// \brief Constructor
  15. /// \~Spanish
  16. /// \brief Constructor
  17. explicit XYPlotWindow(QWidget *parent = 0);
  18. /// \fn XYPlotWindow::~XYPlotWindow()
  19. /// \~English
  20. /// \brief Destructor
  21. /// \~Spanish
  22. /// \brief Destructor
  23. ~XYPlotWindow();
  24. /// \fn void XYPlotWindow::AddPointToGraph(double x, double y)
  25. /// \~English
  26. /// \brief Adds a coordinate (x,y) to the XX and YY vectors.
  27. /// \param x value of the coordinate (x,y) to be added to vector XX.
  28. /// \param y value of the coordinate (x,y) to be added to vector YY.
  29. /// \~Spanish
  30. /// \brief Anade una coordenada (x,y) a los vectores XX y YY.
  31. /// \param x valor de la coordenada (x,y) a ser anadido al vector XX.
  32. /// \param y valor de la coordenada (x,y) a ser anadido al vector YY.
  33. void AddPointToGraph(double x, double y);
  34. /// \fn void XYPlotWindow::Plot()
  35. /// \~English
  36. /// \brief Plots the coordinates inserted in the vectors XX and YY.
  37. /// \~Spanish
  38. /// \brief Grafica las coordenadas insertadas en los vectores XX y YY.
  39. void Plot();
  40. private:
  41. Ui::XYPlotWindow *ui;
  42. QVector<double> XX, YY;
  43. QVector<double> XXN, YYN;
  44. };
  45. #endif // MAINWINDOW_H