28 #include <qtoolbutton.h>
30 #include <qwhatsthis.h>
31 #include <qbuttongroup.h>
34 #include <QVBoxLayout>
39 #include "QPushButton"
42 #define TR(id) OLocalizator::getString("TYSolResistanceDialog", (id))
48 static double resistance[] = {5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000};
61 setWindowTitle(
TR(
"id_resistance"));
62 setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
65 this->setFixedSize(280, 560);
67 _frame6->setGeometry(QRect(0, 0, 280, 560));
68 _frame6->setFrameShape(QFrame::StyledPanel);
69 _frame6->setFrameShadow(QFrame::Raised);
73 _line1_2_4->setGeometry(QRect(150, 403, 20, 20));
74 _line1_2_4->setProperty(
"frameShape", (
int)QFrame::HLine);
80 _line1_2_11->setProperty(
"frameShape", (
int)QFrame::HLine);
86 _line1_2_13->setProperty(
"frameShape", (
int)QFrame::HLine);
91 _line1_2_6->setGeometry(QRect(150, 252, 20, 20));
92 _line1_2_6->setProperty(
"frameShape", (
int)QFrame::HLine);
97 _line1_2->setGeometry(QRect(150, 221, 20, 20));
98 _line1_2->setProperty(
"frameShape", (
int)QFrame::HLine);
99 _line1_2->setFrameShadow(QFrame::Sunken);
100 _line1_2->setFrameShape(QFrame::HLine);
103 _line1_2_5->setGeometry(QRect(150, 196, 20, 20));
104 _line1_2_5->setProperty(
"frameShape", (
int)QFrame::HLine);
109 _line1_2_2->setGeometry(QRect(150, 163, 20, 20));
110 _line1_2_2->setProperty(
"frameShape", (
int)QFrame::HLine);
115 _line1_2_7->setGeometry(QRect(150, 98, 20, 16));
116 _line1_2_7->setProperty(
"frameShape", (
int)QFrame::HLine);
121 _line1_2_3->setGeometry(QRect(150, 74, 20, 20));
122 _line1_2_3->setProperty(
"frameShape", (
int)QFrame::HLine);
127 _line1->setGeometry(QRect(150, 36, 20, 20));
128 _line1->setProperty(
"frameShape", (
int)QFrame::HLine);
129 _line1->setFrameShadow(QFrame::Sunken);
130 _line1->setFrameShape(QFrame::HLine);
180 _lineEdit1->setGeometry(QRect(170, 460, 50, 20));
197 _slider1->setGeometry(QRect(170, 40, 30, 381));
198 _slider1->setOrientation(Qt::Vertical);
199 _slider1->setTickPosition(QSlider::TicksRight);
203 QWidget* privateLayoutWidget =
new QWidget(
_frame6);
204 privateLayoutWidget->setGeometry(QRect(200, 25, 60, 410));
207 privateLayoutWidget->setLayout(
_layout1);
262 QColor color(225, 255, 255);
263 _toolButton1->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
264 _toolButton1->setToolButtonStyle(Qt::ToolButtonTextOnly);
269 color = QColor(225, 221, 213);
270 _toolButton1_8_3->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
276 color = QColor(170, 170, 127);
277 _toolButton1_8_2->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
283 color = QColor(0, 218, 0);
284 _toolButton1_8->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
290 color = QColor(0, 124, 0);
291 _toolButton1_8_4->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
297 color = QColor(224, 229, 66);
298 _toolButton1_8_5->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
304 color = QColor(226, 191, 34);
305 _toolButton1_8_6->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
311 color = QColor(111, 70, 32);
312 _toolButton1_8_7->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
318 color = QColor(169, 194, 212);
319 _toolButton1_8_11->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
325 color = QColor(146, 168, 184);
326 _toolButton1_8_13->setStyleSheet(QString(
"background-color: %1;").arg(color.name()));
331 void (QButtonGroup::*_qButtonGroup_clicked)(int) = &QButtonGroup::idClicked;
335 connect(
_pushButton1, &QPushButton::clicked,
this, &TYSolResistanceDialog::accept);
336 connect(
_pushButton2, &QPushButton::clicked,
this, &TYSolResistanceDialog::reject);
357 double val = double(value) / 9;
359 _res = resistance[i] + (val - double(i)) * (resistance[i + 1] - resistance[i]);
372 double value = sValue.toDouble();
374 while ((value > resistance[i + 1]) && (i < 12))
385 double res = (i + (value - resistance[i]) / (resistance[i + 1] - resistance[i])) * 9;
outil IHM pour une entrée utilisateur (fichier header)
Outil IHM pour la saisie de la resisitivite du sol (fichier header)
QToolButton * _toolButton1_8_6
TYSolResistanceDialog(QWidget *parent=0, double res=0, const char *name=0, bool modal=false, Qt::WindowFlags fl=QFlag(0))
QToolButton * _toolButton1_8
QPushButton * _pushButton1
QToolButton * _toolButton1
void lineEditChanged(const QString &sValue)
void sliderChanged(int value)
QToolButton * _toolButton1_8_2
QToolButton * _toolButton1_8_13
QToolButton * _toolButton1_8_7
QButtonGroup * _pButtonGroup
QToolButton * _toolButton1_8_5
void buttonValue(int button)
QToolButton * _toolButton1_8_3
QToolButton * _toolButton1_8_4
QPushButton * _pushButton2
QLabel * _textLabel5_8_13
QToolButton * _toolButton1_8_11
QLabel * _textLabel5_8_11