-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatrixinputwidget.h
More file actions
39 lines (33 loc) · 1.03 KB
/
matrixinputwidget.h
File metadata and controls
39 lines (33 loc) · 1.03 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
#ifndef MATRIXINPUTWIDGET_H
#define MATRIXINPUTWIDGET_H
#include <QWidget>
#include <QLineEdit>
#include <QGridLayout>
#include <QSpinBox>
#include <QLabel>
#include <QLineEdit>
class MatrixInputWidget : public QWidget
{
Q_OBJECT
public:
explicit MatrixInputWidget(QWidget *parent = nullptr);
double readValuesAndFindDeterminant(QVector<QVector<QLineEdit*>>&, int);
static void debugPrintDoubleArray(const QVector<QVector<double>>, int);
void setMatrixValues(QVector<QVector<double>>&);
void setRHSValues(QVector<double>&);
QVector<QVector<double>> getMatrixValues() const;
int getMatrixSize();
QVector<QVector<QLineEdit*>> getMatrix();
QVector<double> getRHSValues() const;
signals:
void matrixSizeChanged(int);
private slots:
void changeMatrixSize(int);
private:
QGridLayout *gridLayout;
QSpinBox *sizeInput;
QVector<QVector<QLineEdit*>> matrixCells;
QVector<QLineEdit*> rightSideCells;
QVector<QLabel*> equalSigns; // Stores the "=" labels
};
#endif // MATRIXINPUTWIDGET_H