/**************************************************************************** ** ** Copyright (C) 2019 Minnesota Department of Transportation ** Office of Materials & Road Research ** 1400 Gervais Avenue ** Saint Paul, Minnesota 55109-2044 ** USA ** http://www.dot.state.mn.us/materials/pvmtdesign/software.html ** ** ** $QT_BEGIN_LICENSE:GPL$ ** ** 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. ** ** If you did not receive a copy of the GNU General Public License ** see http://www.gnu.org/licenses ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef TRAFFICDLG_H #define TRAFFICDLG_H #include #include namespace Ui { class TrafficDlg; } class TrafficDlg : public QDialog { Q_OBJECT public: explicit TrafficDlg(QWidget *parent = 0); ~TrafficDlg(); bool bsi; // SI units bool bResearch; bool bCompound; // compound traffic growth bool bFirstYearESAL; // design ESALs calculated from 1st year ESALs bool bFHWA; // using FHWA vehicle classes int nMode; // indicates what to display int nFlexLife; // flexible life (years) used to calculate design or 1st year ESALs int nCustWheel; // number of wheels per half axle int nCustAxle; // number of axles per group (0 => ESAL) int nRigidSpec; // load spectrum for rigid design double dtmp; // hold edit box values double HCADT; // heavy commercial double ipct; // traffic growth rate double esal1; // first year ESALs double esal; double esalP; // ESAL tire pressure double esalWt; // ESAL axle weight double esalX; // ESAL tire spacing double custP; double custWt; double custX; double custY; double mohrP[2]; // tire pressure double mohrWt[2]; // max weights for stress test double mohrX[2]; // tire spacing (dual tire only) double fhwa[10]; // percentage for vehicle classes 4-13 double mndot[10]; // percentage for vehicle classes 4-11 (last two are unused) void setWidgets(); void setValues(bool bconv = false); void checkWheels(); int calcTraffic(int ntruck); // calculate cars & light trucks & heavy pct, check errors double calcESAL(bool calcLifeESAL, double inESAL); // calculate life or 1st year ESALs double adjHCADT(double *mdtraf, double HCADT); // adjustment factor for heavy trucks exceeding MEPDG spectrum private slots: void on_axleCombo_activated(int index); void on_growthCombo_activated(int index); void on_esalRadio1_clicked(); void on_esalRadio2_clicked(); void on_esalEdit1_editingFinished(); void on_esalEdit2_editingFinished(); void on_esalEdit3_editingFinished(); void on_esalEdit4_editingFinished(); void on_esalEdit6_editingFinished(); void on_esalEdit7_editingFinished(); void on_esalButton_clicked(); void on_stressEdit1_editingFinished(); void on_stressEdit2_editingFinished(); void on_stressEdit3_editingFinished(); void on_stressEdit4_editingFinished(); void on_stressEdit5_editingFinished(); void on_stressButton_clicked(); void on_truckCombo_activated(int index); void on_truckEdit02_editingFinished(); void on_truckEdit03_editingFinished(); void on_truckEdit04_editingFinished(); void on_truckEdit05_editingFinished(); void on_truckEdit06_editingFinished(); void on_truckEdit07_editingFinished(); void on_truckEdit08_editingFinished(); void on_truckEdit09_editingFinished(); void on_truckEdit10_editingFinished(); void on_truckEdit11_editingFinished(); private: Ui::TrafficDlg *ui; QRect wRect[99]; // Holds original geometries for widgets QWidget *pW[99]; // pointers to all widgets QLineEdit *pEdit[10]; // pointers to truck classes void resizeEvent(QResizeEvent *e); void loadW(); // sets pointers (pW) to all widgets }; #endif // TRAFFICDLG_H