-
Notifications
You must be signed in to change notification settings - Fork 5
/
plot2d.h
48 lines (39 loc) · 1.39 KB
/
plot2d.h
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
#ifndef PLOT2D_H
#define PLOT2D_H
#include <QDialog>
#include "wstring.h"
#include "qcustomplot.h"
#include <string>
namespace Ui {
class Plot2D;
}
class Plot2D : public QDialog
{
Q_OBJECT
public:
// explicit Plot2D(double **com_info, int length, QWidget *parent = 0);
explicit Plot2D(QString xlabel, QString ylabel, double xstart, double xend, double ystart, double yend, QString title, QWidget *parent = 0, bool newlambda = true);
void initialization(QString xlabel, QString ylabel, double xstart, double xend, double ystart, double yend, QString title, bool newlambda = true);
~Plot2D();
void Plot2DCurves(QVector<double> x, QVector<double> y, QString qtname, QColor color);
void Clear2DCurves();
private slots:
void titleDoubleClick(QMouseEvent *event, QCPPlotTitle *title);
void axisLabelDoubleClick(QCPAxis* axis, QCPAxis::SelectablePart part);
void legendDoubleClick(QCPLegend* legend, QCPAbstractLegendItem* item);
void selectionChanged();
void mousePress();
void mouseWheel();
void removeSelectedGraph();
void removeAllGraphs();
void contextMenuRequest(QPoint pos);
void moveLegend();
// void graphClicked(QCPAbstractPlottable *plottable);
void on_pushButton_clicked();
signals:
void sendnewlambda(double, Plot2D *, int);
private:
Ui::Plot2D *ui;
int plottype; // 1: community cova, 2: community affi
};
#endif // PLOT2D_H