Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add widget for single band gray raster renderer
- Loading branch information
Showing
6 changed files
with
220 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*************************************************************************** | ||
qgssinglebandgrayrendererwidget.h | ||
--------------------------------- | ||
begin : March 2012 | ||
copyright : (C) 2012 by Marco Hugentobler | ||
email : marco at sourcepole dot ch | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgssinglebandgrayrendererwidget.h" | ||
|
||
QgsSingleBandGrayRendererWidget::QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer ): QgsRasterRendererWidget( layer ) | ||
{ | ||
setupUi( this ); | ||
} | ||
|
||
QgsSingleBandGrayRendererWidget::~QgsSingleBandGrayRendererWidget() | ||
{ | ||
} | ||
|
||
QgsRasterRenderer* QgsSingleBandGrayRendererWidget::renderer() | ||
{ | ||
return 0; //soon... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/*************************************************************************** | ||
qgssinglebandgrayrendererwidget.h | ||
--------------------------------- | ||
begin : March 2012 | ||
copyright : (C) 2012 by Marco Hugentobler | ||
email : marco at sourcepole dot ch | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSSINGLEBANDGRAYRENDERERWIDGET_H | ||
#define QGSSINGLEBANDGRAYRENDERERWIDGET_H | ||
|
||
#include "qgsrasterrendererwidget.h" | ||
#include "ui_qgssinglebandgrayrendererwidgetbase.h" | ||
|
||
class QgsSingleBandGrayRendererWidget: public QgsRasterRendererWidget, private Ui::QgsSingleBandGrayRendererWidgetBase | ||
{ | ||
Q_OBJECT | ||
public: | ||
QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer ); | ||
~QgsSingleBandGrayRendererWidget(); | ||
|
||
static QgsRasterRendererWidget* create( QgsRasterLayer* layer ) { return new QgsSingleBandGrayRendererWidget( layer ); } | ||
|
||
QgsRasterRenderer* renderer(); | ||
}; | ||
|
||
#endif // QGSSINGLEBANDGRAYRENDERERWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>QgsSingleBandGrayRendererWidgetBase</class> | ||
<widget class="QWidget" name="QgsSingleBandGrayRendererWidgetBase"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout_3"> | ||
<item row="0" column="0"> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="mGrayBandLabel"> | ||
<property name="text"> | ||
<string>Gray band</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="QComboBox" name="mGrayBandComboBox"/> | ||
</item> | ||
<item row="1" column="0"> | ||
<widget class="QLabel" name="mContrastEnhancementLabel"> | ||
<property name="text"> | ||
<string>Contrast enhancement</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="1"> | ||
<widget class="QComboBox" name="mContrastEnhancementComboBox"/> | ||
</item> | ||
</layout> | ||
</item> | ||
<item row="1" column="0"> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<widget class="QLabel" name="mMinLabel"> | ||
<property name="text"> | ||
<string>Min</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLineEdit" name="mMinLineEdit"/> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="mMaxLabel"> | ||
<property name="text"> | ||
<string>Max</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLineEdit" name="mMaxLineEdit"/> | ||
</item> | ||
</layout> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QGroupBox" name="mLoadMinMaxValuesGroupBox"> | ||
<property name="title"> | ||
<string>Load min-/max values</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout_2"> | ||
<item row="0" column="0"> | ||
<widget class="QRadioButton" name="mEstimateRadioButton"> | ||
<property name="text"> | ||
<string>Estimate (faster)</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1" colspan="2"> | ||
<spacer name="horizontalSpacer_3"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>254</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item row="1" column="0"> | ||
<widget class="QRadioButton" name="mActualRadioButton"> | ||
<property name="text"> | ||
<string>Actual (slower)</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="1" colspan="2"> | ||
<spacer name="horizontalSpacer_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>254</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item row="2" column="0"> | ||
<widget class="QRadioButton" name="mCurrentExtentRadioButton"> | ||
<property name="text"> | ||
<string>CurrentExtent</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1"> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>197</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item row="2" column="2"> | ||
<widget class="QPushButton" name="mLoadPushButton"> | ||
<property name="text"> | ||
<string>Load</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |