| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| #ifndef QGSRELIEF_H | ||
| #define QGSRELIEF_H | ||
|
|
||
| #include <QColor> | ||
| #include <QMap> | ||
| #include <QPair> | ||
| #include <QString> | ||
| #include "gdal.h" | ||
|
|
||
| class QgsAspectFilter; | ||
| class QgsSlopeFilter; | ||
| class QgsHillshadeFilter; | ||
| class QProgressDialog; | ||
|
|
||
| /**Produces coloured relief rasters from DEM*/ | ||
| class ANALYSIS_EXPORT QgsRelief | ||
| { | ||
| public: | ||
| struct ReliefColor | ||
| { | ||
| ReliefColor( const QColor& c, double min, double max ): color( c ), minElevation( min ), maxElevation( max ) { } | ||
| QColor color; | ||
| double minElevation; | ||
| double maxElevation; | ||
| }; | ||
|
|
||
| QgsRelief( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); | ||
| ~QgsRelief(); | ||
|
|
||
| /**Starts the calculation, reads from mInputFile and stores the result in mOutputFile | ||
| @param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed. | ||
| @return 0 in case of success*/ | ||
| int processRaster( QProgressDialog* p ); | ||
|
|
||
| double zFactor() const { return mZFactor; } | ||
| void setZFactor( double factor ) { mZFactor = factor; } | ||
|
|
||
| void clearReliefColors(); | ||
| void addReliefColorClass( const ReliefColor& color ); | ||
| const QList< ReliefColor >& reliefColors() const { return mReliefColors; } | ||
| void setReliefColors( const QList< ReliefColor >& c ) { mReliefColors = c; } | ||
|
|
||
| /**Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression | ||
| @return true in case of success*/ | ||
| QList< ReliefColor > calculateOptimizedReliefClasses(); | ||
|
|
||
| /**Write frequency of elevation values to file for manual inspection*/ | ||
| bool exportFrequencyDistributionToCsv( const QString& file ); | ||
|
|
||
| private: | ||
|
|
||
| QString mInputFile; | ||
| QString mOutputFile; | ||
| QString mOutputFormat; | ||
|
|
||
| double mCellSizeX; | ||
| double mCellSizeY; | ||
| /**The nodata value of the input layer*/ | ||
| float mInputNodataValue; | ||
| /**The nodata value of the output layer*/ | ||
| float mOutputNodataValue; | ||
|
|
||
| double mZFactor; | ||
|
|
||
| QgsSlopeFilter* mSlopeFilter; | ||
| QgsAspectFilter* mAspectFilter; | ||
| QgsHillshadeFilter* mHillshadeFilter285; | ||
| QgsHillshadeFilter* mHillshadeFilter300; | ||
| QgsHillshadeFilter* mHillshadeFilter315; | ||
|
|
||
| //relief colors and corresponding elevations | ||
| QList< ReliefColor > mReliefColors; | ||
|
|
||
| bool processNineCellWindow( float* x1, float* x2, float* x3, float* x4, float* x5, float* x6, float* x7, float* x8, float* x9, | ||
| int* red, int* green, int* blue ); | ||
|
|
||
| /**Opens the input file and returns the dataset handle and the number of pixels in x-/y- direction*/ | ||
| GDALDatasetH openInputFile( int& nCellsX, int& nCellsY ); | ||
| /**Opens the output driver and tests if it supports the creation of a new dataset | ||
| @return NULL on error and the driver handle on success*/ | ||
| GDALDriverH openOutputDriver(); | ||
| /**Opens the output file and sets the same geotransform and CRS as the input data | ||
| @return the output dataset or NULL in case of error*/ | ||
| GDALDatasetH openOutputFile( GDALDatasetH inputDataset, GDALDriverH outputDriver ); | ||
|
|
||
| /**Set elevation color*/ | ||
| bool setElevationColor( double elevation, int* red, int* green, int* blue ); | ||
|
|
||
| /**Sets relief colors*/ | ||
| void setDefaultReliefColors(); | ||
| /**Returns class (0-255) for an elevation value | ||
| @return elevation class or -1 in case of error*/ | ||
| int frequencyClassForElevation( double elevation, double minElevation, double elevationClassRange ); | ||
| /**Do one iteration of class break optimisation (algorithm from Garcia and Rodriguez)*/ | ||
| void optimiseClassBreaks( QList<int>& breaks, double* frequencies ); | ||
| /**Calculates coefficients a (slope) and b (y value for x=0) | ||
| @param input data points ( elevation class / frequency )*/ | ||
| bool calculateRegression( const QList< QPair < int, double > >& input, double& a, double& b ); | ||
| }; | ||
|
|
||
| #endif // QGSRELIEF_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,51 @@ | ||
| #ifndef QGSRASTERTERRAINANALYSISDIALOG_H | ||
| #define QGSRASTERTERRAINANALYSISDIALOG_H | ||
|
|
||
| #include "ui_qgsrasterterrainanalysisdialogbase.h" | ||
| #include "qgsrelief.h" | ||
|
|
||
| class QgsRasterTerrainAnalysisDialog: public QDialog, private Ui::QgsRasterTerrainAnalysisDialogBase | ||
| { | ||
| Q_OBJECT | ||
| public: | ||
|
|
||
| enum DisplayMode | ||
| { | ||
| NoParameter, | ||
| HillshadeInput, | ||
| ReliefInput | ||
| }; | ||
|
|
||
| QgsRasterTerrainAnalysisDialog( DisplayMode mode = NoParameter, QWidget * parent = 0, Qt::WindowFlags f = 0 ); | ||
| ~QgsRasterTerrainAnalysisDialog(); | ||
|
|
||
| QList< QgsRelief::ReliefColor > reliefColors() const; | ||
| QString inputFile() const; | ||
| QString outputFile() const; | ||
| QString outputFormat() const; | ||
|
|
||
| bool addResultToProject() const; | ||
| double zFactor() const; | ||
| double lightAzimuth() const; | ||
| double lightAngle() const; | ||
|
|
||
| private slots: | ||
| void on_mOutputLayerLineEdit_textChanged( const QString& text ); | ||
| void on_mAutomaticColorButton_clicked(); | ||
| void on_mOutputLayerToolButton_clicked(); | ||
| void on_mAddClassButton_clicked(); | ||
| void on_mRemoveClassButton_clicked(); | ||
| void on_mUpPushButton_clicked(); | ||
| void on_mDownPushButton_clicked(); | ||
| void on_mReliefClassTreeWidget_itemDoubleClicked( QTreeWidgetItem* item, int column ); | ||
| void on_mExportToCsvButton_clicked(); | ||
| void on_mExportColorsButton_clicked(); | ||
| void on_mImportColorsButton_clicked(); | ||
| void on_mButtonBox_accepted(); | ||
|
|
||
| private: | ||
| /**Stores relation between driver name and extension*/ | ||
| QMap<QString, QString> mDriverExtensionMap; | ||
| }; | ||
|
|
||
| #endif //QGSRASTERTERRAINANALYSISDIALOG_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,270 @@ | ||
| #include "qgsreliefdialog.h" | ||
| #include "qgsmaplayerregistry.h" | ||
| #include "qgsrasterlayer.h" | ||
| #include <QColorDialog> | ||
| #include <QDir> | ||
| #include <QFileDialog> | ||
| #include <QFileInfo> | ||
| #include <QInputDialog> | ||
| #include <QSettings> | ||
| #include "cpl_string.h" | ||
| #include "gdal.h" | ||
|
|
||
| QgsReliefDialog::QgsReliefDialog( DisplayMode mode, QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f ) | ||
| { | ||
| setupUi( this ); | ||
|
|
||
| if ( mode == HillshadeInput ) | ||
| { | ||
| mReliefColorsGroupBox->setVisible( false ); | ||
| mLightAzimuthAngleSpinBox->setValue( 300 ); | ||
| mLightVerticalAngleSpinBox->setValue( 40 ); | ||
| } | ||
| else if ( mode == ReliefInput ) | ||
| { | ||
| mIlluminationGroupBox->setVisible( false ); | ||
| } | ||
| else //no parameters | ||
| { | ||
| mReliefColorsGroupBox->setVisible( false ); | ||
| mIlluminationGroupBox->setVisible( false ); | ||
| } | ||
|
|
||
| mZFactorLineEdit->setText( "1.0" ); | ||
| mZFactorLineEdit->setValidator( new QDoubleValidator( this ) ); | ||
|
|
||
| //insert available raster layers | ||
| //enter available layers into the combo box | ||
| QMap<QString, QgsMapLayer*> mapLayers = QgsMapLayerRegistry::instance()->mapLayers(); | ||
| QMap<QString, QgsMapLayer*>::iterator layer_it = mapLayers.begin(); | ||
|
|
||
| //insert available input layers | ||
| for ( ; layer_it != mapLayers.end(); ++layer_it ) | ||
| { | ||
| QgsRasterLayer* rl = qobject_cast<QgsRasterLayer *>( layer_it.value() ); | ||
| if ( rl ) | ||
| { | ||
| mElevationLayerComboBox->addItem( rl->name(), QVariant( rl->id() ) ); | ||
| } | ||
| } | ||
|
|
||
| //insert available drivers that support the create() operation | ||
| GDALAllRegister(); | ||
|
|
||
| int nDrivers = GDALGetDriverCount(); | ||
| for ( int i = 0; i < nDrivers; ++i ) | ||
| { | ||
| GDALDriverH driver = GDALGetDriver( i ); | ||
| if ( driver != NULL ) | ||
| { | ||
| char** driverMetadata = GDALGetMetadata( driver, NULL ); | ||
| if ( CSLFetchBoolean( driverMetadata, GDAL_DCAP_CREATE, false ) ) | ||
| { | ||
| mOutputFormatComboBox->addItem( GDALGetDriverLongName( driver ), QVariant( GDALGetDriverShortName( driver ) ) ); | ||
|
|
||
| //store the driver shortnames and the corresponding extensions | ||
| //(just in case the user does not give an extension for the output file name) | ||
| int index = 0; | ||
| while (( driverMetadata ) && driverMetadata[index] != 0 ) | ||
| { | ||
| QStringList metadataTokens = QString( driverMetadata[index] ).split( "=", QString::SkipEmptyParts ); | ||
| if ( metadataTokens.size() < 1 ) | ||
| { | ||
| break; | ||
| } | ||
|
|
||
| if ( metadataTokens[0] == "DMD_EXTENSION" ) | ||
| { | ||
| if ( metadataTokens.size() < 2 ) | ||
| { | ||
| ++index; | ||
| continue; | ||
| } | ||
| mDriverExtensionMap.insert( QString( GDALGetDriverShortName( driver ) ), metadataTokens[1] ); | ||
| break; | ||
| } | ||
| ++index; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } | ||
|
|
||
| //and set last used driver in combo box | ||
| QSettings s; | ||
| QString lastUsedDriver = s.value( "/RasterTerrainAnalysis/lastOutputFormat", "GeoTIFF" ).toString(); | ||
| int lastDriverIndex = mOutputFormatComboBox->findText( lastUsedDriver ); | ||
| if ( lastDriverIndex != -1 ) | ||
| { | ||
| mOutputFormatComboBox->setCurrentIndex( lastDriverIndex ); | ||
| } | ||
|
|
||
| mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false ); | ||
| } | ||
|
|
||
| QgsReliefDialog::~QgsReliefDialog() | ||
| { | ||
| } | ||
|
|
||
| QList< QgsRelief::ReliefColor > QgsReliefDialog::reliefColors() const | ||
| { | ||
| QList< QgsRelief::ReliefColor > reliefColorList; | ||
|
|
||
| for ( int i = 0; i < mReliefClassTreeWidget->topLevelItemCount(); ++i ) | ||
| { | ||
| QTreeWidgetItem* reliefItem = mReliefClassTreeWidget->topLevelItem( i ); | ||
| if ( reliefItem ) | ||
| { | ||
| QgsRelief::ReliefColor rc( reliefItem->background( 2 ).color(), reliefItem->text( 0 ).toDouble(), reliefItem->text( 1 ).toDouble() ); | ||
| reliefColorList.push_back( rc ); | ||
| } | ||
| } | ||
|
|
||
| return reliefColorList; | ||
| } | ||
|
|
||
| QString QgsReliefDialog::inputFile() const | ||
| { | ||
| QgsMapLayer* inputLayer = QgsMapLayerRegistry::instance()->mapLayer( mElevationLayerComboBox->itemData( mElevationLayerComboBox->currentIndex() ).toString() ); | ||
| if ( !inputLayer ) | ||
| { | ||
| return ""; | ||
| } | ||
|
|
||
| QString inputFilePath = inputLayer->source(); | ||
| return inputFilePath; | ||
| } | ||
|
|
||
| QString QgsReliefDialog::outputFile() const | ||
| { | ||
| return mOutputLayerLineEdit->text(); | ||
| } | ||
|
|
||
| QString QgsReliefDialog::outputFormat() const | ||
| { | ||
| int index = mOutputFormatComboBox->currentIndex(); | ||
| if ( index == -1 ) | ||
| { | ||
| return ""; | ||
| } | ||
| return mOutputFormatComboBox->itemData( index ).toString(); | ||
| } | ||
|
|
||
| bool QgsReliefDialog::addResultToProject() const | ||
| { | ||
| return mAddResultToProjectCheckBox->isChecked(); | ||
| } | ||
|
|
||
| double QgsReliefDialog::zFactor() const | ||
| { | ||
| return mZFactorLineEdit->text().toDouble(); | ||
| } | ||
|
|
||
| void QgsReliefDialog::on_mOutputLayerLineEdit_textChanged( const QString& text ) | ||
| { | ||
| bool enabled = false; | ||
|
|
||
| QFileInfo fi( text ); | ||
| if ( fi.absoluteDir().exists() && mElevationLayerComboBox->count() > 0 ) | ||
| { | ||
| enabled = true; | ||
| } | ||
| mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled ); | ||
| } | ||
|
|
||
| void QgsReliefDialog::on_mAutomaticColorButton_clicked() | ||
| { | ||
| QgsRelief relief( inputFile(), outputFile(), outputFormat() ); | ||
| QList< QgsRelief::ReliefColor > reliefColorList = relief.calculateOptimizedReliefClasses(); | ||
| QList< QgsRelief::ReliefColor >::iterator it = reliefColorList.begin(); | ||
|
|
||
| mReliefClassTreeWidget->clear(); | ||
| for ( ; it != reliefColorList.end(); ++it ) | ||
| { | ||
| QTreeWidgetItem* item = new QTreeWidgetItem(); | ||
| item->setText( 0, QString::number( it->minElevation ) ); | ||
| item->setText( 1, QString::number( it->maxElevation ) ); | ||
| item->setBackground( 2, QBrush( it->color ) ); | ||
| mReliefClassTreeWidget->addTopLevelItem( item ); | ||
| } | ||
| } | ||
|
|
||
| void QgsReliefDialog::on_mExportToCsvButton_clicked() | ||
| { | ||
| QString file = QFileDialog::getSaveFileName( 0, tr("Export Frequency distribution as csv") ); | ||
| if( file.isEmpty() ) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| QgsRelief relief( inputFile(), outputFile(), outputFormat() ); | ||
| relief.exportFrequencyDistributionToCsv( file ); | ||
| } | ||
|
|
||
| void QgsReliefDialog::on_mOutputLayerToolButton_clicked() | ||
| { | ||
| QSettings s; | ||
| QString lastDir = s.value( "/RasterTerrainAnalysis/lastOutputDir" ).toString(); | ||
| QString saveFileName = QFileDialog::getSaveFileName( 0, tr( "Enter result file" ), lastDir ); | ||
| if ( !saveFileName.isNull() ) | ||
| { | ||
| mOutputLayerLineEdit->setText( saveFileName ); | ||
| } | ||
| } | ||
|
|
||
| double QgsReliefDialog::lightAzimuth() const | ||
| { | ||
| return mLightAzimuthAngleSpinBox->value(); | ||
| } | ||
|
|
||
| double QgsReliefDialog::lightAngle() const | ||
| { | ||
| return mLightVerticalAngleSpinBox->value(); | ||
| } | ||
|
|
||
| void QgsReliefDialog::on_mRemoveClassButton_clicked() | ||
| { | ||
| QList<QTreeWidgetItem*> selectedItems = mReliefClassTreeWidget->selectedItems(); | ||
| QList<QTreeWidgetItem*>::iterator itemIt = selectedItems.begin(); | ||
| for(; itemIt != selectedItems.end(); ++itemIt ) | ||
| { | ||
| delete *itemIt; | ||
| } | ||
| } | ||
|
|
||
| void QgsReliefDialog::on_mReliefClassTreeWidget_itemDoubleClicked( QTreeWidgetItem* item, int column ) | ||
| { | ||
| if( !item ) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| if( column == 0 ) | ||
| { | ||
| bool ok; | ||
| double d = QInputDialog::getDouble(0, tr("Enter lower elevation class bound"), tr("Elevation"), item->text( 0 ).toDouble(), -2147483647, | ||
| 2147483647, 2, &ok ); | ||
| if( ok ) | ||
| { | ||
| item->setText( 0, QString::number( d ) ); | ||
| } | ||
| } | ||
| else if( column == 1 ) | ||
| { | ||
| bool ok; | ||
| double d = QInputDialog::getDouble(0, tr("Enter upper elevation class bound"), tr("Elevation"), item->text( 1 ).toDouble(), -2147483647, | ||
| 2147483647, 2, &ok ); | ||
| if( ok ) | ||
| { | ||
| item->setText( 1, QString::number( d ) ); | ||
| } | ||
| } | ||
| else if( column == 2 ) | ||
| { | ||
| QColor c = QColorDialog::getColor( item->background( 2 ).color(), 0, tr("Select color for relief class") ); | ||
| if( c.isValid() ) | ||
| { | ||
| item->setBackground( 2, QBrush( c ) ); | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #ifndef QGSRELIEFDIALOG_H | ||
| #define QGSRELIEFDIALOG_H | ||
|
|
||
| #include "ui_qgsreliefdialogbase.h" | ||
| #include "qgsrelief.h" | ||
|
|
||
| class QgsReliefDialog: public QDialog, private Ui::QgsReliefDialogBase | ||
| { | ||
| Q_OBJECT | ||
| public: | ||
|
|
||
| enum DisplayMode | ||
| { | ||
| NoParameter, | ||
| HillshadeInput, | ||
| ReliefInput | ||
| }; | ||
|
|
||
| QgsReliefDialog( DisplayMode mode = NoParameter, QWidget * parent = 0, Qt::WindowFlags f = 0 ); | ||
| ~QgsReliefDialog(); | ||
|
|
||
| QList< QgsRelief::ReliefColor > reliefColors() const; | ||
| QString inputFile() const; | ||
| QString outputFile() const; | ||
| QString outputFormat() const; | ||
|
|
||
| bool addResultToProject() const; | ||
| double zFactor() const; | ||
| double lightAzimuth() const; | ||
| double lightAngle() const; | ||
|
|
||
| private slots: | ||
| void on_mOutputLayerLineEdit_textChanged( const QString& text ); | ||
| void on_mAutomaticColorButton_clicked(); | ||
| void on_mOutputLayerToolButton_clicked(); | ||
| void on_mRemoveClassButton_clicked(); | ||
| void on_mReliefClassTreeWidget_itemDoubleClicked( QTreeWidgetItem* item, int column ); | ||
| void on_mExportToCsvButton_clicked(); | ||
|
|
||
| private: | ||
| /**Stores relation between driver name and extension*/ | ||
| QMap<QString, QString> mDriverExtensionMap; | ||
| }; | ||
|
|
||
| #endif // QGSRELIEFDIALOG_H |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,230 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <ui version="4.0"> | ||
| <class>QgsReliefDialogBase</class> | ||
| <widget class="QDialog" name="QgsReliefDialogBase"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>0</x> | ||
| <y>0</y> | ||
| <width>393</width> | ||
| <height>405</height> | ||
| </rect> | ||
| </property> | ||
| <property name="windowTitle"> | ||
| <string>Dialog</string> | ||
| </property> | ||
| <layout class="QGridLayout" name="gridLayout_3"> | ||
| <item row="0" column="0"> | ||
| <widget class="QLabel" name="mElevationLayerLabel"> | ||
| <property name="text"> | ||
| <string>Elevation layer</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="1" colspan="2"> | ||
| <widget class="QComboBox" name="mElevationLayerComboBox"/> | ||
| </item> | ||
| <item row="1" column="0"> | ||
| <widget class="QLabel" name="mOutputLayerLabel"> | ||
| <property name="text"> | ||
| <string>Output layer</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="1"> | ||
| <widget class="QLineEdit" name="mOutputLayerLineEdit"/> | ||
| </item> | ||
| <item row="1" column="2"> | ||
| <widget class="QToolButton" name="mOutputLayerToolButton"> | ||
| <property name="text"> | ||
| <string>...</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="2" column="0"> | ||
| <widget class="QLabel" name="mOutputFormatLabel"> | ||
| <property name="text"> | ||
| <string>Output format</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="2" column="1" colspan="2"> | ||
| <widget class="QComboBox" name="mOutputFormatComboBox"/> | ||
| </item> | ||
| <item row="3" column="0"> | ||
| <widget class="QLabel" name="mZFactorLabel"> | ||
| <property name="text"> | ||
| <string>Z factor</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="3" column="1" colspan="2"> | ||
| <widget class="QLineEdit" name="mZFactorLineEdit"/> | ||
| </item> | ||
| <item row="4" column="0" colspan="2"> | ||
| <widget class="QCheckBox" name="mAddResultToProjectCheckBox"> | ||
| <property name="text"> | ||
| <string>Add result to project</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="5" column="0" colspan="3"> | ||
| <widget class="QGroupBox" name="mIlluminationGroupBox"> | ||
| <property name="title"> | ||
| <string>Illumination</string> | ||
| </property> | ||
| <layout class="QGridLayout" name="gridLayout_2"> | ||
| <item row="0" column="0"> | ||
| <widget class="QLabel" name="mLightAzimuthLabel"> | ||
| <property name="text"> | ||
| <string>Azimuth (horizontal angle)</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="1"> | ||
| <widget class="QDoubleSpinBox" name="mLightAzimuthAngleSpinBox"> | ||
| <property name="maximum"> | ||
| <double>360.000000000000000</double> | ||
| </property> | ||
| <property name="value"> | ||
| <double>300.000000000000000</double> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="0"> | ||
| <widget class="QLabel" name="mLightVerticalAngleLabel"> | ||
| <property name="text"> | ||
| <string>Vertical angle</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="1"> | ||
| <widget class="QDoubleSpinBox" name="mLightVerticalAngleSpinBox"> | ||
| <property name="maximum"> | ||
| <double>90.000000000000000</double> | ||
| </property> | ||
| <property name="value"> | ||
| <double>40.000000000000000</double> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </widget> | ||
| </item> | ||
| <item row="6" column="0" colspan="3"> | ||
| <widget class="QGroupBox" name="mReliefColorsGroupBox"> | ||
| <property name="title"> | ||
| <string>Relief colors</string> | ||
| </property> | ||
| <layout class="QGridLayout" name="gridLayout"> | ||
| <item row="0" column="2"> | ||
| <spacer name="horizontalSpacer"> | ||
| <property name="orientation"> | ||
| <enum>Qt::Horizontal</enum> | ||
| </property> | ||
| <property name="sizeHint" stdset="0"> | ||
| <size> | ||
| <width>268</width> | ||
| <height>20</height> | ||
| </size> | ||
| </property> | ||
| </spacer> | ||
| </item> | ||
| <item row="0" column="3"> | ||
| <widget class="QPushButton" name="mAddClassButton"> | ||
| <property name="text"> | ||
| <string>+</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="4"> | ||
| <widget class="QPushButton" name="mRemoveClassButton"> | ||
| <property name="text"> | ||
| <string>-</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="0" colspan="5"> | ||
| <widget class="QTreeWidget" name="mReliefClassTreeWidget"> | ||
| <column> | ||
| <property name="text"> | ||
| <string>Lower bound</string> | ||
| </property> | ||
| </column> | ||
| <column> | ||
| <property name="text"> | ||
| <string>Upper bound</string> | ||
| </property> | ||
| </column> | ||
| <column> | ||
| <property name="text"> | ||
| <string>Color</string> | ||
| </property> | ||
| </column> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="0"> | ||
| <widget class="QPushButton" name="mAutomaticColorButton"> | ||
| <property name="text"> | ||
| <string>Create automatically</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="1"> | ||
| <widget class="QPushButton" name="mExportToCsvButton"> | ||
| <property name="text"> | ||
| <string>Export distribution...</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </widget> | ||
| </item> | ||
| <item row="7" column="0" colspan="2"> | ||
| <widget class="QDialogButtonBox" name="mButtonBox"> | ||
| <property name="orientation"> | ||
| <enum>Qt::Horizontal</enum> | ||
| </property> | ||
| <property name="standardButtons"> | ||
| <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </widget> | ||
| <resources/> | ||
| <connections> | ||
| <connection> | ||
| <sender>mButtonBox</sender> | ||
| <signal>accepted()</signal> | ||
| <receiver>QgsReliefDialogBase</receiver> | ||
| <slot>accept()</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>248</x> | ||
| <y>254</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>157</x> | ||
| <y>274</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| <connection> | ||
| <sender>mButtonBox</sender> | ||
| <signal>rejected()</signal> | ||
| <receiver>QgsReliefDialogBase</receiver> | ||
| <slot>reject()</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>316</x> | ||
| <y>260</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>286</x> | ||
| <y>274</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| </connections> | ||
| </ui> |