| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,381 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <ui version="4.0"> | ||
| <class>WidgetShapeburstFill</class> | ||
| <widget class="QWidget" name="WidgetShapeburstFill"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>0</x> | ||
| <y>0</y> | ||
| <width>497</width> | ||
| <height>358</height> | ||
| </rect> | ||
| </property> | ||
| <property name="windowTitle"> | ||
| <string>Form</string> | ||
| </property> | ||
| <layout class="QFormLayout" name="formLayout"> | ||
| <item row="0" column="0" colspan="2"> | ||
| <widget class="QGroupBox" name="mGradientTypeGroupBox"> | ||
| <property name="title"> | ||
| <string>Gradient colors</string> | ||
| </property> | ||
| <layout class="QFormLayout" name="formLayout_2"> | ||
| <property name="fieldGrowthPolicy"> | ||
| <enum>QFormLayout::AllNonFixedFieldsGrow</enum> | ||
| </property> | ||
| <item row="0" column="0"> | ||
| <widget class="QRadioButton" name="radioTwoColor"> | ||
| <property name="text"> | ||
| <string>Two color</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="1"> | ||
| <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
| <item> | ||
| <widget class="QgsColorButton" name="btnChangeColor"> | ||
| <property name="minimumSize"> | ||
| <size> | ||
| <width>100</width> | ||
| <height>0</height> | ||
| </size> | ||
| </property> | ||
| <property name="maximumSize"> | ||
| <size> | ||
| <width>100</width> | ||
| <height>16777215</height> | ||
| </size> | ||
| </property> | ||
| <property name="text"> | ||
| <string/> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QgsColorButton" name="btnChangeColor2"> | ||
| <property name="minimumSize"> | ||
| <size> | ||
| <width>100</width> | ||
| <height>0</height> | ||
| </size> | ||
| </property> | ||
| <property name="text"> | ||
| <string/> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <spacer name="horizontalSpacer"> | ||
| <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> | ||
| </item> | ||
| <item row="1" column="0"> | ||
| <widget class="QRadioButton" name="radioColorRamp"> | ||
| <property name="text"> | ||
| <string>Color ramp</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="1"> | ||
| <widget class="QgsColorRampComboBox" name="cboGradientColorRamp"/> | ||
| </item> | ||
| </layout> | ||
| <zorder>btnChangeColor2</zorder> | ||
| <zorder>btnChangeColor</zorder> | ||
| <zorder>cboGradientColorRamp</zorder> | ||
| <zorder>radioTwoColor</zorder> | ||
| <zorder>radioColorRamp</zorder> | ||
| <zorder>radioTwoColor</zorder> | ||
| <zorder>radioColorRamp</zorder> | ||
| <zorder>btnChangeColor</zorder> | ||
| <zorder>btnChangeColor2</zorder> | ||
| <zorder>cboGradientColorRamp</zorder> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="0" colspan="2"> | ||
| <widget class="QGroupBox" name="mShadeDistanceGroupBox"> | ||
| <property name="title"> | ||
| <string>Shading style</string> | ||
| </property> | ||
| <layout class="QFormLayout" name="formLayout_3"> | ||
| <item row="0" column="0"> | ||
| <widget class="QRadioButton" name="mRadioUseWholeShape"> | ||
| <property name="text"> | ||
| <string>Shade whole shape</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="0" colspan="2"> | ||
| <layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
| <property name="spacing"> | ||
| <number>0</number> | ||
| </property> | ||
| <item> | ||
| <widget class="QRadioButton" name="mRadioUseMaxDistance"> | ||
| <property name="text"> | ||
| <string>Shade to a set distance:</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QDoubleSpinBox" name="mSpinMaxDistance"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
| <horstretch>1</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="maximum"> | ||
| <double>999999999.000000000000000</double> | ||
| </property> | ||
| <property name="value"> | ||
| <double>5.000000000000000</double> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QComboBox" name="mDistanceUnitComboBox"> | ||
| <item> | ||
| <property name="text"> | ||
| <string>Millimeter</string> | ||
| </property> | ||
| </item> | ||
| <item> | ||
| <property name="text"> | ||
| <string>Map unit</string> | ||
| </property> | ||
| </item> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </item> | ||
| </layout> | ||
| </widget> | ||
| </item> | ||
| <item row="2" column="0"> | ||
| <widget class="QLabel" name="label"> | ||
| <property name="text"> | ||
| <string>Blur strength</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="2" column="1"> | ||
| <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||
| <item> | ||
| <widget class="QSpinBox" name="mSpinBlurRadius"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
| <horstretch>1</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="maximum"> | ||
| <number>18</number> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <spacer name="horizontalSpacer_2"> | ||
| <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> | ||
| </item> | ||
| <item row="3" column="0"> | ||
| <widget class="QLabel" name="label_6"> | ||
| <property name="text"> | ||
| <string>Offset X,Y</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="3" column="1"> | ||
| <layout class="QHBoxLayout" name="horizontalLayout"> | ||
| <item> | ||
| <widget class="QDoubleSpinBox" name="spinOffsetX"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
| <horstretch>1</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="decimals"> | ||
| <number>5</number> | ||
| </property> | ||
| <property name="minimum"> | ||
| <double>-999.000000000000000</double> | ||
| </property> | ||
| <property name="maximum"> | ||
| <double>999.000000000000000</double> | ||
| </property> | ||
| <property name="singleStep"> | ||
| <double>0.200000000000000</double> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QDoubleSpinBox" name="spinOffsetY"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
| <horstretch>1</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="decimals"> | ||
| <number>5</number> | ||
| </property> | ||
| <property name="minimum"> | ||
| <double>-999.000000000000000</double> | ||
| </property> | ||
| <property name="maximum"> | ||
| <double>999.000000000000000</double> | ||
| </property> | ||
| <property name="singleStep"> | ||
| <double>0.200000000000000</double> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QComboBox" name="mOffsetUnitComboBox"> | ||
| <item> | ||
| <property name="text"> | ||
| <string>Millimeter</string> | ||
| </property> | ||
| </item> | ||
| <item> | ||
| <property name="text"> | ||
| <string>Map unit</string> | ||
| </property> | ||
| </item> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </item> | ||
| <item row="4" column="0" colspan="2"> | ||
| <widget class="QPushButton" name="mDataDefinedPropertiesButton"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
| <horstretch>0</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Data defined properties...</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </widget> | ||
| <customwidgets> | ||
| <customwidget> | ||
| <class>QgsColorButton</class> | ||
| <extends>QPushButton</extends> | ||
| <header>qgscolorbutton.h</header> | ||
| </customwidget> | ||
| <customwidget> | ||
| <class>QgsColorRampComboBox</class> | ||
| <extends>QComboBox</extends> | ||
| <header>qgscolorrampcombobox.h</header> | ||
| </customwidget> | ||
| </customwidgets> | ||
| <resources/> | ||
| <connections> | ||
| <connection> | ||
| <sender>mRadioUseMaxDistance</sender> | ||
| <signal>toggled(bool)</signal> | ||
| <receiver>mSpinMaxDistance</receiver> | ||
| <slot>setEnabled(bool)</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>115</x> | ||
| <y>160</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>284</x> | ||
| <y>163</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| <connection> | ||
| <sender>mRadioUseMaxDistance</sender> | ||
| <signal>toggled(bool)</signal> | ||
| <receiver>mDistanceUnitComboBox</receiver> | ||
| <slot>setEnabled(bool)</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>115</x> | ||
| <y>160</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>400</x> | ||
| <y>163</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| <connection> | ||
| <sender>radioTwoColor</sender> | ||
| <signal>toggled(bool)</signal> | ||
| <receiver>btnChangeColor</receiver> | ||
| <slot>setEnabled(bool)</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>67</x> | ||
| <y>40</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>179</x> | ||
| <y>43</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| <connection> | ||
| <sender>radioTwoColor</sender> | ||
| <signal>toggled(bool)</signal> | ||
| <receiver>btnChangeColor2</receiver> | ||
| <slot>setEnabled(bool)</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>67</x> | ||
| <y>40</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>289</x> | ||
| <y>43</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| <connection> | ||
| <sender>radioColorRamp</sender> | ||
| <signal>toggled(bool)</signal> | ||
| <receiver>cboGradientColorRamp</receiver> | ||
| <slot>setEnabled(bool)</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>72</x> | ||
| <y>80</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>301</x> | ||
| <y>83</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| </connections> | ||
| </ui> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,239 @@ | ||
| /*************************************************************************** | ||
| testqgsshapeburst.cpp | ||
| -------------------------------------- | ||
| Date : 20 Jan 2008 | ||
| Copyright : (C) 2008 by Tim Sutton | ||
| Email : tim @ linfiniti.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 <QtTest> | ||
| #include <QObject> | ||
| #include <QString> | ||
| #include <QStringList> | ||
| #include <QObject> | ||
| #include <QApplication> | ||
| #include <QFileInfo> | ||
| #include <QDir> | ||
| #include <QDesktopServices> | ||
|
|
||
| #include <iostream> | ||
| //qgis includes... | ||
| #include <qgsmaprenderer.h> | ||
| #include <qgsmaplayer.h> | ||
| #include <qgsvectorlayer.h> | ||
| #include <qgsapplication.h> | ||
| #include <qgsproviderregistry.h> | ||
| #include <qgsmaplayerregistry.h> | ||
| #include <qgssymbolv2.h> | ||
| #include <qgssinglesymbolrendererv2.h> | ||
| #include <qgsfillsymbollayerv2.h> | ||
| #include <qgsvectorcolorrampv2.h> | ||
| //qgis test includes | ||
| #include "qgsrenderchecker.h" | ||
|
|
||
| /** \ingroup UnitTests | ||
| * This is a unit test for shapeburst fill types. | ||
| */ | ||
| class TestQgsShapeburst: public QObject | ||
| { | ||
| Q_OBJECT; | ||
| private slots: | ||
| void initTestCase();// will be called before the first testfunction is executed. | ||
| void cleanupTestCase();// will be called after the last testfunction was executed. | ||
| void init() {};// will be called before each testfunction is executed. | ||
| void cleanup() {};// will be called after every testfunction. | ||
|
|
||
| void shapeburstSymbol(); | ||
| void shapeburstSymbolColors(); | ||
| void shapeburstSymbolRamp(); | ||
| void shapeburstBlur(); | ||
| void shapeburstMaxDistanceMm(); | ||
| void shapeburstMaxDistanceMapUnits(); | ||
| void shapeburstSymbolFromQml(); | ||
|
|
||
| private: | ||
| bool mTestHasError; | ||
| bool setQml( QString theType ); | ||
| bool imageCheck( QString theType ); | ||
| QgsMapRenderer * mpMapRenderer; | ||
| QgsVectorLayer * mpPolysLayer; | ||
| QgsShapeburstFillSymbolLayerV2* mShapeburstFill; | ||
| QgsFillSymbolV2* mFillSymbol; | ||
| QgsSingleSymbolRendererV2* mSymbolRenderer; | ||
| QString mTestDataDir; | ||
| QString mReport; | ||
| }; | ||
|
|
||
|
|
||
| void TestQgsShapeburst::initTestCase() | ||
| { | ||
| mTestHasError = false; | ||
| // init QGIS's paths - true means that all path will be inited from prefix | ||
| QgsApplication::init(); | ||
| QgsApplication::initQgis(); | ||
| QgsApplication::showSettings(); | ||
|
|
||
| //create some objects that will be used in all tests... | ||
| QString myDataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt | ||
| mTestDataDir = myDataDir + QDir::separator(); | ||
|
|
||
| // | ||
| //create a poly layer that will be used in all tests... | ||
| // | ||
| QString myPolysFileName = mTestDataDir + "polys.shp"; | ||
| QFileInfo myPolyFileInfo( myPolysFileName ); | ||
| mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(), | ||
| myPolyFileInfo.completeBaseName(), "ogr" ); | ||
|
|
||
| QgsVectorSimplifyMethod simplifyMethod; | ||
| simplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); | ||
| mpPolysLayer->setSimplifyMethod( simplifyMethod ); | ||
|
|
||
| // Register the layer with the registry | ||
| QgsMapLayerRegistry::instance()->addMapLayers( | ||
| QList<QgsMapLayer *>() << mpPolysLayer ); | ||
|
|
||
| //setup shapeburst fill | ||
| mShapeburstFill = new QgsShapeburstFillSymbolLayerV2(); | ||
| mFillSymbol = new QgsFillSymbolV2(); | ||
| mFillSymbol->changeSymbolLayer( 0, mShapeburstFill ); | ||
| mSymbolRenderer = new QgsSingleSymbolRendererV2( mFillSymbol ); | ||
| mpPolysLayer->setRendererV2( mSymbolRenderer ); | ||
|
|
||
| // We only need maprender instead of mapcanvas | ||
| // since maprender does not require a qui | ||
| // and is more light weight | ||
| // | ||
| mpMapRenderer = new QgsMapRenderer(); | ||
| QStringList myLayers; | ||
| myLayers << mpPolysLayer->id(); | ||
| mpMapRenderer->setLayerSet( myLayers ); | ||
| mReport += "<h1>Shapeburst Renderer Tests</h1>\n"; | ||
|
|
||
| } | ||
| void TestQgsShapeburst::cleanupTestCase() | ||
| { | ||
| QString myReportFile = QDir::tempPath() + QDir::separator() + "qgistest.html"; | ||
| QFile myFile( myReportFile ); | ||
| if ( myFile.open( QIODevice::WriteOnly | QIODevice::Append ) ) | ||
| { | ||
| QTextStream myQTextStream( &myFile ); | ||
| myQTextStream << mReport; | ||
| myFile.close(); | ||
| } | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstSymbol() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol renderer test</h2>\n"; | ||
| mShapeburstFill->setColor( QColor( "red" ) ); | ||
| mShapeburstFill->setColor2( QColor( "blue" ) ); | ||
| mShapeburstFill->setBlurRadius( 0 ); | ||
| mShapeburstFill->setUseWholeShape( true ); | ||
| QVERIFY( imageCheck( "shapeburst" ) ); | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstSymbolColors() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol renderer color test</h2>\n"; | ||
| mShapeburstFill->setColor( QColor( "green" ) ); | ||
| mShapeburstFill->setColor2( QColor( "white" ) ); | ||
| QVERIFY( imageCheck( "shapeburst_colors" ) ); | ||
| mShapeburstFill->setColor( QColor( "red" ) ); | ||
| mShapeburstFill->setColor2( QColor( "blue" ) ); | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstSymbolRamp() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol renderer ramp test</h2>\n"; | ||
|
|
||
| QgsVectorGradientColorRampV2* gradientRamp = new QgsVectorGradientColorRampV2( QColor( Qt::yellow ), QColor( 255, 105, 180 ) ); | ||
| QgsGradientStopsList stops; | ||
| stops.append( QgsGradientStop( 0.5, QColor( 255, 255, 255, 0 ) ) ); | ||
| gradientRamp->setStops( stops ); | ||
|
|
||
| mShapeburstFill->setColorRamp( gradientRamp ); | ||
| mShapeburstFill->setColorType( QgsShapeburstFillSymbolLayerV2::ColorRamp ); | ||
| QVERIFY( imageCheck( "shapeburst_ramp" ) ); | ||
| mShapeburstFill->setColorType( QgsShapeburstFillSymbolLayerV2::SimpleTwoColor ); | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstBlur() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol renderer blur test</h2>\n"; | ||
| mShapeburstFill->setBlurRadius( 17 ); | ||
| QVERIFY( imageCheck( "shapeburst_blur" ) ); | ||
| mShapeburstFill->setBlurRadius( 0 ); | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstMaxDistanceMm() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol renderer maximum distance MM </h2>\n"; | ||
| mShapeburstFill->setUseWholeShape( false ); | ||
| mShapeburstFill->setMaxDistance( 3 ); | ||
| mShapeburstFill->setDistanceUnit( QgsSymbolV2::MM ); | ||
| QVERIFY( imageCheck( "shapeburst_maxdistance_mm" ) ); | ||
| mShapeburstFill->setUseWholeShape( true); | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstMaxDistanceMapUnits() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol renderer maximum distance map units</h2>\n"; | ||
| mShapeburstFill->setUseWholeShape( false ); | ||
| mShapeburstFill->setMaxDistance( 10 ); | ||
| mShapeburstFill->setDistanceUnit( QgsSymbolV2::MapUnit ); | ||
| QVERIFY( imageCheck( "shapeburst_maxdistance_mapunit" ) ); | ||
| mShapeburstFill->setUseWholeShape( true); | ||
| mShapeburstFill->setDistanceUnit( QgsSymbolV2::MM ); | ||
| } | ||
|
|
||
| void TestQgsShapeburst::shapeburstSymbolFromQml() | ||
| { | ||
| mReport += "<h2>Shapeburst symbol from QML test</h2>\n"; | ||
| QVERIFY( setQml( "shapeburst" ) ); | ||
| QgsVectorSimplifyMethod simplifyMethod; | ||
| simplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); | ||
| mpPolysLayer->setSimplifyMethod( simplifyMethod ); | ||
| QVERIFY( imageCheck( "shapeburst_from_qml" ) ); | ||
| } | ||
|
|
||
| // | ||
| // Private helper functions not called directly by CTest | ||
| // | ||
|
|
||
| bool TestQgsShapeburst::setQml( QString theType ) | ||
| { | ||
| //load a qml style and apply to our layer | ||
| //the style will correspond to the renderer | ||
| //type we are testing | ||
| QString myFileName = mTestDataDir + "polys_" + theType + "_symbol.qml"; | ||
| bool myStyleFlag = false; | ||
| QString error = mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag ); | ||
| if ( !myStyleFlag ) | ||
| { | ||
| qDebug( "%s", error.toLocal8Bit().constData() ); | ||
| } | ||
| return myStyleFlag; | ||
| } | ||
|
|
||
| bool TestQgsShapeburst::imageCheck( QString theTestType ) | ||
| { | ||
| //use the QgsRenderChecker test utility class to | ||
| //ensure the rendered output matches our control image | ||
| mpMapRenderer->setExtent( mpPolysLayer->extent() ); | ||
| QgsRenderChecker myChecker; | ||
| myChecker.setControlName( "expected_" + theTestType ); | ||
| myChecker.setMapRenderer( mpMapRenderer ); | ||
| bool myResultFlag = myChecker.runTest( theTestType ); | ||
| mReport += myChecker.report(); | ||
| return myResultFlag; | ||
| } | ||
|
|
||
| QTEST_MAIN( TestQgsShapeburst ) | ||
| #include "moc_testqgsshapeburst.cxx" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | ||
| <qgis version="2.3.0-Master" minimumScale="1" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="1" maxLabelScale="1e+08" simplifyDrawingTol="1" simplifyMaxScale="1" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0"> | ||
| <renderer-v2 symbollevels="0" type="singleSymbol"> | ||
| <symbols> | ||
| <symbol alpha="1" type="fill" name="0"> | ||
| <layer pass="0" class="ShapeburstFill" locked="0"> | ||
| <prop k="blur_radius" v="8"/> | ||
| <prop k="color1" v="255,170,0,255"/> | ||
| <prop k="color2" v="0,170,127,255"/> | ||
| <prop k="color_type" v="1"/> | ||
| <prop k="discrete" v="0"/> | ||
| <prop k="distance_unit" v="MM"/> | ||
| <prop k="max_distance" v="4"/> | ||
| <prop k="offset" v="0.4,0.8"/> | ||
| <prop k="offset_unit" v="MM"/> | ||
| <prop k="shapeburst_color" v="170,170,255,255"/> | ||
| <prop k="shapeburst_color2" v="255,255,255,255"/> | ||
| <prop k="stops" v="0.5;255,85,0,255"/> | ||
| <prop k="use_whole_shape" v="0"/> | ||
| </layer> | ||
| </symbol> | ||
| </symbols> | ||
| <rotation/> | ||
| <sizescale scalemethod="area"/> | ||
| </renderer-v2> | ||
| <customproperties> | ||
| <property key="labeling" value="pal"/> | ||
| <property key="labeling/addDirectionSymbol" value="false"/> | ||
| <property key="labeling/angleOffset" value="0"/> | ||
| <property key="labeling/blendMode" value="0"/> | ||
| <property key="labeling/bufferBlendMode" value="0"/> | ||
| <property key="labeling/bufferColorA" value="255"/> | ||
| <property key="labeling/bufferColorB" value="255"/> | ||
| <property key="labeling/bufferColorG" value="255"/> | ||
| <property key="labeling/bufferColorR" value="255"/> | ||
| <property key="labeling/bufferDraw" value="false"/> | ||
| <property key="labeling/bufferJoinStyle" value="64"/> | ||
| <property key="labeling/bufferNoFill" value="false"/> | ||
| <property key="labeling/bufferSize" value="1"/> | ||
| <property key="labeling/bufferSizeInMapUnits" value="false"/> | ||
| <property key="labeling/bufferTransp" value="0"/> | ||
| <property key="labeling/centroidWhole" value="false"/> | ||
| <property key="labeling/decimals" value="3"/> | ||
| <property key="labeling/displayAll" value="false"/> | ||
| <property key="labeling/dist" value="0"/> | ||
| <property key="labeling/distInMapUnits" value="false"/> | ||
| <property key="labeling/enabled" value="false"/> | ||
| <property key="labeling/fieldName" value=""/> | ||
| <property key="labeling/fontBold" value="true"/> | ||
| <property key="labeling/fontCapitals" value="0"/> | ||
| <property key="labeling/fontFamily" value="Ubuntu"/> | ||
| <property key="labeling/fontItalic" value="true"/> | ||
| <property key="labeling/fontLetterSpacing" value="0"/> | ||
| <property key="labeling/fontLimitPixelSize" value="false"/> | ||
| <property key="labeling/fontMaxPixelSize" value="10000"/> | ||
| <property key="labeling/fontMinPixelSize" value="3"/> | ||
| <property key="labeling/fontSize" value="11"/> | ||
| <property key="labeling/fontSizeInMapUnits" value="false"/> | ||
| <property key="labeling/fontStrikeout" value="false"/> | ||
| <property key="labeling/fontUnderline" value="false"/> | ||
| <property key="labeling/fontWeight" value="75"/> | ||
| <property key="labeling/fontWordSpacing" value="0"/> | ||
| <property key="labeling/formatNumbers" value="false"/> | ||
| <property key="labeling/isExpression" value="false"/> | ||
| <property key="labeling/labelOffsetInMapUnits" value="true"/> | ||
| <property key="labeling/labelPerPart" value="false"/> | ||
| <property key="labeling/leftDirectionSymbol" value="<"/> | ||
| <property key="labeling/limitNumLabels" value="false"/> | ||
| <property key="labeling/maxCurvedCharAngleIn" value="20"/> | ||
| <property key="labeling/maxCurvedCharAngleOut" value="-20"/> | ||
| <property key="labeling/maxNumLabels" value="2000"/> | ||
| <property key="labeling/mergeLines" value="false"/> | ||
| <property key="labeling/minFeatureSize" value="0"/> | ||
| <property key="labeling/multilineAlign" value="0"/> | ||
| <property key="labeling/multilineHeight" value="1"/> | ||
| <property key="labeling/namedStyle" value="Bold Italic"/> | ||
| <property key="labeling/obstacle" value="true"/> | ||
| <property key="labeling/placeDirectionSymbol" value="0"/> | ||
| <property key="labeling/placement" value="0"/> | ||
| <property key="labeling/placementFlags" value="0"/> | ||
| <property key="labeling/plussign" value="false"/> | ||
| <property key="labeling/preserveRotation" value="true"/> | ||
| <property key="labeling/previewBkgrdColor" value="#ffffff"/> | ||
| <property key="labeling/priority" value="5"/> | ||
| <property key="labeling/quadOffset" value="4"/> | ||
| <property key="labeling/reverseDirectionSymbol" value="false"/> | ||
| <property key="labeling/rightDirectionSymbol" value=">"/> | ||
| <property key="labeling/scaleMax" value="10000000"/> | ||
| <property key="labeling/scaleMin" value="1"/> | ||
| <property key="labeling/scaleVisibility" value="false"/> | ||
| <property key="labeling/shadowBlendMode" value="6"/> | ||
| <property key="labeling/shadowColorB" value="0"/> | ||
| <property key="labeling/shadowColorG" value="0"/> | ||
| <property key="labeling/shadowColorR" value="0"/> | ||
| <property key="labeling/shadowDraw" value="false"/> | ||
| <property key="labeling/shadowOffsetAngle" value="135"/> | ||
| <property key="labeling/shadowOffsetDist" value="1"/> | ||
| <property key="labeling/shadowOffsetGlobal" value="true"/> | ||
| <property key="labeling/shadowOffsetUnits" value="1"/> | ||
| <property key="labeling/shadowRadius" value="1.5"/> | ||
| <property key="labeling/shadowRadiusAlphaOnly" value="false"/> | ||
| <property key="labeling/shadowRadiusUnits" value="1"/> | ||
| <property key="labeling/shadowScale" value="100"/> | ||
| <property key="labeling/shadowTransparency" value="30"/> | ||
| <property key="labeling/shadowUnder" value="0"/> | ||
| <property key="labeling/shapeBlendMode" value="0"/> | ||
| <property key="labeling/shapeBorderColorA" value="255"/> | ||
| <property key="labeling/shapeBorderColorB" value="128"/> | ||
| <property key="labeling/shapeBorderColorG" value="128"/> | ||
| <property key="labeling/shapeBorderColorR" value="128"/> | ||
| <property key="labeling/shapeBorderWidth" value="0"/> | ||
| <property key="labeling/shapeBorderWidthUnits" value="1"/> | ||
| <property key="labeling/shapeDraw" value="false"/> | ||
| <property key="labeling/shapeFillColorA" value="255"/> | ||
| <property key="labeling/shapeFillColorB" value="255"/> | ||
| <property key="labeling/shapeFillColorG" value="255"/> | ||
| <property key="labeling/shapeFillColorR" value="255"/> | ||
| <property key="labeling/shapeJoinStyle" value="64"/> | ||
| <property key="labeling/shapeOffsetUnits" value="1"/> | ||
| <property key="labeling/shapeOffsetX" value="0"/> | ||
| <property key="labeling/shapeOffsetY" value="0"/> | ||
| <property key="labeling/shapeRadiiUnits" value="1"/> | ||
| <property key="labeling/shapeRadiiX" value="0"/> | ||
| <property key="labeling/shapeRadiiY" value="0"/> | ||
| <property key="labeling/shapeRotation" value="0"/> | ||
| <property key="labeling/shapeRotationType" value="0"/> | ||
| <property key="labeling/shapeSVGFile" value=""/> | ||
| <property key="labeling/shapeSizeType" value="0"/> | ||
| <property key="labeling/shapeSizeUnits" value="1"/> | ||
| <property key="labeling/shapeSizeX" value="0"/> | ||
| <property key="labeling/shapeSizeY" value="0"/> | ||
| <property key="labeling/shapeTransparency" value="0"/> | ||
| <property key="labeling/shapeType" value="0"/> | ||
| <property key="labeling/textColorA" value="255"/> | ||
| <property key="labeling/textColorB" value="0"/> | ||
| <property key="labeling/textColorG" value="0"/> | ||
| <property key="labeling/textColorR" value="0"/> | ||
| <property key="labeling/textTransp" value="0"/> | ||
| <property key="labeling/upsidedownLabels" value="0"/> | ||
| <property key="labeling/wrapChar" value=""/> | ||
| <property key="labeling/xOffset" value="0"/> | ||
| <property key="labeling/yOffset" value="0"/> | ||
| </customproperties> | ||
| <blendMode>0</blendMode> | ||
| <featureBlendMode>0</featureBlendMode> | ||
| <layerTransparency>0</layerTransparency> | ||
| <displayfield>Name</displayfield> | ||
| <label>0</label> | ||
| <labelattributes> | ||
| <label fieldname="" text="Label"/> | ||
| <family fieldname="" name="Lucida Grande"/> | ||
| <size fieldname="" units="pt" value="12"/> | ||
| <bold fieldname="" on="0"/> | ||
| <italic fieldname="" on="0"/> | ||
| <underline fieldname="" on="0"/> | ||
| <strikeout fieldname="" on="0"/> | ||
| <color fieldname="" red="0" blue="0" green="0"/> | ||
| <x fieldname=""/> | ||
| <y fieldname=""/> | ||
| <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/> | ||
| <angle fieldname="" value="0" auto="0"/> | ||
| <alignment fieldname="" value="center"/> | ||
| <buffercolor fieldname="" red="255" blue="255" green="255"/> | ||
| <buffersize fieldname="" units="pt" value="1"/> | ||
| <bufferenabled fieldname="" on=""/> | ||
| <multilineenabled fieldname="" on=""/> | ||
| <selectedonly on=""/> | ||
| </labelattributes> | ||
| <edittypes> | ||
| <edittype labelontop="0" editable="1" type="0" name="Name"/> | ||
| <edittype labelontop="0" editable="1" type="0" name="Value"/> | ||
| </edittypes> | ||
| <editform></editform> | ||
| <editforminit></editforminit> | ||
| <featformsuppress>0</featformsuppress> | ||
| <annotationform></annotationform> | ||
| <editorlayout>generatedlayout</editorlayout> | ||
| <excludeAttributesWMS/> | ||
| <excludeAttributesWFS/> | ||
| <attributeactions/> | ||
| </qgis> |