15 changes: 11 additions & 4 deletions src/gui/raster/qgsrasterhistogramwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ QgsRasterHistogramWidget::QgsRasterHistogramWidget( QgsRasterLayer* lyr, QWidget
group = new QActionGroup( this );
group->setExclusive( false );
connect( group, SIGNAL( triggered( QAction* ) ), this, SLOT( histoActionTriggered( QAction* ) ) );
// action = new QAction( tr( "Load min/max from band" ), group );
action = new QAction( tr( "Reset" ), group );
action->setData( QVariant( "Load reset" ) );
menu->addAction( action );

// Load min/max needs 3 params (method, extent, accuracy), cannot put it in single item
#if 0
action = new QAction( tr( "Load min/max" ), group );
action->setSeparator( true );
menu->addAction( action );
Expand All @@ -143,14 +148,12 @@ QgsRasterHistogramWidget::QgsRasterHistogramWidget( QgsRasterLayer* lyr, QWidget
action = new QAction( tr( "Use stddev (custom)" ), group );
action->setData( QVariant( "Load stddev" ) );
menu->addAction( action );
action = new QAction( tr( "Reset" ), group );
action->setData( QVariant( "Load reset" ) );
menu->addAction( action );
action = new QAction( tr( "Load for each band" ), group );
action->setData( QVariant( "Load apply all" ) );
action->setCheckable( true );
action->setChecked( mHistoLoadApplyAll );
menu->addAction( action );
#endif

//others
menu->addSeparator( );
Expand Down Expand Up @@ -688,11 +691,13 @@ void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actio
myBands << cboHistoBand->currentIndex() + 1;

// get stddev value once if needed
/*
double myStdDev = 1.0;
if ( actionName == "Load stddev" )
{
myStdDev = mRendererWidget->stdDev().toDouble();
}
*/

// don't update markers every time
leHistoMin->blockSignals( true );
Expand All @@ -702,6 +707,7 @@ void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actio
foreach( int theBandNo, myBands )
{
ok = false;
#if 0
if ( actionName == "Load actual" )
{
ok = mRendererWidget->bandMinMax( QgsRasterRendererWidget::Actual,
Expand All @@ -722,6 +728,7 @@ void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actio
{
ok = mRendererWidget->bandMinMaxFromStdDev( myStdDev, theBandNo, minMaxValues );
}
#endif

// apply current item
cboHistoBand->setCurrentIndex( theBandNo - 1 );
Expand Down
82 changes: 82 additions & 0 deletions src/gui/raster/qgsrasterminmaxwidget.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/***************************************************************************
qgsrasterminmaxwidget.h
---------------------------------
begin : July 2012
copyright : (C) 2012 by Radim Blazek
email : radim dot blazek at gmail dot com
***************************************************************************/

/***************************************************************************
* *
* 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 "qgsrasterlayer.h"
#include "qgsrasterminmaxwidget.h"

QgsRasterMinMaxWidget::QgsRasterMinMaxWidget( QgsRasterLayer* theLayer, QWidget *parent ):
QWidget( parent )
,mLayer ( theLayer )
{
QgsDebugMsg("Entered.");
setupUi( this );
}

QgsRasterMinMaxWidget::~QgsRasterMinMaxWidget()
{
}

void QgsRasterMinMaxWidget::on_mLoadPushButton_clicked()
{
QgsDebugMsg("Entered.");

foreach ( int myBand, mBands )
{
QgsDebugMsg( QString("myBand = %1").arg(myBand));
if ( myBand < 1 || myBand > mLayer->dataProvider()->bandCount() )
{
continue;
}
double myMin = std::numeric_limits<double>::quiet_NaN();
double myMax = std::numeric_limits<double>::quiet_NaN();

QgsRectangle myExtent; // empty == full
if ( mCurrentExtentRadioButton->isChecked() )
{
myExtent = mExtent; // current
}
QgsDebugMsg( QString("myExtent.isEmpty() = %1").arg(myExtent.isEmpty()) );

int mySampleSize = 0; // 0 == exact
if ( mEstimateRadioButton->isChecked() )
{
mySampleSize = 250000;
}

if ( mCumulativeCutRadioButton->isChecked() )
{
mLayer->dataProvider()->cumulativeCut ( myBand, 0.02, 0.98, myMin, myMax, myExtent, mySampleSize );
}
else if ( mMinMaxRadioButton->isChecked() )
{
// TODO: consider provider minimum/maximumValue() (has to be defined well in povider)
QgsRasterBandStats myRasterBandStats = mLayer->dataProvider()->bandStatistics( myBand, myExtent, mySampleSize );
myMin = myRasterBandStats.minimumValue;
myMax = myRasterBandStats.maximumValue;
}
else if ( mStdDevRadioButton->isChecked() )
{
QgsRasterBandStats myRasterBandStats = mLayer->dataProvider()->bandStatistics( myBand, myExtent, mySampleSize );
double myStdDev = mStdDevSpinBox->value();
myMin = myRasterBandStats.mean - ( myStdDev * myRasterBandStats.stdDev );
myMax = myRasterBandStats.mean + ( myStdDev * myRasterBandStats.stdDev );

}

emit load ( myBand, myMin, myMax );
}
}
48 changes: 48 additions & 0 deletions src/gui/raster/qgsrasterminmaxwidget.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/***************************************************************************
qgsrasterminmaxwidget.h
---------------------------------
begin : July 2012
copyright : (C) 2012 by Radim Blazek
email : radim dot blazek at gmail dot com
***************************************************************************/

/***************************************************************************
* *
* 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 QGSRASTERMINMAXWIDGET_H
#define QGSRASTERMINMAXWIDGET_H

#include "ui_qgsrasterminmaxwidgetbase.h"
#include "qgsrasterlayer.h"
#include "qgsrectangle.h"

class GUI_EXPORT QgsRasterMinMaxWidget: public QWidget, private Ui::QgsRasterMinMaxWidgetBase
{
Q_OBJECT
public:
QgsRasterMinMaxWidget( QgsRasterLayer* theLayer, QWidget *parent = 0 );
~QgsRasterMinMaxWidget();

void setExtent ( const QgsRectangle & theExtent ) { mExtent = theExtent; }

void setBands ( const QList<int> & theBands ) { mBands = theBands; }

signals:
void load( int theBandNo, double theMin, double theMax );

private slots:
void on_mLoadPushButton_clicked();

private:
QgsRasterLayer* mLayer;
QList<int> mBands;
QgsRectangle mExtent;
};

#endif // QGSRASTERMINMAXWIDGET_H
91 changes: 0 additions & 91 deletions src/gui/raster/qgsrasterrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,94 +44,3 @@ QString QgsRasterRendererWidget::displayBandName( int band ) const
return name;
}

bool QgsRasterRendererWidget::bandMinMax( LoadMinMaxAlgo loadAlgo, int band, double* minMaxValues )
{
if ( !mRasterLayer )
{
return false;
}
QgsRasterDataProvider* provider = mRasterLayer->dataProvider();
if ( !provider )
{
return false;
}
if ( band <= 0 )
{
return false;
}

if ( loadAlgo == Estimate )
{
minMaxValues[0] = provider->minimumValue( band );
minMaxValues[1] = provider->maximumValue( band );
}
else if ( loadAlgo == Actual )
{
QgsRasterBandStats rasterBandStats = mRasterLayer->dataProvider()->bandStatistics( band );
minMaxValues[0] = rasterBandStats.minimumValue;
minMaxValues[1] = rasterBandStats.maximumValue;
}
else if ( loadAlgo == CurrentExtent )
{
mRasterLayer->computeMinimumMaximumFromLastExtent( band, minMaxValues );
}
else if ( loadAlgo == CumulativeCut )
{
// Currently 2 - 98% cumulative pixel count cut
//QgsRasterBandStats myRasterBandStats = mRasterLayer->bandStatistics( band );

int sampleSize = 250000; // number of sample cells
QgsRasterHistogram myHistogram = mRasterLayer->dataProvider()->histogram( band, 0, std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(), QgsRectangle(), sampleSize );

double myBinXStep = ( myHistogram.maximum - myHistogram.minimum ) / myHistogram.binCount;
int myCount = 0;
int myMinCount = ( int ) qRound( 0.02 * myHistogram.nonNullCount );
int myMaxCount = ( int ) qRound( 0.98 * myHistogram.nonNullCount );
bool myMinFound = false;
QgsDebugMsg( QString( "binCount = %1 minimum = %2 maximum = %3 myBinXStep = %4" ).arg( myHistogram.binCount ).arg( myHistogram.minimum ).arg( myHistogram.maximum ).arg( myBinXStep ) );

for ( int myBin = 0; myBin < myHistogram.histogramVector.size(); myBin++ )
{
int myBinValue = myHistogram.histogramVector.value( myBin );
myCount += myBinValue;
if ( !myMinFound && myCount > myMinCount )
{
minMaxValues[0] = myHistogram.minimum + myBin * myBinXStep;
myMinFound = true;
}
if ( myCount > myMaxCount )
{
minMaxValues[1] = myHistogram.minimum + myBin * myBinXStep;
break;
}
}
}
else
{
return false;
}
return true;
}

bool QgsRasterRendererWidget::bandMinMaxFromStdDev( double stdDev, int band, double* minMaxValues )
{
if ( !mRasterLayer )
{
return false;
}
QgsRasterDataProvider* provider = mRasterLayer->dataProvider();
if ( !provider )
{
return false;
}
if ( band < 0 )
{
return false;
}

QgsRasterBandStats myRasterBandStats = mRasterLayer->dataProvider()->bandStatistics( band );
minMaxValues[0] = myRasterBandStats.mean - ( stdDev * myRasterBandStats.stdDev );
minMaxValues[1] = myRasterBandStats.mean + ( stdDev * myRasterBandStats.stdDev );

return true;
}
14 changes: 10 additions & 4 deletions src/gui/raster/qgsrasterrendererwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#ifndef QGSRASTERRENDERERWIDGET_H
#define QGSRASTERRENDERERWIDGET_H

#include "qgsrectangle.h"

#include <QWidget>

class QgsRasterLayer;
Expand All @@ -26,7 +28,11 @@ class QgsRasterRenderer;
class GUI_EXPORT QgsRasterRendererWidget: public QWidget
{
public:
QgsRasterRendererWidget( QgsRasterLayer* layer ) { mRasterLayer = layer; }
QgsRasterRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent ):
mRasterLayer( layer )
, mExtent( extent )
{
}
virtual ~QgsRasterRendererWidget() {}

enum LoadMinMaxAlgo
Expand All @@ -50,13 +56,13 @@ class GUI_EXPORT QgsRasterRendererWidget: public QWidget
virtual void setStdDev( QString value ) { Q_UNUSED( value ); }
virtual int selectedBand( int index = 0 ) { Q_UNUSED( index ); return -1; }

bool bandMinMax( LoadMinMaxAlgo loadAlgo, int band, double *values );
bool bandMinMaxFromStdDev( double stdDev, int band, double *values );

protected:
QgsRasterLayer* mRasterLayer;
/**Returns a band name for display. First choice is color name, otherwise band number*/
QString displayBandName( int band ) const;

/** Current extent */
QgsRectangle mExtent;
};

#endif // QGSRASTERRENDERERWIDGET_H
54 changes: 24 additions & 30 deletions src/gui/raster/qgssinglebandgrayrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#include "qgssinglebandgrayrenderer.h"
#include "qgsrasterlayer.h"

QgsSingleBandGrayRendererWidget::QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer ): QgsRasterRendererWidget( layer )
QgsSingleBandGrayRendererWidget::QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent ): QgsRasterRendererWidget( layer, extent )
{
setupUi( this );

mMinLineEdit->setValidator( new QDoubleValidator( mMinLineEdit ) );
mMaxLineEdit->setValidator( new QDoubleValidator( mMaxLineEdit ) );

Expand All @@ -33,6 +34,12 @@ QgsSingleBandGrayRendererWidget::QgsSingleBandGrayRendererWidget( QgsRasterLayer
return;
}

mMinMaxWidget = new QgsRasterMinMaxWidget( layer, this );
mMinMaxWidget->setExtent( extent );
layout()->addWidget( mMinMaxWidget );
connect( mMinMaxWidget, SIGNAL( load( int, double, double ) ),
this, SLOT( loadMinMax( int, double, double ) ) );

//fill available bands into combo box
int nBands = provider->bandCount();
for ( int i = 1; i <= nBands; ++i ) //band numbering seem to start at 1
Expand Down Expand Up @@ -80,49 +87,36 @@ QgsRasterRenderer* QgsSingleBandGrayRendererWidget::renderer()
return renderer;
}

void QgsSingleBandGrayRendererWidget::on_mLoadPushButton_clicked()
void QgsSingleBandGrayRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax )
{
int band = mGrayBandComboBox->itemData( mGrayBandComboBox->currentIndex() ).toInt();
double minMaxValues[2];
bool ok = false;
QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) );

if ( mEstimateRadioButton->isChecked() )
{
ok = bandMinMax( Estimate, band, minMaxValues );
}
else if ( mActualRadioButton->isChecked() )
{
ok = bandMinMax( Actual, band, minMaxValues );
}
else if ( mCurrentExtentRadioButton->isChecked() )
{
ok = bandMinMax( CurrentExtent, band, minMaxValues );
}
else if ( mCumulativeCut->isChecked() )
if ( qIsNaN( theMin ) )
{
ok = bandMinMax( CumulativeCut, band, minMaxValues );
mMinLineEdit->clear();
}
else if ( mUseStdDevRadioButton->isChecked() )
else
{
QgsRasterBandStats rasterBandStats = mRasterLayer->dataProvider()->bandStatistics( band );
double diff = mStdDevSpinBox->value() * rasterBandStats.stdDev;
minMaxValues[0] = rasterBandStats.mean - diff;
minMaxValues[1] = rasterBandStats.mean + diff;
ok = true;
mMinLineEdit->setText( QString::number( theMin ) );
}

if ( ok )
if ( qIsNaN( theMax ) )
{
mMinLineEdit->setText( QString::number( minMaxValues[0] ) );
mMaxLineEdit->setText( QString::number( minMaxValues[1] ) );
mMaxLineEdit->clear();
}
else
{
mMinLineEdit->clear();
mMaxLineEdit->clear();
mMaxLineEdit->setText( QString::number( theMax ) );
}
}

void QgsSingleBandGrayRendererWidget::on_mGrayBandComboBox_currentIndexChanged( int index )
{
QList<int> myBands;
myBands.append( mGrayBandComboBox->itemData( index ).toInt() );
mMinMaxWidget->setBands( myBands );
}

void QgsSingleBandGrayRendererWidget::setFromRenderer( const QgsRasterRenderer* r )
{
const QgsSingleBandGrayRenderer* gr = dynamic_cast<const QgsSingleBandGrayRenderer*>( r );
Expand Down
17 changes: 12 additions & 5 deletions src/gui/raster/qgssinglebandgrayrendererwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
#ifndef QGSSINGLEBANDGRAYRENDERERWIDGET_H
#define QGSSINGLEBANDGRAYRENDERERWIDGET_H

#include "qgsrasterminmaxwidget.h"
#include "qgsrasterrendererwidget.h"
#include "ui_qgssinglebandgrayrendererwidgetbase.h"

class GUI_EXPORT QgsSingleBandGrayRendererWidget: public QgsRasterRendererWidget, private Ui::QgsSingleBandGrayRendererWidgetBase
{
Q_OBJECT
public:
QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer );
QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() );
~QgsSingleBandGrayRendererWidget();

static QgsRasterRendererWidget* create( QgsRasterLayer* layer ) { return new QgsSingleBandGrayRendererWidget( layer ); }
static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsSingleBandGrayRendererWidget( layer, theExtent ); }

QgsRasterRenderer* renderer();

Expand All @@ -38,12 +39,18 @@ class GUI_EXPORT QgsSingleBandGrayRendererWidget: public QgsRasterRendererWidget
QString max( int index = 0 ) { Q_UNUSED( index ); return mMaxLineEdit->text(); }
void setMin( QString value, int index = 0 ) { Q_UNUSED( index ); mMinLineEdit->setText( value ); }
void setMax( QString value, int index = 0 ) { Q_UNUSED( index ); mMaxLineEdit->setText( value ); }
QString stdDev( ) { return QString::number( mStdDevSpinBox->value() ); }
void setStdDev( QString value ) { mStdDevSpinBox->setValue( value.toDouble() ); }
//QString stdDev( ) { return QString::number( mStdDevSpinBox->value() ); }
//void setStdDev( QString value ) { mStdDevSpinBox->setValue( value.toDouble() ); }
int selectedBand( int index = 0 ) { Q_UNUSED( index ); return mGrayBandComboBox->currentIndex() + 1; }

public slots:
void loadMinMax( int theBandNo, double theMin, double theMax );

private slots:
void on_mLoadPushButton_clicked();
void on_mGrayBandComboBox_currentIndexChanged( int index );

private:
QgsRasterMinMaxWidget * mMinMaxWidget;
};

#endif // QGSSINGLEBANDGRAYRENDERERWIDGET_H
4 changes: 2 additions & 2 deletions src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include <QSettings>
#include <QTextStream>

QgsSingleBandPseudoColorRendererWidget::QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer ):
QgsRasterRendererWidget( layer )
QgsSingleBandPseudoColorRendererWidget::QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent ):
QgsRasterRendererWidget( layer, extent )
{
setupUi( this );

Expand Down
4 changes: 2 additions & 2 deletions src/gui/raster/qgssinglebandpseudocolorrendererwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class GUI_EXPORT QgsSingleBandPseudoColorRendererWidget: public QgsRasterRendere
{
Q_OBJECT
public:
QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer );
QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() );
~QgsSingleBandPseudoColorRendererWidget();

static QgsRasterRendererWidget* create( QgsRasterLayer* layer ) { return new QgsSingleBandPseudoColorRendererWidget( layer ); }
static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsSingleBandPseudoColorRendererWidget( layer, theExtent ); }
QgsRasterRenderer* renderer();

void setFromRenderer( const QgsRasterRenderer* r );
Expand Down
88 changes: 3 additions & 85 deletions src/ui/qgsmultibandcolorrendererwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>790</width>
<width>401</width>
<height>203</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLabel" name="mRedBandLabel">
Expand Down Expand Up @@ -269,88 +269,6 @@
</item>
</layout>
</item>
<item row="0" column="2">
<widget class="QGroupBox" name="mLoadMinMaxValuesGroupBox">
<property name="title">
<string>Load min-/max values</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QRadioButton" name="mEstimateRadioButton">
<property name="text">
<string>Estimate (faster)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="mActualRadioButton">
<property name="text">
<string>Actual (slower)</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="mCurrentExtentRadioButton">
<property name="text">
<string>CurrentExtent</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="mUseStdDevRadioButton">
<property name="text">
<string>Use standard deviation</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="mLoadPushButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="mStdDevSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
Expand Down
248 changes: 248 additions & 0 deletions src/ui/qgsrasterminmaxwidgetbase.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsRasterMinMaxWidgetBase</class>
<widget class="QWidget" name="QgsRasterMinMaxWidgetBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>416</width>
<height>275</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QGroupBox" name="mLoadMinMaxValuesGroupBox">
<property name="title">
<string>Load min/max values</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0" colspan="3">
<widget class="QRadioButton" name="mCumulativeCutRadioButton">
<property name="text">
<string>2 - 98% cumulative pixel count cut</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="3" colspan="2">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>123</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="mMinMaxRadioButton">
<property name="text">
<string>Min / max</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="4">
<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="2" column="0" colspan="2">
<widget class="QRadioButton" name="mStdDevRadioButton">
<property name="text">
<string>Mean +/- standard deviation ×</string>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="QDoubleSpinBox" name="mStdDevSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="4">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>148</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="mExtentGroupBox">
<property name="title">
<string>Extent</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QRadioButton" name="mFullExtentRadioButton">
<property name="text">
<string>Full</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="mCurrentExtentRadioButton">
<property name="text">
<string>Current</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="mAccuracyGroupBox">
<property name="title">
<string>Accuracy</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>65</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">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>65</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="mEstimateRadioButton">
<property name="text">
<string>Estimate (faster)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_3" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>313</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mLoadPushButton">
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
151 changes: 3 additions & 148 deletions src/ui/qgssinglebandgrayrendererwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,160 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>625</width>
<width>258</width>
<height>203</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="1" rowspan="2">
<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" colspan="2">
<widget class="QRadioButton" name="mEstimateRadioButton">
<property name="text">
<string>Estimate (faster)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2" colspan="3">
<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" colspan="2">
<widget class="QRadioButton" name="mActualRadioButton">
<property name="text">
<string>Actual (slower)</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="3">
<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" colspan="2">
<widget class="QRadioButton" name="mCurrentExtentRadioButton">
<property name="text">
<string>CurrentExtent</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="4">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>303</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="2" colspan="3">
<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="4" column="0" colspan="3">
<widget class="QRadioButton" name="mUseStdDevRadioButton">
<property name="text">
<string>Use standard deviation</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QDoubleSpinBox" name="mStdDevSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="4">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>148</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0">
<widget class="QPushButton" name="mLoadPushButton">
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="mCumulativeCut">
<property name="text">
<string>2 - 98% cumulative pixel count cut</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="3">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<widget class="QLabel" name="mContrastEnhancementLabel">
Expand Down
2 changes: 2 additions & 0 deletions tests/testdata/zip/points3.geojson.gz.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
compressed_size=660
uncompressed_size=3328