#include <QComboBox>
#include <QLabel>
#include <QDoubleSpinBox>
+#include <QVBoxLayout>
HYDROGUI_ExportLandCoverMapDlg::HYDROGUI_ExportLandCoverMapDlg( QWidget* theParent, bool IsLinear, const QStringList& theAttrItems )
: QtxDialog( theParent, false, true, QtxDialog::OKCancel )
myAvFields->setEnabled(false);
myAvFields->addItems( theAttrItems );
- QGridLayout* aLayout = new QGridLayout( mainFrame() );
+ QVBoxLayout* aSketchLayout = new QVBoxLayout( mainFrame() );
+ aSketchLayout->setMargin( 0 );
+ aSketchLayout->setSpacing( 5 );
+
+ QGridLayout* aLayout = new QGridLayout();
aLayout->setMargin( 5 );
aLayout->setSpacing( 5 );
aLayout->addWidget( myAttrCheckBox, 0, 0 );
myDiscrLabel = NULL;
}
+ myWarningLabel = new QLabel( tr( "ATTRS_NOT_WRITTEN_TO_DBF" ), mainFrame() );
+ myWarningLabel->setStyleSheet("QLabel { font: italic; color : blue; }");
+
+ aSketchLayout->addLayout( aLayout );
+ aSketchLayout->addWidget( myWarningLabel, 1, Qt::AlignHCenter );
+ aSketchLayout->addStretch(1);
+
setMinimumSize( 300, 100 );
connect( myAttrCheckBox, SIGNAL(clicked(bool)), this, SLOT(onAttrCBChecked(bool)));
+ connect( myAvFields, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(onAvFieldsChanged(const QString&)));
}
myAvFields->setEnabled(true);
else
myAvFields->setEnabled(false);
+
+ myWarningLabel->setVisible( !theState || getCurrentItem().isEmpty() );
+}
+
+void HYDROGUI_ExportLandCoverMapDlg::onAvFieldsChanged(const QString& theText)
+{
+ myWarningLabel->setVisible( theText.isEmpty() );
}
QString HYDROGUI_ExportLandCoverMapDlg::getCurrentItem() const
<source>WRITE_ST_AS_ATTRS_TO_DBF</source>
<translation>Write Strickler Types as attributes values to DBF file</translation>
</message>
+ <message>
+ <source>ATTRS_NOT_WRITTEN_TO_DBF</source>
+ <translation>Note that in current settings the attributes will NOT be written</translation>
+ </message>
<message>
<source>LCM_DISCR_LABEL</source>
<translation>Current Land Cover Map contains at least one non-linear border. It will be exported in the discretization mode</translation>