-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
113 lines (83 loc) · 2.4 KB
/
mainwindow.h
File metadata and controls
113 lines (83 loc) · 2.4 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <qcustomplot.h>
#include <QtGui>
/********************/
/* Octave Libraries */
/********************/
#include <oct.h>
#include <octave.h>
#include <parse.h>
#include <toplev.h>
namespace Ui
{
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
bool loadFile(const QString &);
~MainWindow();
private slots:
/***************/
/* QCustomPlot */
/***************/
// Mouse handlers for qCustomPlot
void mousePress();
void mouseWheel();
void graphClicked(QCPAbstractPlottable*,int);
void legendDoubleClick(QCPLegend *legend, QCPAbstractLegendItem *item);
void titleDoubleClick(QMouseEvent* event);
// Context menu slots for qCustomPlot
void contextMenuRequest(QPoint pos);
void contextMenuAddRequested();
void selectionChanged();
void removeSelectedGraphs();
void changeGraphColor();
/*************************/
/* QGraphicsView Buttons */
/*************************/
void on_loadButton_released();
void on_resetZoomButton_released();
/***********************/
/* QCustomPlot Buttons */
/***********************/
void on_saveButton_released();
void on_addButton_toggled();
void on_clearButton_released();
void on_centerGraphButton_released();
/***************/
/* Other Slots */
/***************/
void bandChange(int newBand);
void addPoint(QGraphicsSceneMouseEvent *event);
private:
Ui::MainWindow *ui;
bool temp;
/******************/
/* Octave Members */
/******************/
Matrix outputMatrix;
int matrixRows, matrixCols;
bool loadOctaveMatrix(QString &fileName);
void loadOctaveDirectory(QVector<QString> filePaths);
void iterateDirectory(QString directoryName, QVector<QString> *filenames);
void initializeGraphicsScene();
/***********************************/
/* Private members for QCustomPlot */
/***********************************/
void initializeGraph();
int xMin, xMax, yMin, yMax;
void recenterGraph();
void addPlot(QVector<double> pointVector);
/*********************/
/* Members for Image */
/*********************/
QGraphicsScene *scene;
QVector<QImage> imageVector;
//void setImage(const QImage &newImage);
};
#endif // MAINWINDOW_H