-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipe_segement_details.cpp
executable file
·57 lines (47 loc) · 1.79 KB
/
pipe_segement_details.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
/* LiquiNet is cross platform GUI software to solve water or Liquid Pipe Network Problems
Copyright (C) 2016 Samadrita Karmakar (samadritakarmakar@gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/
#include "pipe_segement_details.h"
#include "ui_pipe_segement_details.h"
#include "global_variables.h"
#include <math.h>
#include <QDebug>
Pipe_Segement_Details::Pipe_Segement_Details(QWidget *parent) :
QWidget(parent),
ui(new Ui::Pipe_Segement_Details)
{
ui->setupUi(this);
this->setWindowTitle("Pipe Segment Details");
}
Pipe_Segement_Details::~Pipe_Segement_Details()
{
delete ui;
}
void Pipe_Segement_Details::on_pipe_sgmnt_pb_clicked()
{
D(elc)=ui->D_le->text().toDouble();
L(elc)=ui->L_le->text().toDouble();
e(elc)=ui->e_le->text().toDouble();
k(elc)=ui->k_le->text().toDouble();
Hd(elc)=0;
o(elc)=0;
n(elc)=0;
this->close();
//qDebug()<<"Area "<<A(elc)<<"\nHead Loss "<<h0(elc)<<"\nFriction Factor"<<f(elc);
}
void Pipe_Segement_Details::first_show()
{
ui->D_le->setText(QString::number(D(elc)));
ui->L_le->setText(QString::number(L(elc)));
ui->k_le->setText(QString::number(k(elc)));
ui->e_le->setText(QString::number(e(elc)));
}