This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabel.cpp
76 lines (60 loc) · 2.16 KB
/
tabel.cpp
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
#include "tabel.h"
#include "ui_tabel.h"
#include "QtGui"
#include "monod.h"
#include "moser.h"
#include "powel.h"
#include "oxigen.h"
#include <QtSql/QSqlTableModel>
#include <QtSql/QSqlDatabase>
Tabel::Tabel(QWidget *parent) :
QDialog(parent),
ui(new Ui::Tabel)
{
ui->setupUi(this);
}
Tabel::~Tabel()
{
delete ui;
}
/*void Tabel::dataShow(QVector<double> t, QVector<double> DO, QVector<double> pH, QVector<double> S, QVector<double> O2)
{
QSqlTableModel *model = new QSqlTableModel;
model->setTable("Input Data");
for(int i = 0; i< 17; i++)
{
model->insertRows(i, 5);
model->setData(model->index(i, 0), t[i]);
model->setData(model->index(i, 1), DO[i]);
model->setData(model->index(i, 2), pH[i]);
model->setData(model->index(i, 3), S[i]);
model->setData(model->index(i, 4), O2[i]);
}
model->submitAll();
model->setHeaderData(0, Qt::Horizontal, QObject::tr("Timp"));
model->setHeaderData(1, Qt::Horizontal, QObject::tr("Densitate Optica"));
model->setHeaderData(2, Qt::Horizontal, QObject::tr("pH"));
model->setHeaderData(3, Qt::Horizontal, QObject::tr("Substrat NNH2"));
model->setHeaderData(4, Qt::Horizontal, QObject::tr("Oxigen dizolvat"));
//model->setEditStrategy(QAbstractItemView::NoEditTriggers);
}*/
//void Tabel::dataShow(Monod *m)
//{
// QSqlTableModel *model = new QSqlTableModel;
// model->setTable("Input Data");
// for(int i = 0; i< t.size(); i++)
// {
// model->insertRows(i, 5);
// model->setData(model->index(i, 0), t[i]);
// model->setData(model->index(i, 1), DO[i]);
// model->setData(model->index(i, 2), pH[i]);
// model->setData(model->index(i, 3), S[i]);
// model->setData(model->index(i, 4), O2[i]);
// }
// model->submitAll();
// model->setHeaderData(0, Qt::Horizontal, QObject::tr("Timp"));
// model->setHeaderData(1, Qt::Horizontal, QObject::tr("Densitate Optica"));
// model->setHeaderData(2, Qt::Horizontal, QObject::tr("pH"));
// model->setHeaderData(3, Qt::Horizontal, QObject::tr("Substrat NNH2"));
// model->setHeaderData(4, Qt::Horizontal, QObject::tr("Oxigen dizolvat"));
//}