Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.6.0. Various small developments of the QtQualityDividerWidg… #7

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

set (QQUALIF_MAJOR_VERSION "4")
set (QQUALIF_MINOR_VERSION "5")
set (QQUALIF_MINOR_VERSION "6")
set (QQUALIF_RELEASE_VERSION "0")
set (QQUALIF_VERSION ${QQUALIF_MAJOR_VERSION}.${QQUALIF_MINOR_VERSION}.${QQUALIF_RELEASE_VERSION})

Expand Down
2 changes: 1 addition & 1 deletion src/QtQualif/QtQualifWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ QualifRangeTask* QtQualifWidget::createRangeTask (
size_t types, Critere criterion, const vector<AbstractQualifSerie*>& series)
{
return new QualifRangeTask (types, criterion, series);
} // QtQualifWidget::createAnalysisTask
} // QtQualifWidget::createRangeTask


QualifAnalysisTask* QtQualifWidget::createAnalysisTask (
Expand Down
22 changes: 19 additions & 3 deletions src/QtQualif/QtQualityDividerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <TkUtil/Exception.h>
#include <TkUtil/InternalError.h>
#include <TkUtil/MemoryError.h>
#include <TkUtil/NumericConversions.h>
#include <TkUtil/NumericServices.h>
#include <TkUtil/ThreadManager.h>
#include <TkUtil/UTF8String.h>
Expand Down Expand Up @@ -100,7 +101,7 @@ class QtQualifDataTypeItem : public QListWidgetItem
QtQualityDividerWidget::QtQualityDividerWidget (QWidget* parent, const string& appTitle)
: QWidget (parent),
_appTitle (appTitle), _series ( ),
_minTextField (0), _maxTextField (0),
_minTextField (0), _maxTextField (0), _domainLabel (0),
_criterionComboBox (0), _dataTypesList (0), _seriesExtractionsTableWidget (),
_coordinatesCheckBox (0), _releaseDataCheckBox (0),
_buttonsLayout (0), _optionsLayout (0), _applyButton (0),
Expand Down Expand Up @@ -134,7 +135,10 @@ QtQualityDividerWidget::QtQualityDividerWidget (QWidget* parent, const string& a
_maxTextField->setFixedSize (_maxTextField->sizeHint ( ));
hboxLayout->setStretchFactor (_maxTextField, 1);
_maxTextField->setToolTip (QSTR ("Champ de saisie de la valeur maximale à représenter."));
hboxLayout->addStretch (10.);
_domainLabel = new QLabel ("Domaine : [,]", this);
_domainLabel->setAlignment (Qt::AlignLeft | Qt::AlignVCenter);
hboxLayout->addWidget (_domainLabel);
// hboxLayout->addStretch (10.);

// 2-ième ligne : critère :
hboxLayout = new QHBoxLayout ( );
Expand Down Expand Up @@ -216,7 +220,7 @@ QtQualityDividerWidget::QtQualityDividerWidget (QWidget* parent, const string& a
QtQualityDividerWidget::QtQualityDividerWidget (const QtQualityDividerWidget&)
: QWidget (0),
_appTitle ("Invalid application"), _series ( ),
_minTextField (0), _maxTextField (0),
_minTextField (0), _maxTextField (0), _domainLabel (0),
_criterionComboBox (0), _dataTypesList (0), _seriesExtractionsTableWidget (0),
_coordinatesCheckBox (0), _releaseDataCheckBox (0),
_buttonsLayout (0), _optionsLayout (0), _applyButton (0),
Expand Down Expand Up @@ -576,6 +580,12 @@ void QtQualityDividerWidget::displayErrorMessage (const UTF8String& msg)
} // QtQualityDividerWidget::displayErrorMessage


QualifRangeTask* QtQualityDividerWidget::createRangeTask (size_t types, Critere criterion, const vector<AbstractQualifSerie*>& series)
{
return new QualifRangeTask (types, criterion, series);
} // QtQualityDividerWidget::createRangeTask


QualifAnalysisTask* QtQualityDividerWidget::createAnalysisTask (size_t types, Critere criterion, double min, double max, const vector<AbstractQualifSerie*>& series)
{
return new QualifAnalysisTask (types, criterion, 1, min, max, true, series);
Expand All @@ -586,13 +596,17 @@ void QtQualityDividerWidget::updateDomainCallback ( )
{
assert (0 != _minTextField);
assert (0 != _maxTextField);
assert (0 != _domainLabel);
try
{
QtAutoWaitingCursor cursor (true);

const double userMin = getDomainMinValue ( ), userMax = getDomainMaxValue ( );
double min = 0., max = 1.;
QualifHelper::getDomain (getCriterion ( ), getQualifiedTypes ( ), min, max);
UTF8String domain ("Domaine : ", charset);
domain << "[" << NumericConversions::shortestRepresentation (min, 2) << ", " << NumericConversions::shortestRepresentation (max, 2) << "]";
_domainLabel->setText (domain.utf8 ( ).c_str ( ));
if ((userMin < min) || (userMin >= max))
_minTextField->setText (QString::number (min));
if ((userMax > max) || (userMax <= min))
Expand All @@ -608,9 +622,11 @@ void QtQualityDividerWidget::updateSelectableTypesCallback ( )
{
assert ((0 != _criterionComboBox) && "QtQualityDividerWidget::updateSelectableTypesCallback : null criteria combo box.");
assert ((0 != _dataTypesList) && "QtQualityDividerWidget::updateSelectableTypesCallback : null types list.");
assert (0 != _domainLabel);

BEGIN_TRY_CATCH_BLOCK

_domainLabel->setText ("Domaine : [, ]");
Critere criterion = getCriterion ( );
const int itemCount = _dataTypesList->count ( );
for (int i = 0; i < itemCount; i++)
Expand Down
11 changes: 11 additions & 0 deletions src/QtQualif/public/QtQualif/QtQualityDividerWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <QListWidget>
#include <QComboBox>
#include <QCheckBox>
#include <QLabel>
#include <QPushButton>
#include <QTableWidget>

Expand Down Expand Up @@ -188,6 +189,15 @@ class QtQualityDividerWidget : public QWidget
*/
virtual void displayErrorMessage (const IN_UTIL UTF8String& msg);

/**
* Créé une tâche <I>Qualif</I> qui recueille les extrema pris par les mailles d'analyse de mailles de séries soumises à un critère de qualité.
* Cette tâche est à détruire par la fonction appelante.
* @param Les types de mailles au sens <I>QualifHelper</I>, définis par un ou exclusif sur les types élémentaires (TRIANGLE, ...).
* @param Le critère <I>Qualif</I> appliqué à la tâche.
* @param Les séries soumises à l'analyse <I>Qualif</I>.
*/
virtual GQualif::QualifRangeTask* createRangeTask (size_t types, Qualif::Critere criterion, const std::vector<AbstractQualifSerie*>& series);

/**
* Créé une tâche <I>Qualif</I> d'analyse de mailles. Cette tâche est à détruire par la fonction appelante.
* @param Les types de mailles au sens <I>QualifHelper</I>, définis par un ou exclusif sur les types élémentaires (TRIANGLE, ...).
Expand Down Expand Up @@ -240,6 +250,7 @@ class QtQualityDividerWidget : public QWidget

QtTextField* _minTextField;
QtTextField* _maxTextField;
QLabel* _domainLabel;
QComboBox* _criterionComboBox;
QListWidget* _dataTypesList;
QCheckBox* _coordinatesCheckBox;
Expand Down
10 changes: 8 additions & 2 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
Version 4.5.0 : 25/06/24
Version 4.6.0 : 20/11/24
===============

Diverses petites évolutions de QtQualityDividerWidget.


Version 4.5.0 : 25/10/24
===============

Méthode QtQualityDividerWidget::getOptionsLayout


Version 4.4.0 : 22/06/24
Version 4.4.0 : 22/10/24
===============

Classe QtQualityDividerWidget permettant de rechercher dans un maillage les mailles correspondant à un certain profil de qualité
Expand Down