57 changes: 57 additions & 0 deletions src/gui/symbology-ng/qgssymbollayerv2widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,63 @@ class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widget, pr

//////////

#include "ui_widget_linepatternfill.h"

class QgsLinePatternFillSymbolLayer;

class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLayerV2Widget, private Ui::WidgetLinePatternFill
{
Q_OBJECT

public:

QgsLinePatternFillSymbolLayerWidget( const QgsVectorLayer* vl, QWidget* parent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { return new QgsLinePatternFillSymbolLayerWidget( vl ); }

virtual void setSymbolLayer( QgsSymbolLayerV2* layer);
virtual QgsSymbolLayerV2* symbolLayer();

protected:
QgsLinePatternFillSymbolLayer* mLayer;

private slots:
void on_mAngleSpinBox_valueChanged( double d );
void on_mDistanceSpinBox_valueChanged( double d );
void on_mLineWidthSpinBox_valueChanged( double d );
void on_mColorPushButton_clicked();
void on_mOutlinePushButton_clicked();
};

//////////

#include "ui_widget_pointpatternfill.h"

class QgsPointPatternFillSymbolLayer;

class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLayerV2Widget, private Ui::WidgetPointPatternFill
{
Q_OBJECT

public:
QgsPointPatternFillSymbolLayerWidget( const QgsVectorLayer* vl, QWidget* parent = NULL );
static QgsSymbolLayerV2Widget* create( const QgsVectorLayer* vl ) { return new QgsPointPatternFillSymbolLayerWidget( vl ); }

virtual void setSymbolLayer( QgsSymbolLayerV2* layer);
virtual QgsSymbolLayerV2* symbolLayer();

protected:
QgsPointPatternFillSymbolLayer* mLayer;
void updateMarkerIcon();

private slots:
void on_mHorizontalDistanceSpinBox_valueChanged ( double d );
void on_mVerticalDistanceSpinBox_valueChanged ( double d );
void on_mHorizontalDisplacementSpinBox_valueChanged ( double d );
void on_mVerticalDisplacementSpinBox_valueChanged ( double d );
void on_mChangeMarkerButton_clicked();
};

/////////

#include "ui_widget_fontmarker.h"

Expand Down
2 changes: 2 additions & 0 deletions src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ static void _initWidgetFunctions()
_initWidgetFunction( "SimpleFill", QgsSimpleFillSymbolLayerV2Widget::create );
_initWidgetFunction( "SVGFill", QgsSVGFillSymbolLayerWidget::create );
_initWidgetFunction( "CentroidFill", QgsCentroidFillSymbolLayerV2Widget::create );
_initWidgetFunction( "LinePatternFill", QgsLinePatternFillSymbolLayerWidget::create );
_initWidgetFunction( "PointPatternFill", QgsPointPatternFillSymbolLayerWidget::create );

initialized = true;
}
Expand Down
91 changes: 91 additions & 0 deletions src/ui/symbollayer/widget_linepatternfill.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>WidgetLinePatternFill</class>
<widget class="QWidget" name="WidgetLinePatternFill">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>236</width>
<height>151</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="mAngleLabel">
<property name="text">
<string>Angle</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mAngleSpinBox">
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mDistanceLabel">
<property name="text">
<string>Distance</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mDistanceSpinBox">
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mLineWidthLabel">
<property name="text">
<string>Line width</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
<property name="maximum">
<double>99999999.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mColorLabel">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="mColorPushButton">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mOutlineLabel">
<property name="text">
<string>Outline</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="mOutlinePushButton">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
94 changes: 94 additions & 0 deletions src/ui/symbollayer/widget_pointpatternfill.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>WidgetPointPatternFill</class>
<widget class="QWidget" name="WidgetPointPatternFill">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>243</width>
<height>152</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="mMarkerLabel">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Marker</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mChangeMarkerButton">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mHorizontalDistanceLabel">
<property name="text">
<string>Horizontal distance</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mHorizontalDistanceSpinBox">
<property name="maximum">
<double>99999999.989999994635582</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mVerticalDistanceLabel">
<property name="text">
<string>Vertical distance</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mVerticalDistanceSpinBox">
<property name="maximum">
<double>999999999.990000009536743</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mHorizontalDisplacementLabel">
<property name="text">
<string>Horizontal displacement</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="mHorizontalDisplacementSpinBox">
<property name="maximum">
<double>9999999.990000000223517</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mVerticalDisplacementLabel">
<property name="text">
<string>Vertical displacement</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="mVerticalDisplacementSpinBox">
<property name="maximum">
<double>999999999.990000009536743</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>