Skip to content

Commit 3bf76b8

Browse files
author
Charles PIGNEROL
committed
Version 4.5.0. Method QtQualityDividerWidget::getOptionsLayout.
1 parent 387563a commit 3bf76b8

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
set (QQUALIF_MAJOR_VERSION "4")
6-
set (QQUALIF_MINOR_VERSION "4")
6+
set (QQUALIF_MINOR_VERSION "5")
77
set (QQUALIF_RELEASE_VERSION "0")
88
set (QQUALIF_VERSION ${QQUALIF_MAJOR_VERSION}.${QQUALIF_MINOR_VERSION}.${QQUALIF_RELEASE_VERSION})
99

src/QtQualif/QtQualityDividerWidget.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ QtQualityDividerWidget::QtQualityDividerWidget (QWidget* parent, const string& a
103103
_minTextField (0), _maxTextField (0),
104104
_criterionComboBox (0), _dataTypesList (0), _seriesExtractionsTableWidget (),
105105
_coordinatesCheckBox (0), _releaseDataCheckBox (0),
106-
_buttonsLayout (0), _applyButton (0),
106+
_buttonsLayout (0), _optionsLayout (0), _applyButton (0),
107107
_criterion ((Qualif::Critere)-1)
108108
{
109109
QVBoxLayout* mainLayout = new QVBoxLayout (this);
@@ -180,20 +180,20 @@ QtQualityDividerWidget::QtQualityDividerWidget (QWidget* parent, const string& a
180180
QAbstractItemModel* dataTypeModel = _dataTypesList->model ( );
181181
dataTypeModel->setHeaderData (0, Qt::Horizontal, QVariant(QSTR ("Types de données")));
182182
_dataTypesList->setToolTip (QSTR ("Liste des types de mailles à prendre en compte lors du traitement."));
183-
QVBoxLayout* vlayout = new QVBoxLayout ( );
184-
hboxLayout->addLayout (vlayout);
183+
_optionsLayout = new QVBoxLayout ( );
184+
hboxLayout->addLayout (_optionsLayout);
185185
_coordinatesCheckBox = new QCheckBox (QSTR ("Validité des coordonnées"), this);
186-
vlayout->addWidget (_coordinatesCheckBox);
186+
_optionsLayout->addWidget (_coordinatesCheckBox);
187187
_coordinatesCheckBox->setFixedSize (_coordinatesCheckBox->sizeHint ( ));
188188
_coordinatesCheckBox->setChecked (true);
189189
_coordinatesCheckBox->setToolTip (QSTR ("Activé, effectue une analyse préalable des coordonnées des noeuds des mailles."));
190190
_releaseDataCheckBox = new QCheckBox (QSTR ("Libérer la mémoire après chaque critère"), this);
191-
vlayout->addWidget (_releaseDataCheckBox);
191+
_optionsLayout->addWidget (_releaseDataCheckBox);
192192
_releaseDataCheckBox->setFixedSize (_releaseDataCheckBox->sizeHint ( ));
193193
_releaseDataCheckBox->setChecked (true);
194194
_releaseDataCheckBox->setToolTip (QSTR ("Activé, libère la mémoire utilisée en cache à chaque changement de critère."));
195195
hboxLayout->addStretch (10.);
196-
vlayout->addStretch (10.);
196+
_optionsLayout->addStretch (10.);
197197

198198
// 4-ième ligne : boutons :
199199
_buttonsLayout = new QHBoxLayout ( );
@@ -219,7 +219,7 @@ QtQualityDividerWidget::QtQualityDividerWidget (const QtQualityDividerWidget&)
219219
_minTextField (0), _maxTextField (0),
220220
_criterionComboBox (0), _dataTypesList (0), _seriesExtractionsTableWidget (0),
221221
_coordinatesCheckBox (0), _releaseDataCheckBox (0),
222-
_buttonsLayout (0), _applyButton (0),
222+
_buttonsLayout (0), _optionsLayout (0), _applyButton (0),
223223
_criterion ((Qualif::Critere)-1)
224224
{
225225
assert (0 && "QtQualityDividerWidget copy constructor is not allowed.");
@@ -334,7 +334,6 @@ void QtQualityDividerWidget::compute ( )
334334
{
335335
AbstractQualifSerie* serie = _series [j];
336336
CHECK_NULL_PTR_ERROR (serie)
337-
//cout << "SERIE " << (unsigned long)j << " IS CALLED " << serie->getName ( ) << " AND HAS " << values [0][j] << "/" << serie->getCellCount ( ) << " BAD CELLS" << endl;
338337
QTableWidgetItem* item = new QTableWidgetItem (serie->getName ( ).c_str ( ));
339338
item->setCheckState (Qt::Unchecked);
340339
_seriesExtractionsTableWidget->setItem (j, 0, item);
@@ -529,6 +528,13 @@ QHBoxLayout& QtQualityDividerWidget::getButtonsLayout ( )
529528
} // QtQualityDividerWidget::getButtonsLayout
530529

531530

531+
QVBoxLayout& QtQualityDividerWidget::getOptionsLayout ( )
532+
{
533+
assert (0 != _optionsLayout && "QtQualityDividerWidget::getOptionsLayout : null layout.");
534+
return *_optionsLayout;
535+
} // QtQualityDividerWidget::getOptionsLayout
536+
537+
532538
void QtQualityDividerWidget::displayExtraction (size_t i, bool display)
533539
{
534540
throw Exception ("QtQualityDividerWidget::displayExtraction should be overloaded");

src/QtQualif/public/QtQualif/QtQualityDividerWidget.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,20 @@ class QtQualityDividerWidget : public QWidget
146146
* @return Une référence sur le gestionnaire de mise en forme du bandeau horizontal de boutons.
147147
*/
148148
virtual QHBoxLayout& getButtonsLayout ( );
149+
150+
/**
151+
* Personnalisation de l'IHM : ajouter un case à cocher "option". Le parent du bouton doit être a priori cette instance, il convient ensuite
152+
* de l'ajouter au gestionnaire de mise en forme du bandeau vertical de cases à cocher. Ex :<BR>
153+
* <CODE>
154+
* QtQualityDividerWidget* qualifWidget = new QtQualityDividerWidget (...);
155+
* QCheckBox* wireCheckBox = new QCheckBox ("Mode filaire", qualifWidget);
156+
* qualifWidget->getOptionsLayout ( ).addWidget (wireCheckBox);
157+
* connect (wireCheckBox, ...);
158+
* </CODE>
159+
* @return Une référence sur le gestionnaire de mise en forme du bandeau vertical de cases à cocher.
160+
*/
161+
virtual QVBoxLayout& getOptionsLayout ( );
162+
149163

150164

151165
protected :
@@ -232,6 +246,7 @@ class QtQualityDividerWidget : public QWidget
232246
QCheckBox* _releaseDataCheckBox;
233247
// Les boutons :
234248
QHBoxLayout* _buttonsLayout;
249+
QVBoxLayout* _optionsLayout;
235250
QPushButton* _applyButton;
236251

237252
// Gestion des données en cache :

versions.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 4.5.0 : 25/06/24
2+
===============
3+
4+
Méthode QtQualityDividerWidget::getOptionsLayout
5+
6+
17
Version 4.4.0 : 22/06/24
28
===============
39

0 commit comments

Comments
 (0)