[QGIS Commit] r9561 - in trunk/qgis: python/core src/app src/core/raster src/providers/wms src/ui tests/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Nov 1 18:27:37 EDT 2008


Author: ersts
Date: 2008-11-01 18:27:37 -0400 (Sat, 01 Nov 2008)
New Revision: 9561

Removed:
   trunk/qgis/python/core/qgscolortable.sip
Modified:
   trunk/qgis/python/core/qgsrasterbandstats.sip
   trunk/qgis/src/app/qgsrasterlayerproperties.cpp
   trunk/qgis/src/core/raster/qgsrasterbandstats.h
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
   trunk/qgis/src/providers/wms/qgswmsprovider.cpp
   trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui
   trunk/qgis/tests/src/core/testcontrastenhancements.cpp
Log:
-Fix missed api updates in the unit tests
-Patched minor debug error in WMS provider
-Added ability to set transparency for WMS layer, closes ticket #1348. This patch needs to be reviewed on other platforms however as there seems to be a slight bug with QImage::setAlphaChannel

Deleted: trunk/qgis/python/core/qgscolortable.sip
===================================================================
--- trunk/qgis/python/core/qgscolortable.sip	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/python/core/qgscolortable.sip	2008-11-01 22:27:37 UTC (rev 9561)
@@ -1,68 +0,0 @@
-
-class QgsColorTable
-{
-%TypeHeaderCode
-#include <qgscolortable.h>
-%End
-
-public:
-    /** 
-     *  \brief Constructor.
-     *  \param interp color table interpretation
-     */
-    QgsColorTable ( int interp = Rgb ); 
-
-    /** \brief The destuctor.  */
-    ~QgsColorTable();
-
-    /** \brief Color table interpretation. */
-    // This is taken from GDAL, GPI_RGB is mapped to Rgba 
-    enum Interp {
-	Gray = 0, // Use c1 as grayscale value.
-	Rgb,      // Use c1 as red, c2 as green, c3 as blue
-	Rgba,     // Use c1 as red, c2 as green, c3 as blue and c4 as alpha.
-	Cmyk,     // Use c1 as cyan, c2 as magenta, c3 as yellow and c4 as black.
-	Hls       // c1 hue, c2 lightness, c3 saturation; should be His ? 
-    };
-
-    /** 
-     *  \brief Color table is defined 
-     *  \return true if at least one rule is defined 
-     *  \false no rule defined
-     */
-    bool defined ( );
-
-    /** \brief Get color table interpretation */
-    int interpretation ( );
-
-    /** \brief Add a discrete color */
-    void add ( unsigned int index, unsigned char c1, unsigned char c2, unsigned char c3, unsigned char c4 = 0 );
-
-    /** \brief Add a ramp rule */ 
-    void add ( double min,  double max,
-	       unsigned char min_c1, unsigned char min_c2, unsigned char min_c3, unsigned char min_c4,
-               unsigned char max_c1, unsigned char max_c2, unsigned char max_c3, unsigned char max_c4);
-    
-    /** \brief Get color 
-     *  \return true color was found
-     *  \return false color was no found
-     */
-    bool color ( double value, int *c1, int *c2, int *c3 );
-    
-    /** \brief Sort ramp rules */
-    void sort ( ); 
-
-    /** \brief Print to stderr - for debuging */
-    void print ( );
-
-    /** \brief Minimum value */
-    double rmin();
-   
-    /** \brief Maximum value */
-    double rmax();
-
-    /** \brief Clear the color table */
-    void clear();
-
-};
-

Modified: trunk/qgis/python/core/qgsrasterbandstats.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterbandstats.sip	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/python/core/qgsrasterbandstats.sip	2008-11-01 22:27:37 UTC (rev 9561)
@@ -39,9 +39,9 @@
     typedef QVector<int> HistogramVector;
     //HistogramVector * histogramVector;
     /** \brief whteher histogram values are estimated or completely calculated */
-    bool histogramEstimated;
+    bool isHistogramEstimated;
     /** whehter histogram compuation should include out of range values */
-    bool histogramOutOfRange;
+    bool isHistogramOutOfRange;
     /** Color table */
     //QList<QgsColorRampShader::ColorRampItem> colorTable;
 };

Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp	2008-11-01 22:27:37 UTC (rev 9561)
@@ -551,7 +551,8 @@
     tabBar->setCurrentIndex( tabBar->indexOf( tabPageMetadata ) );
     tabBar->removeTab( tabBar->indexOf( tabPageColormap ) );
     tabBar->removeTab( tabBar->indexOf( tabPageSymbology ) );
-    tabBar->removeTab( tabBar->indexOf( tabPageTransparency ) );
+    gboxNoDataValue->setEnabled( false );
+    gboxCustomTransparency->setEnabled( false );
     tabBar->removeTab( tabBar->indexOf( tabPageHistogram ) );
     tabBar->removeTab( tabBar->indexOf( tabPagePyramids ) );
   }

Modified: trunk/qgis/src/core/raster/qgsrasterbandstats.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterbandstats.h	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/src/core/raster/qgsrasterbandstats.h	2008-11-01 22:27:37 UTC (rev 9561)
@@ -46,8 +46,8 @@
       stdDev = 0.0;
       sum = 0.0;
       elementCount = 0;
-      histogramEstimated = false;
-      histogramOutOfRange = false;
+      isHistogramEstimated = false;
+      isHistogramOutOfRange = false;
     }
 
     /** \brief The name of the band that these stats belong to. */
@@ -64,10 +64,10 @@
     int elementCount;
 
     /** \brief whteher histogram values are estimated or completely calculated */
-    bool histogramEstimated;
+    bool isHistogramEstimated;
 
     /** whehter histogram compuation should include out of range values */
-    bool histogramOutOfRange;
+    bool isHistogramOutOfRange;
 
     /** \brief Store the histogram for a given layer */
     HistogramVector * histogramVector;

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-11-01 22:27:37 UTC (rev 9561)
@@ -1136,10 +1136,14 @@
     QgsDebugMsg( QString( "origin y: %1" ).arg( myRasterViewPort->topLeftPoint.y() ) );
     QgsDebugMsg( QString( "(int)origin y: %1" ).arg( static_cast<int>( myRasterViewPort->topLeftPoint.y() ) ) );
 
+    //Set the transparency for the whole layer
+    QImage myAlphaChannel( image->width(), image->height(), QImage::Format_Indexed8 );
+    myAlphaChannel.fill( ( uint ) mTransparencyLevel );
+    image->setAlphaChannel( myAlphaChannel );
+
     // Since GDAL's RasterIO can't handle floating point, we have to round to
     // the nearest pixel.  Add 0.5 to get rounding instead of truncation
     // out of static_cast<int>.
-
     theQPainter->drawImage( static_cast<int>(
                               myRasterViewPort->topLeftPoint.x()
                               + 0.5    // try simulating rounding instead of truncation, to avoid off-by-one errors
@@ -4516,12 +4520,12 @@
   //i.e if the histogram has never previously been generated or the user has
   //selected a new number of bins.
   if ( myRasterBandStats.histogramVector->size() != theBinCount ||
-       theIgnoreOutOfRangeFlag != myRasterBandStats.histogramOutOfRange ||
-       theHistogramEstimatedFlag != myRasterBandStats.histogramEstimated )
+       theIgnoreOutOfRangeFlag != myRasterBandStats.isHistogramOutOfRange ||
+       theHistogramEstimatedFlag != myRasterBandStats.isHistogramEstimated )
   {
     myRasterBandStats.histogramVector->clear();
-    myRasterBandStats.histogramEstimated = theHistogramEstimatedFlag;
-    myRasterBandStats.histogramOutOfRange = theIgnoreOutOfRangeFlag;
+    myRasterBandStats.isHistogramEstimated = theHistogramEstimatedFlag;
+    myRasterBandStats.isHistogramOutOfRange = theIgnoreOutOfRangeFlag;
     int *myHistogramArray = new int[theBinCount];
 
 

Modified: trunk/qgis/src/providers/wms/qgswmsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2008-11-01 22:27:37 UTC (rev 9561)
@@ -277,8 +277,8 @@
 {
   QgsDebugMsg( "Entering." );
 
-  QgsDebugMsg( "pixelWidth = "  + QString( pixelWidth ) );
-  QgsDebugMsg( "pixelHeight = "  + QString( pixelHeight ) );
+  QgsDebugMsg( "pixelWidth = "  + QString::number( pixelWidth ) );
+  QgsDebugMsg( "pixelHeight = "  + QString::number( pixelHeight ) );
   QgsDebugMsg( "viewExtent: " + viewExtent.toString() );
 
   // Can we reuse the previously cached image?

Modified: trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui	2008-11-01 22:27:37 UTC (rev 9561)
@@ -6,14 +6,16 @@
     <x>0</x>
     <y>0</y>
     <width>576</width>
-    <height>588</height>
+    <height>627</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <string>Raster Layer Properties</string>
   </property>
   <property name="windowIcon" >
-   <iconset/>
+   <iconset>
+    <normaloff/>
+   </iconset>
   </property>
   <property name="sizeGripEnabled" >
    <bool>true</bool>
@@ -50,7 +52,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
@@ -70,7 +72,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
@@ -107,18 +109,9 @@
          </property>
          <widget class="QWidget" name="rgb" >
           <layout class="QGridLayout" >
-           <property name="leftMargin" >
+           <property name="margin" >
             <number>0</number>
            </property>
-           <property name="topMargin" >
-            <number>0</number>
-           </property>
-           <property name="rightMargin" >
-            <number>0</number>
-           </property>
-           <property name="bottomMargin" >
-            <number>0</number>
-           </property>
            <item row="0" column="0" >
             <widget class="QGroupBox" name="grpRgbBands" >
              <property name="title" >
@@ -229,7 +222,8 @@
                    <string>...</string>
                   </property>
                   <property name="icon" >
-                   <iconset>../../images/themes/default/mActionFileSave.png</iconset>
+                   <iconset>
+                    <normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
                   </property>
                  </widget>
                 </item>
@@ -292,7 +286,7 @@
                 <property name="orientation" >
                  <enum>Qt::Horizontal</enum>
                 </property>
-                <property name="sizeHint" >
+                <property name="sizeHint" stdset="0" >
                  <size>
                   <width>119</width>
                   <height>16</height>
@@ -523,18 +517,9 @@
          </widget>
          <widget class="QWidget" name="gray" >
           <layout class="QGridLayout" >
-           <property name="leftMargin" >
+           <property name="margin" >
             <number>0</number>
            </property>
-           <property name="topMargin" >
-            <number>0</number>
-           </property>
-           <property name="rightMargin" >
-            <number>0</number>
-           </property>
-           <property name="bottomMargin" >
-            <number>0</number>
-           </property>
            <item row="0" column="0" >
             <widget class="QGroupBox" name="groupBox_5" >
              <property name="title" >
@@ -701,7 +686,7 @@
                 <property name="orientation" >
                  <enum>Qt::Vertical</enum>
                 </property>
-                <property name="sizeHint" >
+                <property name="sizeHint" stdset="0" >
                  <size>
                   <width>20</width>
                   <height>40</height>
@@ -748,7 +733,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>81</width>
               <height>20</height>
@@ -768,7 +753,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>111</width>
               <height>20</height>
@@ -792,12 +777,9 @@
           <string>Contrast enhancement</string>
          </property>
          <layout class="QGridLayout" >
-          <property name="horizontalSpacing" >
+          <property name="spacing" >
            <number>6</number>
           </property>
-          <property name="verticalSpacing" >
-           <number>6</number>
-          </property>
           <item row="0" column="0" >
            <widget class="QLabel" name="labelContrastEnhancement" >
             <property name="sizePolicy" >
@@ -842,7 +824,8 @@
              <string/>
             </property>
             <property name="icon" >
-             <iconset>../../images/themes/default/mActionFileSave.png</iconset>
+             <iconset>
+              <normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
             </property>
            </widget>
           </item>
@@ -907,7 +890,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
@@ -933,7 +916,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
@@ -952,7 +935,7 @@
         </widget>
        </item>
        <item row="0" column="1" >
-        <widget class="QGroupBox" name="groupBox_7" >
+        <widget class="QGroupBox" name="gboxNoDataValue" >
          <property name="title" >
           <string>No data value</string>
          </property>
@@ -971,7 +954,7 @@
         </widget>
        </item>
        <item row="1" column="0" colspan="2" >
-        <widget class="QGroupBox" name="groupBox_6" >
+        <widget class="QGroupBox" name="gboxCustomTransparency" >
          <property name="title" >
           <string>Custom transparency options</string>
          </property>
@@ -1036,18 +1019,9 @@
           </item>
           <item row="2" column="2" >
            <layout class="QVBoxLayout" >
-            <property name="leftMargin" >
+            <property name="margin" >
              <number>11</number>
             </property>
-            <property name="topMargin" >
-             <number>11</number>
-            </property>
-            <property name="rightMargin" >
-             <number>11</number>
-            </property>
-            <property name="bottomMargin" >
-             <number>11</number>
-            </property>
             <item>
              <widget class="QToolButton" name="pbnAddValuesManually" >
               <property name="toolTip" >
@@ -1057,7 +1031,8 @@
                <string>...</string>
               </property>
               <property name="icon" >
-               <iconset>../../images/themes/default/mActionNewAttribute.png</iconset>
+               <iconset>
+                <normaloff>../../images/themes/default/mActionNewAttribute.png</normaloff>../../images/themes/default/mActionNewAttribute.png</iconset>
               </property>
              </widget>
             </item>
@@ -1073,7 +1048,8 @@
                <string>...</string>
               </property>
               <property name="icon" >
-               <iconset>../../images/themes/default/mActionContextHelp.png</iconset>
+               <iconset>
+                <normaloff>../../images/themes/default/mActionContextHelp.png</normaloff>../../images/themes/default/mActionContextHelp.png</iconset>
               </property>
              </widget>
             </item>
@@ -1086,7 +1062,8 @@
                <string>...</string>
               </property>
               <property name="icon" >
-               <iconset>../../images/themes/default/mActionDeleteAttribute.png</iconset>
+               <iconset>
+                <normaloff>../../images/themes/default/mActionDeleteAttribute.png</normaloff>../../images/themes/default/mActionDeleteAttribute.png</iconset>
               </property>
              </widget>
             </item>
@@ -1099,7 +1076,8 @@
                <string>...</string>
               </property>
               <property name="icon" >
-               <iconset>../../images/themes/default/mActionCopySelected.png</iconset>
+               <iconset>
+                <normaloff>../../images/themes/default/mActionCopySelected.png</normaloff>../../images/themes/default/mActionCopySelected.png</iconset>
               </property>
              </widget>
             </item>
@@ -1108,7 +1086,7 @@
               <property name="orientation" >
                <enum>Qt::Vertical</enum>
               </property>
-              <property name="sizeHint" >
+              <property name="sizeHint" stdset="0" >
                <size>
                 <width>20</width>
                 <height>181</height>
@@ -1125,7 +1103,8 @@
                <string>...</string>
               </property>
               <property name="icon" >
-               <iconset>../../images/themes/default/mActionFolder.png</iconset>
+               <iconset>
+                <normaloff>../../images/themes/default/mActionFolder.png</normaloff>../../images/themes/default/mActionFolder.png</iconset>
               </property>
              </widget>
             </item>
@@ -1138,7 +1117,8 @@
                <string>...</string>
               </property>
               <property name="icon" >
-               <iconset>../../images/themes/default/mActionFileSave.png</iconset>
+               <iconset>
+                <normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
               </property>
              </widget>
             </item>
@@ -1169,7 +1149,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>321</width>
            <height>45</height>
@@ -1203,7 +1183,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>41</width>
            <height>27</height>
@@ -1223,7 +1203,8 @@
           <string>...</string>
          </property>
          <property name="icon" >
-          <iconset>../../images/themes/default/mActionNewAttribute.png</iconset>
+          <iconset>
+           <normaloff>../../images/themes/default/mActionNewAttribute.png</normaloff>../../images/themes/default/mActionNewAttribute.png</iconset>
          </property>
         </widget>
        </item>
@@ -1235,7 +1216,7 @@
          <property name="sizeType" >
           <enum>QSizePolicy::Minimum</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>20</width>
            <height>20</height>
@@ -1252,7 +1233,8 @@
           <string>...</string>
          </property>
          <property name="icon" >
-          <iconset>../../images/themes/default/mActionFolder.png</iconset>
+          <iconset>
+           <normaloff>../../images/themes/default/mActionFolder.png</normaloff>../../images/themes/default/mActionFolder.png</iconset>
          </property>
         </widget>
        </item>
@@ -1265,7 +1247,8 @@
           <string>...</string>
          </property>
          <property name="icon" >
-          <iconset>../../images/themes/default/mActionFileSave.png</iconset>
+          <iconset>
+           <normaloff>../../images/themes/default/mActionFileSave.png</normaloff>../../images/themes/default/mActionFileSave.png</iconset>
          </property>
         </widget>
        </item>
@@ -1426,18 +1409,9 @@
           <bool>true</bool>
          </property>
          <layout class="QGridLayout" >
-          <property name="leftMargin" >
+          <property name="margin" >
            <number>11</number>
           </property>
-          <property name="topMargin" >
-           <number>11</number>
-          </property>
-          <property name="rightMargin" >
-           <number>11</number>
-          </property>
-          <property name="bottomMargin" >
-           <number>11</number>
-          </property>
           <item row="0" column="3" >
            <widget class="QSpinBox" name="spinMaximumScale" >
             <property name="toolTip" >
@@ -1493,18 +1467,9 @@
           <string>Coordinate reference system</string>
          </property>
          <layout class="QGridLayout" >
-          <property name="leftMargin" >
+          <property name="margin" >
            <number>11</number>
           </property>
-          <property name="topMargin" >
-           <number>11</number>
-          </property>
-          <property name="rightMargin" >
-           <number>11</number>
-          </property>
-          <property name="bottomMargin" >
-           <number>11</number>
-          </property>
           <item row="0" column="1" >
            <widget class="QPushButton" name="pbnChangeSpatialRefSys" >
             <property name="text" >
@@ -1527,7 +1492,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>21</width>
            <height>20</height>
@@ -1651,7 +1616,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>21</width>
            <height>20</height>
@@ -1666,18 +1631,9 @@
        <string>Metadata</string>
       </attribute>
       <layout class="QGridLayout" >
-       <property name="leftMargin" >
+       <property name="margin" >
         <number>11</number>
        </property>
-       <property name="topMargin" >
-        <number>11</number>
-       </property>
-       <property name="rightMargin" >
-        <number>11</number>
-       </property>
-       <property name="bottomMargin" >
-        <number>11</number>
-       </property>
        <item row="0" column="0" >
         <widget class="QTextBrowser" name="txtbMetadata" />
        </item>
@@ -1711,10 +1667,11 @@
           </sizepolicy>
          </property>
          <property name="html" >
-          <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+          <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
 p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Verdana'; font-size:10pt; font-weight:400; font-style:normal;">
-&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;">&lt;/p>&lt;/body>&lt;/html></string>
+&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
+&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;/p>&lt;/body>&lt;/html></string>
          </property>
         </widget>
        </item>
@@ -1826,18 +1783,9 @@
           <string>Chart Type</string>
          </property>
          <layout class="QGridLayout" >
-          <property name="leftMargin" >
+          <property name="margin" >
            <number>11</number>
           </property>
-          <property name="topMargin" >
-           <number>11</number>
-          </property>
-          <property name="rightMargin" >
-           <number>11</number>
-          </property>
-          <property name="bottomMargin" >
-           <number>11</number>
-          </property>
           <item row="0" column="1" >
            <widget class="QRadioButton" name="radHistTypeLine" >
             <property name="text" >
@@ -1925,7 +1873,7 @@
          <property name="orientation" >
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>20</width>
            <height>40</height>
@@ -1985,7 +1933,7 @@
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="standardButtons" >
-      <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+      <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
      </property>
     </widget>
    </item>

Modified: trunk/qgis/tests/src/core/testcontrastenhancements.cpp
===================================================================
--- trunk/qgis/tests/src/core/testcontrastenhancements.cpp	2008-11-01 18:36:02 UTC (rev 9560)
+++ trunk/qgis/tests/src/core/testcontrastenhancements.cpp	2008-11-01 22:27:37 UTC (rev 9561)
@@ -73,9 +73,9 @@
   // Original pixel value 0.0 Should be out of range thus clipped
   QVERIFY( !myEnhancement.isValueInDisplayableRange( 0.0 ) );
   //Original pixel value of 10.0 should be scaled to 10.0
-  QVERIFY( 10.0 == myEnhancement.enhanceValue( 10.0 ) ) ;
+  QVERIFY( 10.0 == myEnhancement.enhance( 10.0 ) ) ;
   //Original pixel value of 240 should be scaled to 240
-  QVERIFY( 240.0 == myEnhancement.enhanceValue( 240.0 ) ) ;
+  QVERIFY( 240.0 == myEnhancement.enhance( 240.0 ) ) ;
 }
 
 void TestContrastEnhancements::linearMinMaxEnhancementWithClipTest()
@@ -86,9 +86,9 @@
   // Original pixel value 0.0 Should be out of range thus clipped
   QVERIFY( !myEnhancement.isValueInDisplayableRange( 0.0 ) );
   //Original pixel value of 10.0 should be scaled to 0.0
-  QVERIFY( 0.0 == myEnhancement.enhanceValue( 10.0 ) ) ;
+  QVERIFY( 0.0 == myEnhancement.enhance( 10.0 ) ) ;
   //Original pixel value of 240 should be scaled to 255
-  QVERIFY( 255.0 == myEnhancement.enhanceValue( 240.0 ) ) ;
+  QVERIFY( 255.0 == myEnhancement.enhance( 240.0 ) ) ;
 }
 
 void TestContrastEnhancements::linearMinMaxEnhancementTest()
@@ -98,9 +98,9 @@
   //0 should be scaled to 10 and not clipped
   QVERIFY( myEnhancement.isValueInDisplayableRange( 0.0 ) );
   //Original pixel value of 10.0 should be scaled to 0.0
-  QVERIFY( 0.0 == myEnhancement.enhanceValue( 10.0 ) ) ;
+  QVERIFY( 0.0 == myEnhancement.enhance( 10.0 ) ) ;
   //Original pixel value of 240 should be scaled to 255
-  QVERIFY( 255.0 == myEnhancement.enhanceValue( 240.0 ) ) ;
+  QVERIFY( 255.0 == myEnhancement.enhance( 240.0 ) ) ;
 }
 QTEST_MAIN( TestContrastEnhancements )
 #include "moc_testcontrastenhancements.cxx"



More information about the QGIS-commit mailing list