Added placement margin to decoration items and updated dialogs.

- North arrow, scalebar, and copyright label updated to include a
  margin option on placement.
- All qgsdecorationitem type dialogs amended so that all widgets sit
  within a checkable group box for activating/deactivating the item.
This commit is contained in:
Duncan Runnacles 2015-12-22 19:13:25 +00:00
parent 1340afdc01
commit 47d93078ba
14 changed files with 1242 additions and 786 deletions

View File

@ -46,6 +46,8 @@ QgsDecorationCopyright::QgsDecorationCopyright( QObject* parent )
{
mPlacementLabels << tr( "Bottom Left" ) << tr( "Top Left" )
<< tr( "Top Right" ) << tr( "Bottom Right" );
mMarginHorizontal = 0;
mMarginVertical = 0;
setName( "Copyright Label" );
// initialise default values in the gui
@ -68,6 +70,8 @@ void QgsDecorationCopyright::projectRead()
QgsProject* prj = QgsProject::instance();
mLabelQString = prj->readEntry( mNameConfig, "/Label", defString );
mPlacementIndex = prj->readNumEntry( mNameConfig, "/Placement", 3 );
mMarginHorizontal = QgsProject::instance()->readNumEntry( mNameConfig, "/MarginH", 0 );
mMarginVertical = QgsProject::instance()->readNumEntry( mNameConfig, "/MarginV", 0 );
mLabelQColor.setNamedColor( prj->readEntry( mNameConfig, "/Color", "#000000" ) ); // default color is black
}
@ -80,6 +84,8 @@ void QgsDecorationCopyright::saveToProject()
prj->writeEntry( mNameConfig, "/Label", mLabelQString );
prj->writeEntry( mNameConfig, "/Color", mLabelQColor.name() );
prj->writeEntry( mNameConfig, "/Placement", mPlacementIndex );
prj->writeEntry( mNameConfig, "/MarginH", mMarginHorizontal );
prj->writeEntry( mNameConfig, "/MarginV", mMarginVertical );
}
// Slot called when the buffer menu item is activated
@ -112,28 +118,26 @@ void QgsDecorationCopyright::render( QPainter * theQPainter )
QSizeF size = text.size();
float myXOffset( 0 ), myYOffset( 0 );
myXOffset = int(( float( myWidth - size.width() )
/ 100. ) * float( mMarginHorizontal ) );
myYOffset = int(( float( myHeight - size.height() )
/ 100. ) * float( mMarginVertical ) );
//Determine placement of label from form combo box
switch ( mPlacementIndex )
{
case 0: // Bottom Left
//Define bottom left hand corner start point
myYOffset = myHeight - ( size.height() + 5 );
myXOffset = 5;
case 0: // Bottom Left. myXOffset is set above
myYOffset = myHeight - myYOffset - size.height();
break;
case 1: // Top left
//Define top left hand corner start point
myYOffset = 0;
myXOffset = 5;
case 1: // Top left. Already setup above
break;
case 2: // Top Right
//Define top right hand corner start point
myYOffset = 0;
myXOffset = myWidth - ( size.width() + 5 );
case 2: // Top Right. myYOffset is set above
myXOffset = myWidth - myXOffset - size.width();
break;
case 3: // Bottom Right
//Define bottom right hand corner start point
myYOffset = myHeight - ( size.height() + 5 );
myXOffset = myWidth - ( size.width() + 5 );
myYOffset = myHeight - myYOffset - size.height();
myXOffset = myWidth - myXOffset - size.width();
break;
default:
QgsDebugMsg( QString( "Unknown placement index of %1" ).arg( mPlacementIndex ) );

View File

@ -60,6 +60,9 @@ class APP_EXPORT QgsDecorationCopyright : public QgsDecorationItem
//! Placement of the copyright label - index and translated label names
int mPlacementIndex;
QStringList mPlacementLabels;
//! enable or disable use of position percentage for placement
int mMarginHorizontal;
int mMarginVertical;
friend class QgsDecorationCopyrightDialog;
};

View File

@ -33,13 +33,15 @@ QgsDecorationCopyrightDialog::QgsDecorationCopyrightDialog( QgsDecorationCopyrig
cboOrientation->hide();
textLabel15->hide();
cboxEnabled->setChecked( mDeco.enabled() );
grpEnable->setChecked( mDeco.enabled() );
// text
txtCopyrightText->setPlainText( mDeco.mLabelQString );
// placement
cboPlacement->clear();
cboPlacement->addItems( mDeco.mPlacementLabels );
cboPlacement->setCurrentIndex( mDeco.mPlacementIndex );
spnHorizontal->setValue( mDeco.mMarginHorizontal );
spnVertical->setValue( mDeco.mMarginVertical );
// color
pbnColorChooser->setColor( mDeco.mLabelQColor );
pbnColorChooser->setContext( "gui" );
@ -63,7 +65,9 @@ void QgsDecorationCopyrightDialog::on_buttonBox_accepted()
mDeco.mLabelQString = txtCopyrightText->toPlainText();
mDeco.mLabelQColor = pbnColorChooser->color();
mDeco.mPlacementIndex = cboPlacement->currentIndex();
mDeco.setEnabled( cboxEnabled->isChecked() );
mDeco.mMarginHorizontal = spnHorizontal->value();
mDeco.mMarginVertical = spnVertical->value();
mDeco.setEnabled( grpEnable->isChecked() );
accept();
}

View File

@ -37,7 +37,7 @@ QgsDecorationGridDialog::QgsDecorationGridDialog( QgsDecorationGrid& deco, QWidg
QSettings settings;
// restoreGeometry( settings.value( "/Windows/DecorationGrid/geometry" ).toByteArray() );
chkEnable->setChecked( mDeco.enabled() );
grpEnable->setChecked( mDeco.enabled() );
// mXMinLineEdit->setValidator( new QDoubleValidator( mXMinLineEdit ) );
@ -67,7 +67,7 @@ void QgsDecorationGridDialog::updateGuiElements()
{
// blockAllSignals( true );
chkEnable->setChecked( mDeco.enabled() );
grpEnable->setChecked( mDeco.enabled() );
mIntervalXEdit->setText( QString::number( mDeco.gridIntervalX() ) );
mIntervalYEdit->setText( QString::number( mDeco.gridIntervalY() ) );
@ -109,7 +109,7 @@ void QgsDecorationGridDialog::updateGuiElements()
void QgsDecorationGridDialog::updateDecoFromGui()
{
mDeco.setDirty( false );
mDeco.setEnabled( chkEnable->isChecked() );
mDeco.setEnabled( grpEnable->isChecked() );
mDeco.setGridIntervalX( mIntervalXEdit->text().toDouble() );
mDeco.setGridIntervalY( mIntervalYEdit->text().toDouble() );

View File

@ -61,6 +61,8 @@ QgsDecorationNorthArrow::QgsDecorationNorthArrow( QObject* parent )
mAutomatic = true;
mPlacementLabels << tr( "Bottom Left" ) << tr( "Top Left" )
<< tr( "Top Right" ) << tr( "Bottom Right" );
mMarginHorizontal = 0;
mMarginVertical = 0;
setName( "North Arrow" );
projectRead();
@ -76,6 +78,8 @@ void QgsDecorationNorthArrow::projectRead()
mRotationInt = QgsProject::instance()->readNumEntry( mNameConfig, "/Rotation", 0 );
mPlacementIndex = QgsProject::instance()->readNumEntry( mNameConfig, "/Placement", 0 );
mAutomatic = QgsProject::instance()->readBoolEntry( mNameConfig, "/Automatic", true );
mMarginHorizontal = QgsProject::instance()->readNumEntry( mNameConfig, "/MarginH", 0 );
mMarginVertical = QgsProject::instance()->readNumEntry( mNameConfig, "/MarginV", 0 );
}
void QgsDecorationNorthArrow::saveToProject()
@ -84,6 +88,8 @@ void QgsDecorationNorthArrow::saveToProject()
QgsProject::instance()->writeEntry( mNameConfig, "/Rotation", mRotationInt );
QgsProject::instance()->writeEntry( mNameConfig, "/Placement", mPlacementIndex );
QgsProject::instance()->writeEntry( mNameConfig, "/Automatic", mAutomatic );
QgsProject::instance()->writeEntry( mNameConfig, "/MarginH", mMarginHorizontal );
QgsProject::instance()->writeEntry( mNameConfig, "/MarginV", mMarginVertical );
}
// Slot called when the buffer menu item is activated
@ -140,28 +146,34 @@ void QgsDecorationNorthArrow::render( QPainter * theQPainter )
//QgsDebugMsg("Rendering north arrow at " + mPlacementLabels.at(mPlacementIndex));
// Calculate the margin percentage values
int myPercentageWidth = int((( float( myWidth ) - float( myQPixmap.width() ) )
/ 100. ) * float( mMarginHorizontal ) );
int myPercentageHeight = int((( float( myHeight ) - float( myQPixmap.height() ) )
/ 100. ) * float( mMarginVertical ) );
//Determine placement of label from form combo box
switch ( mPlacementIndex )
{
case 0: // Bottom Left
theQPainter->translate( 0, myHeight - myQPixmap.height() );
theQPainter->translate( myPercentageWidth, myHeight - myPercentageHeight - myQPixmap.height() );
break;
case 1: // Top Left
//no need to translate for TL corner because we're already at the origin
theQPainter->translate( 0, 0 );
theQPainter->translate( myPercentageWidth, myPercentageHeight );
break;
case 2: // Top Right
theQPainter->translate( myWidth - myQPixmap.width(), 0 );
theQPainter->translate( myWidth - myPercentageWidth - myQPixmap.width(), myPercentageHeight );
break;
case 3: // Bottom Right
theQPainter->translate( myWidth - myQPixmap.width(),
myHeight - myQPixmap.height() );
theQPainter->translate( myWidth - myPercentageWidth - myQPixmap.width(),
myHeight - myPercentageHeight - myQPixmap.height() );
break;
default:
{
//QgsDebugMsg("Unable to determine where to put north arrow so defaulting to top left");
}
}
//rotate the canvas by the north arrow rotation amount
theQPainter->rotate( mRotationInt );
//Now we can actually do the drawing, and draw a smooth north arrow even when rotated

View File

@ -68,6 +68,9 @@ class APP_EXPORT QgsDecorationNorthArrow: public QgsDecorationItem
// The placement index and translated text
int mPlacementIndex;
QStringList mPlacementLabels;
//! margin values
int mMarginHorizontal;
int mMarginVertical;
friend class QgsDecorationNorthArrowDialog;
};

View File

@ -39,9 +39,11 @@ QgsDecorationNorthArrowDialog::QgsDecorationNorthArrowDialog( QgsDecorationNorth
cboPlacement->clear();
cboPlacement->addItems( mDeco.mPlacementLabels );
cboPlacement->setCurrentIndex( mDeco.mPlacementIndex );
spinHorizontal->setValue( mDeco.mMarginHorizontal );
spinVertical->setValue( mDeco.mMarginVertical );
// enabled
cboxShow->setChecked( mDeco.enabled() );
grpEnable->setChecked( mDeco.enabled() );
// automatic
cboxAutomatic->setChecked( mDeco.mAutomatic );
@ -62,8 +64,10 @@ void QgsDecorationNorthArrowDialog::on_buttonBox_accepted()
{
mDeco.mRotationInt = sliderRotation->value();
mDeco.mPlacementIndex = cboPlacement->currentIndex();
mDeco.setEnabled( cboxShow->isChecked() );
mDeco.setEnabled( grpEnable->isChecked() );
mDeco.mAutomatic = cboxAutomatic->isChecked();
mDeco.mMarginHorizontal = spinHorizontal->value();
mDeco.mMarginVertical = spinVertical->value();
accept();
}

View File

@ -57,6 +57,8 @@ QgsDecorationScaleBar::QgsDecorationScaleBar( QObject* parent )
mPlacementIndex = 1;
mStyleLabels << tr( "Tick Down" ) << tr( "Tick Up" )
<< tr( "Bar" ) << tr( "Box" );
mMarginHorizontal = 0;
mMarginVertical = 0;
setName( "Scale Bar" );
projectRead();
@ -79,6 +81,8 @@ void QgsDecorationScaleBar::projectRead()
int myGreenInt = QgsProject::instance()->readNumEntry( mNameConfig, "/ColorGreenPart", 0 );
int myBlueInt = QgsProject::instance()->readNumEntry( mNameConfig, "/ColorBluePart", 0 );
mColor = QColor( myRedInt, myGreenInt, myBlueInt );
mMarginHorizontal = QgsProject::instance()->readNumEntry( mNameConfig, "/MarginH", 0 );
mMarginVertical = QgsProject::instance()->readNumEntry( mNameConfig, "/MarginV", 0 );
}
void QgsDecorationScaleBar::saveToProject()
@ -92,6 +96,8 @@ void QgsDecorationScaleBar::saveToProject()
QgsProject::instance()->writeEntry( mNameConfig, "/ColorRedPart", mColor.red() );
QgsProject::instance()->writeEntry( mNameConfig, "/ColorGreenPart", mColor.green() );
QgsProject::instance()->writeEntry( mNameConfig, "/ColorBluePart", mColor.blue() );
QgsProject::instance()->writeEntry( mNameConfig, "/MarginH", mMarginHorizontal );
QgsProject::instance()->writeEntry( mNameConfig, "/MarginV", mMarginVertical );
}
@ -133,7 +139,6 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
// Hard coded sizes
int myMajorTickSize = 8;
int myTextOffsetX = 3;
int myMargin = 20;
QSettings settings;
QGis::UnitType myPreferredUnits = QGis::fromLiteral( settings.value( "/qgis/measure/displayunits", QGis::toLiteral( QGis::Meters ) ).toString() );
@ -252,26 +257,34 @@ void QgsDecorationScaleBar::render( QPainter * theQPainter )
//Calculate total width of scale bar and label
double myTotalScaleBarWidth = myScaleBarWidth + myFontWidth;
//determine the origin of scale bar depending on placement selected
int myOriginX = myMargin;
int myOriginY = myMargin;
//Calculate percentage page width for use in placing item
int myMarginW = 10;
int myMarginH = 20;
float myMarginDoubledW = float( myMarginW * 2 );
float myMarginDoubledH = float( myMarginH * 2 );
int myOriginX = int((( float( myCanvasWidth - myMarginDoubledW ) - myTotalScaleBarWidth )
/ 100. ) * float( mMarginHorizontal ) );
int myOriginY = int((( float( myCanvasHeight - myMarginDoubledH ) )
/ 100. ) * float( mMarginVertical ) );
//Determine the origin of scale bar depending on placement selected
switch ( mPlacementIndex )
{
case 0: // Bottom Left
myOriginX = myMargin;
myOriginY = myCanvasHeight - myMargin;
myOriginX += myMarginW;
myOriginY = myCanvasHeight - myOriginY - myMarginH;
break;
case 1: // Top Left
myOriginX = myMargin;
myOriginY = myMargin;
myOriginX += myMarginW;
myOriginY += myMarginH;
break;
case 2: // Top Right
myOriginX = myCanvasWidth - (( int ) myTotalScaleBarWidth ) - myMargin;
myOriginY = myMargin;
myOriginX = myCanvasWidth - myOriginX - myMarginW - (( int ) myTotalScaleBarWidth );
myOriginY += myMarginH;
break;
case 3: // Bottom Right
myOriginX = myCanvasWidth - (( int ) myTotalScaleBarWidth ) - myMargin;
myOriginY = myCanvasHeight - myMargin;
myOriginX = myCanvasWidth - myOriginX - myMarginW - (( int ) myTotalScaleBarWidth );
myOriginY = myCanvasHeight - myOriginY - myMarginH;
break;
default:
QgsDebugMsg( "Unable to determine where to put scale bar so defaulting to top left" );

View File

@ -62,6 +62,9 @@ class APP_EXPORT QgsDecorationScaleBar: public QgsDecorationItem
QStringList mStyleLabels;
//! The scale bar color
QColor mColor;
//! Margin percentage values
int mMarginHorizontal;
int mMarginVertical;
friend class QgsDecorationScaleBarDialog;
};

View File

@ -50,8 +50,10 @@ QgsDecorationScaleBarDialog::QgsDecorationScaleBarDialog( QgsDecorationScaleBar&
cboPlacement->clear();
cboPlacement->addItems( mDeco.mPlacementLabels );
cboPlacement->setCurrentIndex( mDeco.mPlacementIndex );
spnHorizontal->setValue( mDeco.mMarginHorizontal );
spnVertical->setValue( mDeco.mMarginVertical );
chkEnable->setChecked( mDeco.enabled() );
grpEnable->setChecked( mDeco.enabled() );
cboStyle->clear();
cboStyle->addItems( mDeco.mStyleLabels );
@ -77,9 +79,11 @@ void QgsDecorationScaleBarDialog::on_buttonBox_helpRequested()
void QgsDecorationScaleBarDialog::on_buttonBox_accepted()
{
mDeco.mPlacementIndex = cboPlacement->currentIndex();
mDeco.mMarginHorizontal = spnHorizontal->value();
mDeco.mMarginVertical = spnVertical->value();
mDeco.mPreferredSize = spnSize->value();
mDeco.mSnapping = chkSnapping->isChecked();
mDeco.setEnabled( chkEnable->isChecked() );
mDeco.setEnabled( grpEnable->isChecked() );
mDeco.mStyleIndex = cboStyle->currentIndex();
mDeco.mColor = pbnChangeColor->color();

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>397</width>
<height>326</height>
<width>526</width>
<height>291</height>
</rect>
</property>
<property name="windowTitle">
@ -19,139 +19,259 @@
</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="cboxEnabled">
<property name="text">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="grpEnable">
<property name="minimumSize">
<size>
<width>0</width>
<height>240</height>
</size>
</property>
<property name="title">
<string>Enable copyright label</string>
</property>
<property name="checked">
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Enter your copyright label here:</string>
<property name="checked">
<bool>false</bool>
</property>
<property name="buddy">
<cstring>txtCopyrightText</cstring>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QTextEdit" name="txtCopyrightText">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="1" colspan="4">
<widget class="QComboBox" name="cboPlacement">
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblMargin">
<property name="minimumSize">
<size>
<width>155</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Margin from edge (%)</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="textLabel1_4">
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QgsSpinBox" name="spnHorizontal">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="textLabel1_5">
<property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QgsSpinBox" name="spnVertical">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel15">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&amp;Orientation</string>
</property>
<property name="buddy">
<cstring>cboOrientation</cstring>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Enter your copyright label here:</string>
</property>
<property name="buddy">
<cstring>txtCopyrightText</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="textLabel16">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&amp;Placement</string>
</property>
<property name="buddy">
<cstring>cboPlacement</cstring>
</property>
</widget>
</item>
<item row="1" column="0" colspan="5">
<widget class="QTextEdit" name="txtCopyrightText">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Verdana'; font-size:10pt;&quot;&gt;© QGIS 2013&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</property>
</widget>
</item>
<item row="5" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QComboBox" name="cboOrientation">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>Horizontal</string>
</property>
</item>
<item>
<property name="text">
<string>Vertical</string>
</property>
</item>
</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="4" column="0">
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QgsColorButtonV2" name="pbnColorChooser">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</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>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="textLabel16">
<property name="text">
<string>&amp;Placement</string>
</property>
<property name="buddy">
<cstring>cboPlacement</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="cboPlacement">
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="textLabel15">
<property name="text">
<string>&amp;Orientation</string>
</property>
<property name="buddy">
<cstring>cboOrientation</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="cboOrientation">
<item>
<property name="text">
<string>Horizontal</string>
</property>
</item>
<item>
<property name="text">
<string>Vertical</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QgsColorButtonV2" name="pbnColorChooser">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</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="6" column="0" colspan="2">
<item row="1" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -171,13 +291,20 @@ p, li { white-space: pre-wrap; }
<header>qgscolorbuttonv2.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>cboxEnabled</tabstop>
<tabstop>grpEnable</tabstop>
<tabstop>txtCopyrightText</tabstop>
<tabstop>cboPlacement</tabstop>
<tabstop>cboOrientation</tabstop>
<tabstop>spnHorizontal</tabstop>
<tabstop>spnVertical</tabstop>
<tabstop>pbnColorChooser</tabstop>
<tabstop>cboOrientation</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>

View File

@ -18,292 +18,302 @@
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0,0,0,0" columnminimumwidth="125,100,0,0,0">
<item row="0" column="0">
<widget class="QCheckBox" name="chkEnable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Enable grid</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mIntervalXLabel">
<property name="text">
<string>Interval X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mIntervalYLabel">
<property name="text">
<string>Interval Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mGridTypeLabel">
<property name="accessibleName">
<string extracomment="Hello translotor"/>
</property>
<property name="text">
<string>Grid type</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mLineSymbolLabel">
<property name="text">
<string>Line symbol</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="mGridTypeComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="mLineSymbolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3" rowspan="8" colspan="2">
<widget class="QGroupBox" name="mDrawAnnotationCheckBox">
<property name="title">
<string>Draw annotation</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
<widget class="QGroupBox" name="grpEnable">
<property name="title">
<string>Enable grid</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="3" rowspan="8">
<widget class="QGroupBox" name="mDrawAnnotationCheckBox">
<property name="title">
<string>Draw annotation</string>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabel">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Annotation direction</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBox"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mAnnotationFontButton">
<property name="text">
<string>Font...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mDistanceToFrameLabel">
<property name="text">
<string>Distance to map frame</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mDistanceToMapFrameSpinBox"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mCoordinatePrecisionLabel">
<property name="text">
<string>Coordinate precision</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="mCoordinatePrecisionSpinBox"/>
</item>
</layout>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mMarkerSymbolLabel">
<property name="text">
<string>Marker symbol</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QPushButton" name="mMarkerSymbolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mOffsetXLabel">
<property name="text">
<string>Offset X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="mOffsetYLabel">
<property name="text">
<string>Offset Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="3" rowspan="2" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Update Interval / Offset from</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QPushButton" name="mPbtnUpdateFromExtents">
<property name="text">
<string>Canvas Extents</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mPbtnUpdateFromLayer">
<property name="text">
<string>Active Raster Layer</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="mIntervalXEdit"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="mIntervalYEdit"/>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="mOffsetXEdit"/>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="mOffsetYEdit"/>
</item>
</layout>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mAnnotationDirectionLabel">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Annotation direction</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mAnnotationDirectionComboBox"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mAnnotationFontButton">
<property name="text">
<string>Font...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mDistanceToFrameLabel">
<property name="text">
<string>Distance to map frame</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mDistanceToMapFrameSpinBox"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mCoordinatePrecisionLabel">
<property name="text">
<string>Coordinate precision</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="mCoordinatePrecisionSpinBox"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mIntervalYLabel">
<property name="text">
<string>Interval Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="mIntervalYEdit"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mGridTypeLabel">
<property name="accessibleName">
<string extracomment="Hello translotor"/>
</property>
<property name="text">
<string>Grid type</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="mGridTypeComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mLineSymbolLabel">
<property name="text">
<string>Line symbol</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="mLineSymbolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mMarkerSymbolLabel">
<property name="text">
<string>Marker symbol</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QPushButton" name="mMarkerSymbolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mOffsetXLabel">
<property name="text">
<string>Offset X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="mOffsetXEdit"/>
</item>
<item row="8" column="3" rowspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Update Interval / Offset from</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QPushButton" name="mPbtnUpdateFromExtents">
<property name="text">
<string>Canvas Extents</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mPbtnUpdateFromLayer">
<property name="text">
<string>Active Raster Layer</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="mOffsetYLabel">
<property name="text">
<string>Offset Y</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="mOffsetYEdit"/>
</item>
<item row="0" column="1" rowspan="2">
<widget class="QLineEdit" name="mIntervalXEdit"/>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="mIntervalXLabel">
<property name="text">
<string>Interval X</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
<zorder>mOffsetYEdit</zorder>
<zorder>mOffsetXEdit</zorder>
<zorder>mDrawAnnotationCheckBox</zorder>
<zorder>mLineSymbolLabel</zorder>
<zorder>groupBox</zorder>
<zorder>mLineSymbolButton</zorder>
<zorder>mMarkerSymbolButton</zorder>
<zorder>mMarkerSymbolLabel</zorder>
<zorder>mIntervalXEdit</zorder>
<zorder>line_2</zorder>
<zorder>line_3</zorder>
<zorder>mIntervalYEdit</zorder>
<zorder>mIntervalXLabel</zorder>
<zorder>mOffsetXLabel</zorder>
<zorder>mGridTypeComboBox</zorder>
<zorder>mGridTypeLabel</zorder>
<zorder>mIntervalYLabel</zorder>
<zorder>mOffsetYLabel</zorder>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
@ -318,7 +328,7 @@
</layout>
</widget>
<tabstops>
<tabstop>chkEnable</tabstop>
<tabstop>grpEnable</tabstop>
<tabstop>mIntervalXEdit</tabstop>
<tabstop>mIntervalYEdit</tabstop>
<tabstop>mGridTypeComboBox</tabstop>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>382</width>
<height>193</height>
<width>549</width>
<height>234</height>
</rect>
</property>
<property name="windowTitle">
@ -20,152 +20,243 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QGroupBox" name="grpEnable">
<property name="title">
<string>Enable north arrow</string>
</property>
<widget class="QLabel" name="pixmapLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Preview of north arrow</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="textLabel6">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="6">
<widget class="QSpinBox" name="spinAngle">
<property name="maximum">
<number>360</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="0" column="3" colspan="3">
<widget class="QSlider" name="sliderRotation">
<property name="toolTip">
<string/>
</property>
<property name="maximum">
<number>360</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="pageStep">
<number>10</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="3" colspan="4">
<widget class="QComboBox" name="cboPlacement">
<property name="toolTip">
<string>Placement on screen</string>
</property>
<item>
<property name="text">
<string>Angle</string>
<string>Top Left</string>
</property>
<property name="buddy">
<cstring>sliderRotation</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSlider" name="sliderRotation">
<property name="toolTip">
<string/>
</property>
<property name="maximum">
<number>360</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="pageStep">
<number>10</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="spinAngle">
<property name="maximum">
<number>360</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel8">
</item>
<item>
<property name="text">
<string>Placement</string>
<string>Top Right</string>
</property>
<property name="buddy">
<cstring>cboPlacement</cstring>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="cboPlacement">
<property name="toolTip">
<string>Placement on screen</string>
</property>
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="cboxShow">
</item>
<item>
<property name="text">
<string>Enable North Arrow</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="cboxAutomatic">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Set direction automatically</string>
<string>Bottom Right</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="labelHorizontal">
<property name="text">
<string>Horizontal</string>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QLabel" name="labelVertical">
<property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QgsSpinBox" name="spinVertical">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="whatsThis">
<string extracomment="Distance from the top of the canvas as a percentage of page height"/>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QgsSpinBox" name="spinHorizontal">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="whatsThis">
<string extracomment="Distance from the left of the canvas as a percentage of page width"/>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="textLabel6">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>Angle</string>
</property>
<property name="buddy">
<cstring>sliderRotation</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="textLabel8">
<property name="text">
<string>Placement</string>
</property>
<property name="buddy">
<cstring>cboPlacement</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>7</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lblMargin">
<property name="minimumSize">
<size>
<width>155</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Margin from edge (%)</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="6">
<widget class="QCheckBox" name="cboxAutomatic">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string>Set direction automatically</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="5">
<widget class="QLabel" name="pixmapLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Preview of north arrow</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
@ -181,11 +272,20 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>grpEnable</tabstop>
<tabstop>sliderRotation</tabstop>
<tabstop>spinAngle</tabstop>
<tabstop>cboPlacement</tabstop>
<tabstop>cboxShow</tabstop>
<tabstop>spinHorizontal</tabstop>
<tabstop>spinVertical</tabstop>
<tabstop>cboxAutomatic</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>356</width>
<height>255</height>
<width>537</width>
<height>271</height>
</rect>
</property>
<property name="windowTitle">
@ -15,213 +15,375 @@
</property>
<property name="windowIcon">
<iconset>
<normaloff/>
</iconset>
<normaloff>../../../../../.designer/backup</normaloff>../../../../../.designer/backup</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="textLabel1_2">
<item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="grpEnable">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Placement</string>
<property name="minimumSize">
<size>
<width>0</width>
<height>220</height>
</size>
</property>
<property name="buddy">
<cstring>cboPlacement</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cboPlacement">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Scale bar style</string>
</property>
<property name="buddy">
<cstring>cboStyle</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cboStyle">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Select the style of the scale bar</string>
</property>
<item>
<property name="text">
<string>Tick Down</string>
</property>
</item>
<item>
<property name="text">
<string>Tick Up</string>
</property>
</item>
<item>
<property name="text">
<string>Box</string>
</property>
</item>
<item>
<property name="text">
<string>Bar</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="textLabel1_3_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Color of bar</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QgsColorButtonV2" name="pbnChangeColor">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</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="3" column="0">
<widget class="QLabel" name="textLabel1_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Size of bar</string>
</property>
<property name="buddy">
<cstring>spnSize</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spnSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="chkEnable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<property name="title">
<string>Enable scale bar</string>
</property>
<property name="checked">
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="chkSnapping">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatically snap to round number on resize</string>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="3" column="0">
<widget class="QLabel" name="lblLocation">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Location</string>
</property>
<property name="buddy">
<cstring>cboPlacement</cstring>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblMargin">
<property name="minimumSize">
<size>
<width>155</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Margin from edge (%)</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="textLabel1_3_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Color of bar</string>
</property>
</widget>
</item>
<item row="14" column="0" colspan="3">
<widget class="QCheckBox" name="chkSnapping">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatically snap to round number on resize</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="textLabel1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Scale bar style</string>
</property>
<property name="buddy">
<cstring>cboStyle</cstring>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="textLabel1_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Size of bar</string>
</property>
<property name="buddy">
<cstring>spnSize</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="cboPlacement">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>338</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="cboStyle">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>338</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Select the style of the scale bar</string>
</property>
<item>
<property name="text">
<string>Tick Down</string>
</property>
</item>
<item>
<property name="text">
<string>Tick Up</string>
</property>
</item>
<item>
<property name="text">
<string>Box</string>
</property>
</item>
<item>
<property name="text">
<string>Bar</string>
</property>
</item>
</widget>
</item>
<item row="6" column="1">
<widget class="QgsColorButtonV2" name="pbnChangeColor">
<property name="minimumSize">
<size>
<width>338</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QgsSpinBox" name="spnSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>338</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="hlytMargin" stretch="0,0,0,0,0">
<property name="spacing">
<number>10</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="lblHorizontal">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Horizontal</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QgsSpinBox" name="spnHorizontal">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblVertical">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Vertical</string>
</property>
</widget>
</item>
<item>
<widget class="QgsSpinBox" name="spnVertical">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>90</width>
<height>16777215</height>
</size>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<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>
</layout>
</widget>
</item>
<item row="6" column="0" colspan="2">
<item row="9" column="0" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -241,13 +403,20 @@
<header>qgscolorbuttonv2.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsSpinBox</class>
<extends>QSpinBox</extends>
<header>qgsspinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>grpEnable</tabstop>
<tabstop>cboPlacement</tabstop>
<tabstop>spnHorizontal</tabstop>
<tabstop>spnVertical</tabstop>
<tabstop>cboStyle</tabstop>
<tabstop>pbnChangeColor</tabstop>
<tabstop>spnSize</tabstop>
<tabstop>chkEnable</tabstop>
<tabstop>chkSnapping</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>