Code_TYMPAN
4.4.0
Industrial site acoustic simulation
Tympan
gui
widgets
TYSpectreWidget.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3
* This file is part of Code_TYMPAN (R).
4
* Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
* Code_TYMPAN (R) is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
* See the GNU General Public License for more details.
12
* You should have received a copy of the GNU General Public License along
13
* with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14
*/
15
27
#ifndef __TY_SPECTRE_WIDGET__
28
#define __TY_SPECTRE_WIDGET__
29
30
#include "
TYWidget.h
"
31
// Added by qt3to4:
32
#include <QGridLayout>
33
#include <QLabel>
34
#include <QString>
35
#include "
Tympan/models/business/acoustic/TYSpectre.h
"
36
37
class
QLineEdit;
38
class
QGridLayout;
39
class
QLabel;
40
class
QTreeWidget;
41
class
QGroupBox;
42
class
TYElementWidget
;
43
class
QComboBox;
44
class
QTabWidget;
45
class
QTableWidget;
46
class
QPushButton;
47
class
QPrinter;
48
class
QRadioButton;
49
class
QButtonGroup;
50
class
TYHistoWidget
;
51
class
TYCourbeWidget
;
52
57
class
TYSpectreWidget
:
public
TYWidget
58
{
59
Q_OBJECT
60
61
TY_DECL_METIER_WIDGET
(
TYSpectre
)
62
63
// Methodes
64
public
:
68
TYSpectreWidget
(
TYSpectre
* pElement, QWidget* _pParent = NULL);
72
virtual
~TYSpectreWidget
();
73
77
void
setPrecision
(
const
int
& prec)
78
{
79
_precision
= prec;
80
}
81
int
getPrecision
()
82
{
83
return
_precision
;
84
}
85
const
int
getPrecision
()
const
86
{
87
return
_precision
;
88
}
89
90
public
:
94
void
resetTab
();
95
100
void
spectreToTableau
(
TYSpectre
* pSpectre);
101
106
void
tableauToSpectre
(
TYSpectre
* pSpectre);
107
116
void
spectre
(
TYSpectre
* pSpectre);
117
121
using
TYSpectreFormProvider
=
TYSpectreForm
(*)();
122
static
void
setSpectreFormProvider
(
TYSpectreFormProvider
p);
123
static
TYSpectreFormProvider
spectreFormProvider
();
124
128
using
TYSpectrePondProvider
= QString (*)();
129
static
void
setSpectrePondProvider
(
TYSpectrePondProvider
p);
130
static
TYSpectrePondProvider
spectrePondProvider
();
131
132
public
slots:
133
virtual
void
updateContent
();
134
virtual
void
apply
();
135
139
void
exportCsv
();
140
144
void
importCsv
();
145
149
void
tabValueChanged
(
int
row,
int
col);
150
154
void
changeOctave
();
155
159
void
changePonderation
();
160
164
void
changeType
();
165
169
void
setContentEnabled
(
bool
state);
170
171
// Membres
172
protected
:
173
QGroupBox*
_groupBox
;
174
QTreeWidget*
_listViewTabSp
;
175
QLineEdit*
_lineEditRq
;
176
QLabel*
_labeRq
;
177
QComboBox*
_comboBoxType
;
178
QLabel*
_labelType
;
179
QTabWidget*
_tabWidget
;
180
QTableWidget*
_tableau
;
181
QPushButton*
_pushButtonExport
;
182
QPushButton*
_pushButtonImport
;
183
QRadioButton*
_radioButtonTiers
;
184
QRadioButton*
_radioButtonOctave
;
185
QRadioButton*
_radioButtonPondZ
;
186
QRadioButton*
_radioButtonPondA
;
187
QButtonGroup*
_formButtonGroup
;
188
QButtonGroup*
_pondButtonGroup
;
189
TYHistoWidget
*
_histoWidget
;
190
TYCourbeWidget
*
_courbeWidget
;
191
192
protected
:
193
QGridLayout*
_spectreLayout
;
194
QGridLayout*
_groupBoxLayout
;
195
196
TYElementWidget
*
_elmW
;
197
int
_nbFreq
;
198
QPrinter*
_printer
;
199
200
public
:
201
TYSpectre
*
_pTmpSpectre
;
202
203
protected
:
204
bool
_isModified
;
205
207
int
_precision
;
208
209
private
:
210
bool
_isDrawing
;
211
QString
_etatSpectre
;
212
QString
_pondSpectre
;
213
217
static
TYSpectreFormProvider
s_formProvider
;
218
222
static
TYSpectrePondProvider
s_pondProvider
;
223
228
static
bool
_warningConvertingTOtoOctShown
;
229
233
void
applyInitialFormFromProvider
();
234
238
void
applyInitialPondFromProvider
();
239
};
240
241
#endif
// __TY_SPECTRE_WIDGET__
TYSpectre.h
TYWidget.h
outil IHM pour un objet metier de type TYElement (fichier header)
TY_DECL_METIER_WIDGET
#define TY_DECL_METIER_WIDGET(classname)
Definition:
TYWidget.h:31
TYCourbeWidget
classe de l'objet IHM pour une courbe
Definition:
TYCourbeWidget.h:39
TYElementWidget
classe de l'objet IHM pour un element
Definition:
TYElementWidget.h:46
TYHistoWidget
classe de l'outil IHM pour un histogramme
Definition:
TYHistoWidget.h:39
TYSpectreWidget
classe de l'objet IHM pour un spectre
Definition:
TYSpectreWidget.h:58
TYSpectreWidget::applyInitialPondFromProvider
void applyInitialPondFromProvider()
Applique la pondération initiale du spectre fournie par le provider.
Definition:
TYSpectreWidget.cpp:834
TYSpectreWidget::changePonderation
void changePonderation()
Definition:
TYSpectreWidget.cpp:640
TYSpectreWidget::apply
virtual void apply()
Definition:
TYSpectreWidget.cpp:288
TYSpectreWidget::_lineEditRq
QLineEdit * _lineEditRq
Definition:
TYSpectreWidget.h:175
TYSpectreWidget::TYSpectrePondProvider
QString(*)() TYSpectrePondProvider
Definition:
TYSpectreWidget.h:128
TYSpectreWidget::_groupBoxLayout
QGridLayout * _groupBoxLayout
Definition:
TYSpectreWidget.h:194
TYSpectreWidget::~TYSpectreWidget
virtual ~TYSpectreWidget()
Definition:
TYSpectreWidget.cpp:235
TYSpectreWidget::changeOctave
void changeOctave()
Definition:
TYSpectreWidget.cpp:572
TYSpectreWidget::getPrecision
const int getPrecision() const
Definition:
TYSpectreWidget.h:85
TYSpectreWidget::changeType
void changeType()
Definition:
TYSpectreWidget.cpp:691
TYSpectreWidget::_printer
QPrinter * _printer
Definition:
TYSpectreWidget.h:198
TYSpectreWidget::_isModified
bool _isModified
Definition:
TYSpectreWidget.h:204
TYSpectreWidget::spectre
void spectre(TYSpectre *pSpectre)
Construit un spectre a partir du contenu du widget.
Definition:
TYSpectreWidget.cpp:793
TYSpectreWidget::_precision
int _precision
Precision d'affichage des spectres.
Definition:
TYSpectreWidget.h:207
TYSpectreWidget::exportCsv
void exportCsv()
Definition:
TYSpectreWidget.cpp:520
TYSpectreWidget::resetTab
void resetTab()
Initialisation du tableau.
Definition:
TYSpectreWidget.cpp:705
TYSpectreWidget::_labelType
QLabel * _labelType
Definition:
TYSpectreWidget.h:178
TYSpectreWidget::tabValueChanged
void tabValueChanged(int row, int col)
Definition:
TYSpectreWidget.cpp:308
TYSpectreWidget::_courbeWidget
TYCourbeWidget * _courbeWidget
Definition:
TYSpectreWidget.h:190
TYSpectreWidget::_nbFreq
int _nbFreq
Definition:
TYSpectreWidget.h:197
TYSpectreWidget::_radioButtonOctave
QRadioButton * _radioButtonOctave
Definition:
TYSpectreWidget.h:184
TYSpectreWidget::_groupBox
QGroupBox * _groupBox
Definition:
TYSpectreWidget.h:173
TYSpectreWidget::tableauToSpectre
void tableauToSpectre(TYSpectre *pSpectre)
Mise a jour d'un spectre depuis le tableau.
Definition:
TYSpectreWidget.cpp:755
TYSpectreWidget::_warningConvertingTOtoOctShown
static bool _warningConvertingTOtoOctShown
Definition:
TYSpectreWidget.h:228
TYSpectreWidget::_labeRq
QLabel * _labeRq
Definition:
TYSpectreWidget.h:176
TYSpectreWidget::_radioButtonPondA
QRadioButton * _radioButtonPondA
Definition:
TYSpectreWidget.h:186
TYSpectreWidget::_elmW
TYElementWidget * _elmW
Definition:
TYSpectreWidget.h:196
TYSpectreWidget::s_formProvider
static TYSpectreFormProvider s_formProvider
Definition:
TYSpectreWidget.h:217
TYSpectreWidget::_radioButtonPondZ
QRadioButton * _radioButtonPondZ
Definition:
TYSpectreWidget.h:185
TYSpectreWidget::setContentEnabled
void setContentEnabled(bool state)
Definition:
TYSpectreWidget.cpp:344
TYSpectreWidget::_pondSpectre
QString _pondSpectre
Definition:
TYSpectreWidget.h:212
TYSpectreWidget::_spectreLayout
QGridLayout * _spectreLayout
Definition:
TYSpectreWidget.h:193
TYSpectreWidget::setSpectrePondProvider
static void setSpectrePondProvider(TYSpectrePondProvider p)
Definition:
TYSpectreWidget.cpp:77
TYSpectreWidget::_histoWidget
TYHistoWidget * _histoWidget
Definition:
TYSpectreWidget.h:189
TYSpectreWidget::_listViewTabSp
QTreeWidget * _listViewTabSp
Definition:
TYSpectreWidget.h:174
TYSpectreWidget::_isDrawing
bool _isDrawing
Definition:
TYSpectreWidget.h:210
TYSpectreWidget::spectreToTableau
void spectreToTableau(TYSpectre *pSpectre)
Mise a jour du tableau depuis un spectre.
Definition:
TYSpectreWidget.cpp:717
TYSpectreWidget::getPrecision
int getPrecision()
Definition:
TYSpectreWidget.h:81
TYSpectreWidget::_etatSpectre
QString _etatSpectre
Definition:
TYSpectreWidget.h:211
TYSpectreWidget::setPrecision
void setPrecision(const int &prec)
Definition:
TYSpectreWidget.h:77
TYSpectreWidget::importCsv
void importCsv()
Definition:
TYSpectreWidget.cpp:361
TYSpectreWidget::_pushButtonImport
QPushButton * _pushButtonImport
Definition:
TYSpectreWidget.h:182
TYSpectreWidget::applyInitialFormFromProvider
void applyInitialFormFromProvider()
Applique la forme initiale du spectre fournie par le provider.
Definition:
TYSpectreWidget.cpp:808
TYSpectreWidget::setSpectreFormProvider
static void setSpectreFormProvider(TYSpectreFormProvider p)
Definition:
TYSpectreWidget.cpp:62
TYSpectreWidget::updateContent
virtual void updateContent()
Definition:
TYSpectreWidget.cpp:240
TYSpectreWidget::_pushButtonExport
QPushButton * _pushButtonExport
Definition:
TYSpectreWidget.h:181
TYSpectreWidget::TYSpectreFormProvider
TYSpectreForm(*)() TYSpectreFormProvider
Definition:
TYSpectreWidget.h:121
TYSpectreWidget::spectrePondProvider
static TYSpectrePondProvider spectrePondProvider()
Definition:
TYSpectreWidget.cpp:81
TYSpectreWidget::TYSpectreWidget
TYSpectreWidget(TYSpectre *pElement, QWidget *_pParent=NULL)
Definition:
TYSpectreWidget.cpp:88
TYSpectreWidget::_formButtonGroup
QButtonGroup * _formButtonGroup
Definition:
TYSpectreWidget.h:187
TYSpectreWidget::s_pondProvider
static TYSpectrePondProvider s_pondProvider
Definition:
TYSpectreWidget.h:222
TYSpectreWidget::_comboBoxType
QComboBox * _comboBoxType
Definition:
TYSpectreWidget.h:177
TYSpectreWidget::spectreFormProvider
static TYSpectreFormProvider spectreFormProvider()
Definition:
TYSpectreWidget.cpp:67
TYSpectreWidget::_pondButtonGroup
QButtonGroup * _pondButtonGroup
Definition:
TYSpectreWidget.h:188
TYSpectreWidget::_pTmpSpectre
TYSpectre * _pTmpSpectre
Definition:
TYSpectreWidget.h:201
TYSpectreWidget::_radioButtonTiers
QRadioButton * _radioButtonTiers
Definition:
TYSpectreWidget.h:183
TYSpectreWidget::_tabWidget
QTabWidget * _tabWidget
Definition:
TYSpectreWidget.h:179
TYSpectreWidget::_tableau
QTableWidget * _tableau
Definition:
TYSpectreWidget.h:180
TYSpectre
Definition:
TYSpectre.h:33
TYWidget
classe de l'objet IHM pour un objet metier de type TYElement
Definition:
TYWidget.h:43
TYSpectreForm
TYSpectreForm
Spectrum representation.
Definition:
spectre.h:36
Generated on Mon Dec 22 2025 10:42:02 for Code_TYMPAN by
1.9.1