28 #include <QGridLayout>
32 #include <QTreeWidget>
33 #include <QTreeWidgetItem>
34 #include <QContextMenuEvent>
35 #include <QHeaderView>
37 #include <QRadioButton>
42 #define TR(id) OLocalizator::getString("TYProjetWidget", (id))
50 setWindowTitle(
TR(
"id_caption"));
61 QGridLayout* _groupBoxLayout =
new QGridLayout();
74 if (getElement()->getDateCreation() ==
"2001-10-01")
76 getElement()->setDateCreation(date.currentDate().toString(Qt::ISODate));
78 _editDateCreation->setDate(date.fromString(getElement()->getDateCreation(), Qt::ISODate));
90 if (getElement()->getDateModif() ==
"2001-10-01")
92 getElement()->setDateModif(date.currentDate().toString(Qt::ISODate));
94 _editDateModif->setDate(date.fromString(getElement()->getDateModif(), Qt::ISODate));
110 QGridLayout* acoustiqueLayout =
new QGridLayout();
111 acoustiqueLayout->setAlignment(Qt::AlignTop);
117 QGridLayout* acoustiqueFormLayout =
new QGridLayout();
118 acoustiqueFormLayout->setAlignment(Qt::AlignTop);
123 QHBoxLayout* spectreFormLayout =
new QHBoxLayout(spectreFormRow);
124 spectreFormLayout->setContentsMargins(0, 0, 0, 0);
136 spectreFormLayout->addStretch(1);
138 acoustiqueFormLayout->addWidget(spectreFormRow, 0, 0, 1, 1);
146 QGridLayout* acoustiquePondLayout =
new QGridLayout();
147 acoustiquePondLayout->setAlignment(Qt::AlignTop);
152 QHBoxLayout* spectrePondLayout =
new QHBoxLayout(spectrePondRow);
153 spectrePondLayout->setContentsMargins(0, 0, 0, 0);
165 spectrePondLayout->addStretch(1);
167 acoustiquePondLayout->addWidget(spectrePondRow, 0, 0, 1, 1);
176 QGridLayout* groupBoxSiteLayout =
new QGridLayout();
212 QGroupBox* groupBoxCalculs =
new QGroupBox(
this);
213 QGridLayout* groupBoxCalculsLayout =
new QGridLayout();
214 groupBoxCalculs->setLayout(groupBoxCalculsLayout);
218 QGridLayout* groupBoxCurCalculLayout =
new QGridLayout();
235 QGridLayout* groupBoxTabLayout =
new QGridLayout();
240 QStringList stringList;
241 stringList.append(
TR(
""));
242 stringList.append(
TR(
"id_calcul"));
291 if (getElement()->getCurrentCalcul() != NULL)
303 _editDateCreation->setDate(date.fromString(getElement()->getDateCreation(), Qt::ISODate));
309 for (
unsigned int i = 0; i < getElement()->getListCalcul().size(); i++)
312 item->setText(0, QString().setNum(i));
313 item->setText(1, getElement()->getListCalcul().at(i)->getName());
324 if (getElement()->displaySpectrumInOctaveForm())
335 if (getElement()->getSpectrePond() ==
"dB(A)")
350 unsigned int nbPoints =
static_cast<uint32>(tabPoints.size());
354 unsigned int row = 0;
355 for (row = 0; row < nbPoints; row++)
359 msg = QString(
TR(
"id_cell_posx")).arg(tabPoints[row]->_x, 7,
'f', 1);
362 msg = QString(
TR(
"id_cell_posy")).arg(tabPoints[row]->_y, 7,
'f', 1);
365 msg = QString(
TR(
"id_cell_posh")).arg(tabPoints[row]->getHauteur(), 7,
'f', 1);
368 QTableWidgetItem* pCheckItemActif =
new QTableWidgetItem(
"");
370 if (tabPoints[row]->etat())
372 pCheckItemActif->setCheckState(Qt::Checked);
376 pCheckItemActif->setCheckState(Qt::Unchecked);
387 int nbPoints =
static_cast<uint32>(getElement()->getMaillages().size());
392 for (
int row = 0; row < nbPoints; row++)
394 pMaillage = getElement()->getMaillage(row);
397 QTableWidgetItem* pCheckItemActif =
new QTableWidgetItem(
"");
398 if (pMaillage->etat(getElement()->getCurrentCalcul()) ==
true)
400 pCheckItemActif->setCheckState(Qt::Checked);
404 pCheckItemActif->setCheckState(Qt::Unchecked);
418 getElement()->setDateModif(
_editDateModif->date().currentDate().toString(Qt::ISODate));
424 getElement()->setIsGeometryModified(
true);
425 getElement()->getSite()->setIsGeometryModified(
true);
429 double x = 0., y = 0., h = 0.;
430 bool need_to_rebuild_result(
false), ok(
false);
440 tabPoints[row]->setCoords(x, y, 0.);
441 tabPoints[row]->setHauteur(h);
445 if (pCheck->checkState() == Qt::Checked)
447 tabPoints[row]->setEtat(getElement()->getCurrentCalcul()->getID(),
true);
448 need_to_rebuild_result |= getElement()->getCurrentCalcul()->addPtCtrlToResult(tabPoints[row]);
452 tabPoints[row]->setEtat(getElement()->getCurrentCalcul()->getID(),
false);
453 need_to_rebuild_result |= getElement()->getCurrentCalcul()->remPtCtrlFromResult(tabPoints[row]);
457 if (need_to_rebuild_result)
459 getElement()->getCurrentCalcul()->getResultat()->buildMatrix();
467 if (pCheck->checkState() == Qt::Checked)
469 getElement()->getCurrentCalcul()->addMaillage(getElement()->getMaillage(row));
473 getElement()->getCurrentCalcul()->remMaillage(getElement()->getMaillage(row));
477 getElement()->getMaillage(row)->setName(
_tableauMaillages->item(row, 0)->text());
494 getElement()->setSpectrePond(p);
499 getElement()->setSpectrePond(p);
507 int ret = getElement()->getCurrentCalcul()->edit(
this);
509 if (ret == QDialog::Accepted)
517 int ret = getElement()->getSite()->edit(
this);
519 if (ret == QDialog::Accepted)
527 int ret = getElement()->getListCalcul()[item->text(0).toInt()]->edit(
this);
529 if (ret == QDialog::Accepted)
532 for (
unsigned int i = 0; i < getElement()->getListCalcul().size(); i++)
535 item->setText(0, QString().setNum(i));
536 item->setText(1, getElement()->getListCalcul().at(i)->getName());
543 _lineEditDistMax->setText(QString().setNum(getElement()->getDefaultDMax()));
551 QTreeWidgetItem* item =
556 QMenu* pMenu =
new QMenu(
this);
558 QAction* prop = pMenu->addAction(
TR(
"id_property"));
outil IHM pour une entrée utilisateur (fichier header)
std::vector< LPTYPointControl > TYTabLPPointControl
Collection de Smart Pointer sur TYPointControl.
classe de definition d'un projet.