X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ExportLandCoverMapDlg.cxx;h=4c18253687d04cfb38a47a6de23f3e996c94887c;hb=343c9561e2046ef5cab4368dbac8c30e829b6b56;hp=9da8db3674602c94459d2b946aef82c704690fec;hpb=1eb9517598bec3064daf719c6fde7e29e6a98836;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ExportLandCoverMapDlg.cxx b/src/HYDROGUI/HYDROGUI_ExportLandCoverMapDlg.cxx index 9da8db36..4c182536 100644 --- a/src/HYDROGUI/HYDROGUI_ExportLandCoverMapDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportLandCoverMapDlg.cxx @@ -23,8 +23,10 @@ #include #include #include +#include +#include -HYDROGUI_ExportLandCoverMapDlg::HYDROGUI_ExportLandCoverMapDlg( QWidget* theParent, const QStringList& theAttrItems ) +HYDROGUI_ExportLandCoverMapDlg::HYDROGUI_ExportLandCoverMapDlg( QWidget* theParent, bool IsLinear, const QStringList& theAttrItems ) : QtxDialog( theParent, false, true, QtxDialog::OKCancel ) { setWindowTitle( tr( "EXPORT_LANDCOVERMAP" ) ); @@ -43,6 +45,25 @@ HYDROGUI_ExportLandCoverMapDlg::HYDROGUI_ExportLandCoverMapDlg( QWidget* thePare aLayout->addWidget( myAttrCheckBox, 0, 0 ); aLayout->addWidget( myAvFields, 1, 0, 1, 2 ); + if(!IsLinear) + { + myDiscrLabel = new QLabel( tr( "LCM_DISCR_LABEL" ), mainFrame() ); + myDeflSpinBox = new QDoubleSpinBox( mainFrame() ); + myDeflSpinBox->setRange(0.001, 2); + myDeflSpinBox->setDecimals(3); + myDeflSpinBox->setSingleStep(0.001); + myDeflLabel = new QLabel ( tr( "LCM_DEFL_LABEL" ), mainFrame() ); + aLayout->addWidget( myDiscrLabel, 2, 0 ); + aLayout->addWidget( myDeflLabel, 3, 0, 1, 1 ); + aLayout->addWidget( myDeflSpinBox, 3, 1, 2, 2 ); + } + else + { + myDeflSpinBox = NULL; + myDeflLabel = NULL; + myDiscrLabel = NULL; + } + setMinimumSize( 300, 100 ); connect( myAttrCheckBox, SIGNAL(clicked(bool)), this, SLOT(onAttrCBChecked(bool))); @@ -70,3 +91,11 @@ bool HYDROGUI_ExportLandCoverMapDlg::getAttrCheckBoxState() { return myAttrCheckBox->isChecked(); } + +double HYDROGUI_ExportLandCoverMapDlg::getDeflValue() const +{ + if (myDeflSpinBox) + return myDeflSpinBox->value(); + else + return -1; //value is not needed +}