81 changes: 81 additions & 0 deletions images/themes/default/mActionSplitFeatures.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
606 changes: 606 additions & 0 deletions images/themes/gis/mActionPanToSelected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
604 changes: 604 additions & 0 deletions images/themes/gis/mActionRotateLabel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
585 changes: 585 additions & 0 deletions images/themes/gis/mActionSelectPolygon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
710 changes: 710 additions & 0 deletions images/themes/gis/mActionSplitFeatures.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions mac/cmake/1qt.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ EXECUTE_PROCESS (COMMAND mkdir -p "${QPLUGDIR}/../sqldrivers")
IF (NOT EXISTS "${QPLUGDIR}/../sqldrivers/libqsqlite.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QT_PLUGINS_DIR@/sqldrivers/libqsqlite.dylib" "${QPLUGDIR}/../sqldrivers/libqsqlite.dylib")
ENDIF ()
EXECUTE_PROCESS (COMMAND mkdir -p "${QPLUGDIR}/../iconengines")
IF (NOT EXISTS "${QPLUGDIR}/../iconengines/libqsvgicon.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QT_PLUGINS_DIR@/iconengines/libqsvgicon.dylib" "${QPLUGDIR}/../iconengines/libqsvgicon.dylib")
ENDIF ()

# Qwt
# assumes shared libraries
Expand Down Expand Up @@ -184,6 +188,7 @@ FOREACH (QFW ${QTLISTQG})
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../codecs/libq${QC}codecs.dylib")
ENDFOREACH (QC)
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../sqldrivers/libqsqlite.dylib")
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../iconengines/libqsvgicon.dylib")
# qt fw
IF (@OSX_HAVE_LOADERPATH@)
SET (QFW_CHG_TO "${ATLOADER}/../../../${LIBPOST}")
Expand Down
13 changes: 8 additions & 5 deletions python/core/qgis.sip
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,20 @@ public:

/** Map units that qgis supports
* @note that QGIS < 1.4 api had only Meters, Feet, Degrees and UnknownUnit
* @note that QGIS > 1.8 api returns to that
*/
enum UnitType
{
Meters = 0,
Feet = 1,
Degrees = 2, //for 1.0 api backwards compatibility
Degrees = 2,
UnknownUnit = 3,

// for [1.4;1.8] api backwards compatibility
DecimalDegrees = 2,
DegreesMinutesSeconds = 4,
DegreesDecimalMinutes = 5,
UnknownUnit = 3
} ;
DegreesMinutesSeconds = 2,
DegreesDecimalMinutes = 2,
};

//! User defined event types
enum UserEvent
Expand Down
214 changes: 111 additions & 103 deletions python/core/qgsgeometry.sip

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/analysis/vector/qgsgeometryanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ bool QgsGeometryAnalyzer::eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer*
eventLayer->select( eventLayer->pendingAllAttributesList(), QgsRectangle(), false, false );
QgsGeometry* lrsGeom = 0;
QgsFeature lineFeature;
double measure1, measure2;
double measure1, measure2 = 0.0;

int nEventFeatures = eventLayer->pendingFeatureCount();
int featureCounter = 0;
Expand Down Expand Up @@ -1271,7 +1271,7 @@ unsigned char* QgsGeometryAnalyzer::locateBetweenWkbString( unsigned char* ptr,
{
int* nPoints = ( int* ) ptr;
ptr += sizeof( int );
double prevx, prevy, prevz;
double prevx = 0.0, prevy = 0.0, prevz = 0.0;
double *x, *y, *z;
QgsPolyline currentLine;

Expand Down Expand Up @@ -1323,7 +1323,7 @@ unsigned char* QgsGeometryAnalyzer::locateAlongWkbString( unsigned char* ptr, Qg
{
int* nPoints = ( int* ) ptr;
ptr += sizeof( int );
double prevx, prevy, prevz;
double prevx = 0.0, prevy = 0.0, prevz = 0.0;
double *x, *y, *z;

QgsPoint pt1, pt2;
Expand Down
2 changes: 1 addition & 1 deletion src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
showItem( "layer/group" , item );

int line_x = visualItemRect( item ).left();
int line_y;
int line_y = 0;
if ( layer )
{
QTreeWidgetItem *lastItem = item->childCount() > 0 && item->isExpanded() ? item->child( item->childCount() - 1 ) : item;
Expand Down
19 changes: 14 additions & 5 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionAddFeature->setIcon( QgsApplication::getThemeIcon( "/mActionCapturePoint.png" ) );
mActionMoveFeature->setIcon( QgsApplication::getThemeIcon( "/mActionMoveFeature.png" ) );
mActionReshapeFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionReshape.png" ) );
mActionSplitFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionSplitFeatures.png" ) );
mActionSplitFeatures->setIcon( QgsApplication::getThemeIcon( "/mActionSplitFeatures.svg" ) );
mActionDeleteSelected->setIcon( QgsApplication::getThemeIcon( "/mActionDeleteSelected.png" ) );
mActionNodeTool->setIcon( QgsApplication::getThemeIcon( "/mActionNodeTool.png" ) );
mActionSimplifyFeature->setIcon( QgsApplication::getThemeIcon( "/mActionSimplify.png" ) );
Expand All @@ -1597,6 +1597,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionTouch->setIcon( QgsApplication::getThemeIcon( "/mActionTouch.png" ) );
#endif
mActionPan->setIcon( QgsApplication::getThemeIcon( "/mActionPan.png" ) );
mActionPanToSelected->setIcon( QgsApplication::getThemeIcon( "/mActionPanToSelected.svg" ) );
mActionZoomLast->setIcon( QgsApplication::getThemeIcon( "/mActionZoomLast.png" ) );
mActionZoomNext->setIcon( QgsApplication::getThemeIcon( "/mActionZoomNext.png" ) );
mActionZoomToLayer->setIcon( QgsApplication::getThemeIcon( "/mActionZoomToLayer.png" ) );
Expand All @@ -1605,7 +1606,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionFeatureAction->setIcon( QgsApplication::getThemeIcon( "/mAction.png" ) );
mActionSelect->setIcon( QgsApplication::getThemeIcon( "/mActionSelect.png" ) );
mActionSelectRectangle->setIcon( QgsApplication::getThemeIcon( "/mActionSelectRectangle.png" ) );
mActionSelectPolygon->setIcon( QgsApplication::getThemeIcon( "/mActionSelectPolygon.png" ) );
mActionSelectPolygon->setIcon( QgsApplication::getThemeIcon( "/mActionSelectPolygon.svg" ) );
mActionSelectFreehand->setIcon( QgsApplication::getThemeIcon( "/mActionSelectFreehand.png" ) );
mActionSelectRadius->setIcon( QgsApplication::getThemeIcon( "/mActionSelectRadius.png" ) );
mActionDeselectAll->setIcon( QgsApplication::getThemeIcon( "/mActionDeselectAll.png" ) );
Expand All @@ -1628,7 +1629,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionShowFrozenLabels->setIcon( QgsApplication::getThemeIcon( "/mActionShowFrozenLabels.png" ) );
mActionFreezeLabels->setIcon( QgsApplication::getThemeIcon( "/mActionFreezeLabels.png" ) );
mActionMoveLabel->setIcon( QgsApplication::getThemeIcon( "/mActionMoveLabel.png" ) );
mActionRotateLabel->setIcon( QgsApplication::getThemeIcon( "/mActionRotateLabel.png" ) );
mActionRotateLabel->setIcon( QgsApplication::getThemeIcon( "/mActionRotateLabel.svg" ) );
mActionChangeLabelProperties->setIcon( QgsApplication::getThemeIcon( "/mActionChangeLabelProperties.png" ) );
mActionDecorationCopyright->setIcon( QgsApplication::getThemeIcon( "/plugins/copyright_label.png" ) );
mActionDecorationNorthArrow->setIcon( QgsApplication::getThemeIcon( "/plugins/north_arrow.png" ) );
Expand Down Expand Up @@ -5024,14 +5025,22 @@ void QgisApp::showMouseCoordinate( const QgsPoint & p )
}
else
{
if ( mMapCanvas->mapUnits() == QGis::DegreesMinutesSeconds )
if ( mMapCanvas->mapUnits() == QGis::Degrees )
{
mCoordsEdit->setText( p.toDegreesMinutesSeconds( mMousePrecisionDecimalPlaces ) );
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "D" );

if ( format == "DM" )
mCoordsEdit->setText( p.toDegreesMinutes( mMousePrecisionDecimalPlaces ) );
else if ( format == "DMS" )
mCoordsEdit->setText( p.toDegreesMinutesSeconds( mMousePrecisionDecimalPlaces ) );
else
mCoordsEdit->setText( p.toString( mMousePrecisionDecimalPlaces ) );
}
else
{
mCoordsEdit->setText( p.toString( mMousePrecisionDecimalPlaces ) );
}

if ( mCoordsEdit->width() > mCoordsEdit->minimumWidth() )
{
mCoordsEdit->setMinimumWidth( mCoordsEdit->width() );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
mToggleEditingButton->setEnabled( canChangeAttributes && !mLayer->isReadOnly() );

mSaveEditsButton->setEnabled( canChangeAttributes && mLayer->isEditable() );
mOpenFieldCalculator->setEnabled( canChangeAttributes && mLayer->isEditable() );
mOpenFieldCalculator->setEnabled(( canChangeAttributes || canAddAttributes ) && mLayer->isEditable() );
mDeleteSelectedButton->setEnabled( canDeleteFeatures && mLayer->isEditable() );
mAddAttribute->setEnabled( canAddAttributes && mLayer->isEditable() );
mRemoveAttribute->setEnabled( canDeleteAttributes && mLayer->isEditable() );
Expand Down Expand Up @@ -674,7 +674,7 @@ void QgsAttributeTableDialog::editingToggled()
bool canAddAttributes = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::AddAttributes;
bool canDeleteAttributes = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::DeleteAttributes;
bool canAddFeatures = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::AddFeatures;
mOpenFieldCalculator->setEnabled( canChangeAttributes && mLayer->isEditable() );
mOpenFieldCalculator->setEnabled(( canChangeAttributes || canAddAttributes ) && mLayer->isEditable() );
mDeleteSelectedButton->setEnabled( canDeleteFeatures && mLayer->isEditable() );
mAddAttribute->setEnabled( canAddAttributes && mLayer->isEditable() );
mRemoveAttribute->setEnabled( canDeleteAttributes && mLayer->isEditable() );
Expand Down
56 changes: 37 additions & 19 deletions src/app/qgsfieldcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,42 @@ QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl )
mOutputFieldWidthSpinBox->setValue( 10 );
mOutputFieldPrecisionSpinBox->setValue( 3 );

// disable creation of new fields if not supported by data provider
if ( !( vl->dataProvider()->capabilities() & QgsVectorDataProvider::AddAttributes ) )
mUpdateExistingGroupBox->setEnabled( vl->dataProvider()->capabilities() & QgsVectorDataProvider::ChangeAttributeValues );
mNewFieldGroupBox->setEnabled( vl->dataProvider()->capabilities() & QgsVectorDataProvider::AddAttributes );

Q_ASSERT( mNewFieldGroupBox->isEnabled() || mUpdateExistingGroupBox->isEnabled() );

if ( mNewFieldGroupBox->isEnabled() )
{
mNewFieldGroupBox->setChecked( true );
}
else
{
mNewFieldGroupBox->setToolTip( tr( "Not available for layer" ) );
mUpdateExistingGroupBox->setChecked( true );
mUpdateExistingGroupBox->setCheckable( false );
mNewFieldGroupBox->setChecked( false );
mNewFieldGroupBox->setTitle( mNewFieldGroupBox->title() + tr( " (not supported by provider)" ) );
}

if ( vl->selectedFeaturesIds().size() > 0 )
if ( mUpdateExistingGroupBox->isEnabled() )
{
mOnlyUpdateSelectedCheckBox->setChecked( true );
mUpdateExistingGroupBox->setChecked( !mNewFieldGroupBox->isEnabled() );
}
else
{
mUpdateExistingGroupBox->setToolTip( tr( "Not available for layer" ) );
mNewFieldGroupBox->setChecked( true );
mNewFieldGroupBox->setCheckable( false );
}

mOnlyUpdateSelectedCheckBox->setChecked( vl->selectedFeaturesIds().size() > 0 );
}

QgsFieldCalculator::~QgsFieldCalculator()
{

}

void QgsFieldCalculator::accept()
{

QString calcString = builder->expressionText();
QgsExpression exp( calcString );

Expand All @@ -79,7 +93,7 @@ void QgsFieldCalculator::accept()
mVectorLayer->beginEditCommand( "Field calculator" );

//update existing field
if ( mUpdateExistingGroupBox->isChecked() )
if ( mUpdateExistingGroupBox->isChecked() || !mNewFieldGroupBox->isEnabled() )
{
QMap<QString, int>::const_iterator fieldIt = mFieldMap.find( mExistingFieldComboBox->currentText() );
if ( fieldIt != mFieldMap.end() )
Expand Down Expand Up @@ -128,7 +142,7 @@ void QgsFieldCalculator::accept()
bool calculationSuccess = true;
QString error;

bool onlySelected = ( mOnlyUpdateSelectedCheckBox->isChecked() );
bool onlySelected = mOnlyUpdateSelectedCheckBox->isChecked();
QgsFeatureIds selectedIds = mVectorLayer->selectedFeaturesIds();

// block layerModified signals (that would trigger table update)
Expand Down Expand Up @@ -269,18 +283,22 @@ void QgsFieldCalculator::populateFields()
void QgsFieldCalculator::setOkButtonState()
{
QPushButton* okButton = mButtonBox->button( QDialogButtonBox::Ok );
okButton->setToolTip( "" );

bool emptyFieldName = mOutputFieldNameLineEdit->text().isEmpty();
bool expressionValid = builder->isExpressionValid();

if ( emptyFieldName )
if (( mNewFieldGroupBox->isChecked() || !mUpdateExistingGroupBox->isEnabled() )
&& mOutputFieldNameLineEdit->text().isEmpty() )
{
okButton->setToolTip( tr( "Please enter a field name" ) );
okButton->setEnabled( false );
return;
}

if ( !expressionValid )
if ( !builder->isExpressionValid() )
{
okButton->setToolTip( okButton->toolTip() + tr( "\n The expression is invalid see (more info) for details" ) );
okButton->setEnabled( false );
return;
}

bool okEnabled = ( !emptyFieldName || mUpdateExistingGroupBox->isChecked() ) && expressionValid;

okButton->setEnabled( okEnabled );
okButton->setToolTip( "" );
okButton->setEnabled( true );
}
12 changes: 12 additions & 0 deletions src/app/qgsidentifyresults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#include <QMenuBar>
#include <QPushButton>
#include <QWebView>
#include <QDesktopServices>
#include <QMessageBox>

#include "qgslogger.h"

Expand Down Expand Up @@ -277,6 +279,8 @@ void QgsIdentifyResults::addFeature( QgsRasterLayer *layer,

QWebView *wv = new QWebView( attrItem->treeWidget() );
wv->setHtml( attributes.begin().value() );
wv->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
connect( wv, SIGNAL( linkClicked( const QUrl & ) ), this, SLOT( openUrl( const QUrl & ) ) );
attrItem->treeWidget()->setItemWidget( attrItem, 1, wv );
}
else
Expand Down Expand Up @@ -980,3 +984,11 @@ void QgsIdentifyResults::copyFeatureAttributes()
QgsDebugMsg( QString( "set clipboard: %1" ).arg( text ) );
clipboard->setText( text );
}

void QgsIdentifyResults::openUrl( const QUrl &url )
{
if ( !QDesktopServices::openUrl( url ) )
{
QMessageBox::warning( this, tr( "Could not open url" ), tr( "Could not open URL '%1'" ).arg( url.toString() ) );
}
}
2 changes: 2 additions & 0 deletions src/app/qgsidentifyresults.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }

void openUrl( const QUrl &url );

private:
QMenu *mActionPopup;
QMap<QTreeWidgetItem *, QgsHighlight * > mHighlights;
Expand Down
19 changes: 13 additions & 6 deletions src/app/qgsmaptoolfreezelabels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ void QgsMapToolFreezeLabels::freezeThawLabels( const QgsRectangle& ext, QMouseEv
{

bool doThaw = e->modifiers() & Qt::ShiftModifier ? true : false;
bool toggleThawOrFreeze = e->modifiers() & Qt::AltModifier ? true : false;
bool doHide = e->modifiers() & Qt::ControlModifier ? true : false;
bool toggleThawOrFreeze = e->modifiers() & Qt::ControlModifier ? true : false;
bool doHide = ( doThaw && toggleThawOrFreeze );

// get list of all drawn labels from all layers within, or touching, chosen extent
bool labelChanged = false;
Expand Down Expand Up @@ -432,16 +432,23 @@ bool QgsMapToolFreezeLabels::freezeThawLabel( QgsVectorLayer* vlayer,
if ( freeze )
{

QgsPoint labelpoint = labelpos.cornerPoints.at( 0 );
// QgsPoint labelpoint = labelpos.cornerPoints.at( 0 );

double labelX = labelpoint.x();
double labelY = labelpoint.y();
QgsPoint referencePoint;
if ( !rotationPoint( referencePoint, true ) )
{
referencePoint.setX( mCurrentLabelPos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabelPos.labelRect.yMinimum() );
}

double labelX = referencePoint.x();
double labelY = referencePoint.y();
double labelR = labelpos.rotation * 180 / M_PI;

// transform back to layer crs, if on-fly on
if ( mRender->hasCrsTransformEnabled() )
{
QgsPoint transformedPoint = mRender->mapToLayerCoordinates( vlayer, labelpoint );
QgsPoint transformedPoint = mRender->mapToLayerCoordinates( vlayer, referencePoint );
labelX = transformedPoint.x();
labelY = transformedPoint.y();
}
Expand Down
77 changes: 71 additions & 6 deletions src/app/qgsmaptoollabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,14 @@ QFont QgsMapToolLabel::labelFontCurrentFeature()
QMap< QgsPalLayerSettings::DataDefinedProperties, int >::const_iterator sizeIt = ddProperties.find( QgsPalLayerSettings::Size );
if ( sizeIt != ddProperties.constEnd() )
{
font.setPointSizeF( attributes[*sizeIt].toDouble() );
if ( layerSettings.fontSizeInMapUnits )
{
font.setPixelSize( layerSettings.sizeToPixel( attributes[*sizeIt].toDouble(), QgsRenderContext() ) );
}
else
{
font.setPointSizeF( attributes[*sizeIt].toDouble() );
}
}

//family
Expand Down Expand Up @@ -273,15 +280,15 @@ QFont QgsMapToolLabel::labelFontCurrentFeature()
return font;
}

bool QgsMapToolLabel::rotationPoint( QgsPoint& pos )
bool QgsMapToolLabel::rotationPoint( QgsPoint& pos, bool ignoreUpsideDown )
{
QVector<QgsPoint> cornerPoints = mCurrentLabelPos.cornerPoints;
if ( cornerPoints.size() < 4 )
{
return false;
}

if ( mCurrentLabelPos.upsideDown )
if ( mCurrentLabelPos.upsideDown && !ignoreUpsideDown )
{
pos = mCurrentLabelPos.cornerPoints.at( 2 );
}
Expand Down Expand Up @@ -336,7 +343,7 @@ bool QgsMapToolLabel::rotationPoint( QgsPoint& pos )
}
else
{
double descentRatio = labelFontMetrics.descent() / labelFontMetrics.height();
double descentRatio = 1 / labelFontMetrics.ascent() / labelFontMetrics.height();
if ( valiString.compare( "Base", Qt::CaseInsensitive ) == 0 )
{
ydiff = labelSizeY * descentRatio;
Expand All @@ -351,7 +358,7 @@ bool QgsMapToolLabel::rotationPoint( QgsPoint& pos )
double angle = mCurrentLabelPos.rotation;
double xd = xdiff * cos( angle ) - ydiff * sin( angle );
double yd = xdiff * sin( angle ) + ydiff * cos( angle );
if ( mCurrentLabelPos.upsideDown )
if ( mCurrentLabelPos.upsideDown && !ignoreUpsideDown )
{
pos.setX( pos.x() - xd );
pos.setY( pos.y() - yd );
Expand Down Expand Up @@ -399,7 +406,65 @@ bool QgsMapToolLabel::dataDefinedPosition( QgsVectorLayer* vlayer, int featureId
return true;
}

bool QgsMapToolLabel:: diagramMoveable( const QgsMapLayer* ml, int& xCol, int& yCol ) const
bool QgsMapToolLabel::layerIsRotatable( const QgsMapLayer* layer, int& rotationCol ) const
{
const QgsVectorLayer* vlayer = dynamic_cast<const QgsVectorLayer*>( layer );
if ( !vlayer || !vlayer->isEditable() )
{
return false;
}

QVariant rotation = layer->customProperty( "labeling/dataDefinedProperty14" );
if ( !rotation.isValid() )
{
return false;
}

bool rotationOk;
rotationCol = rotation.toInt( &rotationOk );
if ( !rotationOk )
{
return false;
}
return true;
}

bool QgsMapToolLabel::dataDefinedRotation( QgsVectorLayer* vlayer, int featureId, double& rotation, bool& rotationSuccess )
{
rotationSuccess = false;
if ( !vlayer )
{
return false;
}

int rotationCol;
if ( !layerIsRotatable( vlayer, rotationCol ) )
{
return false;
}

QgsFeature f;
if ( !vlayer->featureAtId( featureId, f, false, true ) )
{
return false;
}

QgsAttributeMap attributes = f.attributeMap();

//test, if data defined x- and y- values are not null. Otherwise, the position is determined by PAL and the rotation cannot be fixed
int xCol, yCol;
double x, y;
bool xSuccess, ySuccess;
if ( !dataDefinedPosition( vlayer, featureId, x, xSuccess, y, ySuccess, xCol, yCol ) || !xSuccess || !ySuccess )
{
return false;
}

rotation = attributes[rotationCol].toDouble( &rotationSuccess );
return true;
}

bool QgsMapToolLabel::diagramMoveable( const QgsMapLayer* ml, int& xCol, int& yCol ) const
{
const QgsVectorLayer* vlayer = dynamic_cast<const QgsVectorLayer*>( ml );
if ( vlayer && vlayer->diagramRenderer() )
Expand Down
18 changes: 16 additions & 2 deletions src/app/qgsmaptoollabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class QgsMapToolLabel: public QgsMapTool
@param yCol out: index of the attribute for data defined y coordinate
@return true if layer fields set up and exist*/
bool layerCanFreeze( const QgsMapLayer* ml, int& xCol, int& yCol ) const;
/**Checks if labels in a layer can be rotated
@param rotationCol out: attribute column for data defined label rotation*/
bool layerIsRotatable( const QgsMapLayer* layer, int& rotationCol ) const;

protected:
QgsRubberBand* mLabelRubberBand;
Expand All @@ -63,8 +66,9 @@ class QgsMapToolLabel: public QgsMapTool
bool labelAtPosition( QMouseEvent* e, QgsLabelPosition& p );

/**Finds out rotation point of current label position
@param ignoreUpsideDown treat label as right-side-up
@return true in case of success*/
bool rotationPoint( QgsPoint& pos );
bool rotationPoint( QgsPoint& pos, bool ignoreUpsideDown = false );

/**Creates label / feature / fixpoint rubber bands for the current label position*/
void createRubberBands();
Expand All @@ -90,7 +94,8 @@ class QgsMapToolLabel: public QgsMapTool
QFont labelFontCurrentFeature();

/**Get data defined position of a feature
@param layerId layer identification string
@param vlayer vector layer
@param featureId feature identification integer
@param x out: data defined x-coordinate
@param xSuccess out: false if attribute value is NULL
@param y out: data defined y-coordinate
Expand All @@ -100,6 +105,15 @@ class QgsMapToolLabel: public QgsMapTool
@return false if layer does not have data defined label position enabled*/
bool dataDefinedPosition( QgsVectorLayer* vlayer, int featureId, double& x, bool& xSuccess, double& y, bool& ySuccess, int& xCol, int& yCol ) const;

/**Returns data defined rotation of a feature.
@param vlayer vector layer
@param featureId feature identification integer
@param rotation out: rotation value
@param rotationSuccess out: false if rotation value is NULL
@return true if data defined rotation is enabled on the layer
*/
bool dataDefinedRotation( QgsVectorLayer* vlayer, int featureId, double& rotation, bool& rotationSuccess );

private:
QgsPalLayerSettings mInvalidLabelSettings;
};
Expand Down
22 changes: 21 additions & 1 deletion src/app/qgsmaptoolmovelabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void QgsMapToolMoveLabel::canvasPressEvent( QMouseEvent * e )
{
mStartPointMapCoords = toMapCoordinates( e->pos() );
QgsPoint referencePoint;
if ( !rotationPoint( referencePoint ) )
if ( !rotationPoint( referencePoint, true ) )
{
referencePoint.setX( mCurrentLabelPos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabelPos.labelRect.yMinimum() );
Expand Down Expand Up @@ -152,6 +152,26 @@ void QgsMapToolMoveLabel::canvasReleaseEvent( QMouseEvent * e )
vlayer->beginEditCommand( tr( "Label moved" ) );
vlayer->changeAttributeValue( mCurrentLabelPos.featureId, xCol, xPosNew, false );
vlayer->changeAttributeValue( mCurrentLabelPos.featureId, yCol, yPosNew, false );

// set rotation to that of label, if data-defined and no rotation set yet
// handle case of initially set rotation column fields of 0 instead of NULL
// must come after setting x and y positions
int rCol;
if ( !mCurrentLabelPos.isDiagram && !mCurrentLabelPos.isFrozen
&& layerIsRotatable( vlayer, rCol ) )
{
double labelRot = 0;
double defRot;
bool rSuccess;
if ( dataDefinedRotation( vlayer, mCurrentLabelPos.featureId, defRot, rSuccess ) )
{
labelRot = mCurrentLabelPos.rotation * 180 / M_PI;
if ( !rSuccess || ( rSuccess && defRot != labelRot ) )
{
vlayer->changeAttributeValue( mCurrentLabelPos.featureId, rCol, labelRot, false );
}
}
}
vlayer->endEditCommand();

mCanvas->refresh();
Expand Down
58 changes: 0 additions & 58 deletions src/app/qgsmaptoolrotatelabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,64 +166,6 @@ void QgsMapToolRotateLabel::canvasReleaseEvent( QMouseEvent *e )
mCanvas->refresh();
}

bool QgsMapToolRotateLabel::layerIsRotatable( const QgsMapLayer* layer, int& rotationCol ) const
{
const QgsVectorLayer* vlayer = dynamic_cast<const QgsVectorLayer*>( layer );
if ( !vlayer || !vlayer->isEditable() )
{
return false;
}

QVariant rotation = layer->customProperty( "labeling/dataDefinedProperty14" );
if ( !rotation.isValid() )
{
return false;
}

bool rotationOk;
rotationCol = rotation.toInt( &rotationOk );
if ( !rotationOk )
{
return false;
}
return true;
}

bool QgsMapToolRotateLabel::dataDefinedRotation( QgsVectorLayer* vlayer, int featureId, double& rotation, bool& rotationSuccess )
{
rotationSuccess = false;
if ( !vlayer )
{
return false;
}

int rotationCol;
if ( !layerIsRotatable( vlayer, rotationCol ) )
{
return false;
}

QgsFeature f;
if ( !vlayer->featureAtId( featureId, f, false, true ) )
{
return false;
}

QgsAttributeMap attributes = f.attributeMap();

//test, if data defined x- and y- values are not null. Otherwise, the position is determined by PAL and the rotation cannot be fixed
int xCol, yCol;
double x, y;
bool xSuccess, ySuccess;
if ( !dataDefinedPosition( vlayer, featureId, x, xSuccess, y, ySuccess, xCol, yCol ) || !xSuccess || !ySuccess )
{
return false;
}

rotation = attributes[rotationCol].toDouble( &rotationSuccess );
return true;
}

int QgsMapToolRotateLabel::roundTo15Degrees( double n )
{
int m = ( int )( n / 15.0 + 0.5 );
Expand Down
10 changes: 0 additions & 10 deletions src/app/qgsmaptoolrotatelabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,7 @@ class QgsMapToolRotateLabel: public QgsMapToolLabel
virtual void canvasMoveEvent( QMouseEvent * e );
virtual void canvasReleaseEvent( QMouseEvent * e );

/**Checks if labels in a layer can be rotated
@param rotationCol out: attribute column for data defined label rotation*/
bool layerIsRotatable( const QgsMapLayer* layer, int& rotationCol ) const;

protected:
/**Returns data defined rotation of a feature.
@param rotation out: rotation value
@param rotationSuccess out: false if rotation value is NULL
@return true if data defined rotation is enabled on the layer
*/
bool dataDefinedRotation( QgsVectorLayer* vlayer, int featureId, double& rotation, bool& rotationSuccess );

static int roundTo15Degrees( double n );
/**Converts azimuth value to counterclockwise 0 - 360*/
Expand Down
2 changes: 0 additions & 2 deletions src/app/qgsmeasuredialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ void QgsMeasureDialog::updateUi()
case QGis::Feet:
mTable->setHeaderLabels( QStringList( tr( "Segments (in feet)" ) ) );
break;
case QGis::DegreesMinutesSeconds:
case QGis::DegreesDecimalMinutes:
case QGis::Degrees:
mTable->setHeaderLabels( QStringList( tr( "Segments (in degrees)" ) ) );
break;
Expand Down
67 changes: 25 additions & 42 deletions src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
//see if the user wants on the fly projection enabled
bool myProjectionEnabled = myRenderer->hasCrsTransformEnabled();
cbxProjectionEnabled->setChecked( myProjectionEnabled );
btnGrpMapUnits->setEnabled( !myProjectionEnabled );

mProjectSrsId = myRenderer->destinationCrs().srsid();
QgsDebugMsg( "Read project CRSID: " + QString::number( mProjectSrsId ) );
Expand Down Expand Up @@ -100,6 +99,14 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
int dp = QgsProject::instance()->readNumEntry( "PositionPrecision", "/DecimalPlaces" );
spinBoxDP->setValue( dp );

QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "D" );
if ( format == "DM" )
radDM->setChecked( true );
else if ( format == "DMS" )
radDMS->setChecked( true );
else
radD->setChecked( true );

//get the color selections and set the button color accordingly
int myRedInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorRedPart", 255 );
int myGreenInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorGreenPart", 255 );
Expand Down Expand Up @@ -207,6 +214,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
mWMSContactPhone->setText( QgsProject::instance()->readEntry( "WMSContactPhone", "/", "" ) );
mWMSAbstract->setPlainText( QgsProject::instance()->readEntry( "WMSServiceAbstract", "/", "" ) );
mWMSOnlineResourceLineEdit->setText( QgsProject::instance()->readEntry( "WMSOnlineResource", "/", "" ) );
mWMSUrlLineEdit->setText( QgsProject::instance()->readEntry( "WMSUrl", "/", "" ) );

bool ok;
QStringList values;
Expand Down Expand Up @@ -327,22 +335,11 @@ void QgsProjectProperties::setMapUnits( QGis::UnitType unit )
{
unit = QGis::Meters;
}
if ( unit == QGis::Meters )
{
radMeters->setChecked( true );
}
else if ( unit == QGis::Feet )
{
radFeet->setChecked( true );
}
else if ( unit == QGis::DegreesMinutesSeconds )
{
radDMS->setChecked( true );
}
else
{
radDecimalDegrees->setChecked( true );
}

radMeters->setChecked( unit == QGis::Meters );
radFeet->setChecked( unit == QGis::Feet );
radDegrees->setChecked( unit == QGis::Degrees );

mMapCanvas->mapRenderer()->setMapUnits( unit );
}

Expand All @@ -368,21 +365,17 @@ void QgsProjectProperties::apply()
// Note. Qt 3.2.3 and greater have a function selectedId() that
// can be used instead of the two part technique here
QGis::UnitType mapUnit;
if ( radMeters->isChecked() )
if ( radDegrees->isChecked() )
{
mapUnit = QGis::Meters;
mapUnit = QGis::Degrees;
}
else if ( radFeet->isChecked() )
{
mapUnit = QGis::Feet;
}
else if ( radDMS->isChecked() )
{
mapUnit = QGis::DegreesMinutesSeconds;
}
else
{
mapUnit = QGis::Degrees;
mapUnit = QGis::Meters;
}

QgsMapRenderer* myRenderer = mMapCanvas->mapRenderer();
Expand Down Expand Up @@ -422,6 +415,9 @@ void QgsProjectProperties::apply()
// can be used instead of the two part technique here
QgsProject::instance()->writeEntry( "PositionPrecision", "/Automatic", radAutomatic->isChecked() );
QgsProject::instance()->writeEntry( "PositionPrecision", "/DecimalPlaces", spinBoxDP->value() );
QgsProject::instance()->writeEntry( "PositionPrecision", "/DegreeFormat",
QString( radDM->isChecked() ? "DM" : radDMS->isChecked() ? "DMS" : "D" ) );

// Announce that we may have a new display precision setting
emit displayPrecisionChanged();

Expand Down Expand Up @@ -489,6 +485,7 @@ void QgsProjectProperties::apply()
QgsProject::instance()->writeEntry( "WMSContactPhone", "/", mWMSContactPhone->text() );
QgsProject::instance()->writeEntry( "WMSServiceAbstract", "/", mWMSAbstract->toPlainText() );
QgsProject::instance()->writeEntry( "WMSOnlineResource", "/", mWMSOnlineResourceLineEdit->text() );
QgsProject::instance()->writeEntry( "WMSUrl", "/", mWMSUrlLineEdit->text() );

if ( grpWMSExt->isChecked() )
{
Expand Down Expand Up @@ -607,7 +604,6 @@ void QgsProjectProperties::on_pbnCanvasColor_clicked()

void QgsProjectProperties::on_cbxProjectionEnabled_stateChanged( int state )
{
btnGrpMapUnits->setEnabled( state == Qt::Unchecked );
projectionSelector->setEnabled( state == Qt::Checked );

if ( state != Qt::Checked )
Expand All @@ -630,23 +626,10 @@ void QgsProjectProperties::setMapUnitsToCurrentProjection()
QgsCoordinateReferenceSystem srs( myCRSID, QgsCoordinateReferenceSystem::InternalCrsId );
//set radio button to crs map unit type
QGis::UnitType units = srs.mapUnits();
switch ( units )
{
case QGis::Meters:
radMeters->setChecked( true );
break;
case QGis::Feet:
radFeet->setChecked( true );
break;
case QGis::Degrees:
radDecimalDegrees->setChecked( true );
break;
case QGis::DegreesMinutesSeconds:
radDMS->setChecked( true );
break;
default:
break;
}

radMeters->setChecked( units == QGis::Meters );
radFeet->setChecked( units == QGis::Feet );
radDegrees->setChecked( units == QGis::Degrees );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void QgsVectorLayerProperties::updateButtons()
int cap = layer->dataProvider()->capabilities();
mAddAttributeButton->setEnabled( cap & QgsVectorDataProvider::AddAttributes );
mDeleteAttributeButton->setEnabled( cap & QgsVectorDataProvider::DeleteAttributes );
mCalculateFieldButton->setEnabled( cap & QgsVectorDataProvider::ChangeAttributeValues );
mCalculateFieldButton->setEnabled( cap & ( QgsVectorDataProvider::ChangeAttributeValues | QgsVectorDataProvider::AddAttributes ) );
mToggleEditingButton->setChecked( true );
}
else
Expand Down
9 changes: 9 additions & 0 deletions src/core/gps/qgsgpsdetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
#include <QList>
#include <QPair>

#ifdef _MSC_VER
// qextserialport.h includes windows.h,
// which defines min()/max() macros w/o NOMINMAX,
// which in turn breaks limits std::numeric_limits<T>::min()/max()
#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif

#include "qextserialport.h"

class QgsGPSConnection;
Expand Down
11 changes: 7 additions & 4 deletions src/core/qgis.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,19 @@ class CORE_EXPORT QGis

/** Map units that qgis supports
* @note that QGIS < 1.4 api had only Meters, Feet, Degrees and UnknownUnit
* @note and QGIS >1.8 returns to that
*/
enum UnitType
{
Meters = 0,
Feet = 1,
Degrees = 2, //for 1.0 api backwards compatibility
DecimalDegrees = 2,
DegreesMinutesSeconds = 4,
DegreesDecimalMinutes = 5,
UnknownUnit = 3
UnknownUnit = 3,

// for [1.4;1.8] api compatibility
DecimalDegrees = 2, // was 2
DegreesMinutesSeconds = 2, // was 4
DegreesDecimalMinutes = 2, // was 5
};

//! User defined event types
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsclipper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ unsigned char* QgsClipper::clippedLineWKB( unsigned char* wkb, const QgsRectangl

bool hasZValue = ( wkbType == QGis::WKBLineString25D );

double p0x, p0y, p1x, p1y; //original coordinates
double p0x, p0y, p1x = 0.0, p1y = 0.0; //original coordinates
double p1x_c, p1y_c; //clipped end coordinates
double lastClipX, lastClipY; //last successfully clipped coords
double lastClipX = 0.0, lastClipY = 0.0; //last successfully clipped coords

line.reserve( nPoints + 1 );
line.clear();
Expand Down
33 changes: 19 additions & 14 deletions src/core/qgsgeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5566,7 +5566,7 @@ GEOSGeometry* QgsGeometry::reshapeLine( const GEOSGeometry* line, const GEOSGeom
return 0;
}

bool atLeastTwoIntersections;
bool atLeastTwoIntersections = false;

try
{
Expand Down Expand Up @@ -6411,20 +6411,25 @@ QgsGeometry* QgsGeometry::convexHull()

QgsGeometry* QgsGeometry::interpolate( double distance )
{
if ( !mGeos )
{
exportWkbToGeos();
}
if ( !mGeos )
{
return 0;
}
#if defined(GEOS_VERSION_MAJOR) && defined(GEOS_VERSION_MINOR) && \
((GEOS_VERSION_MAJOR>3) || ((GEOS_VERSION_MAJOR==3) && (GEOS_VERSION_MINOR>=2)))
if ( !mGeos )
{
exportWkbToGeos();
}
if ( !mGeos )
{
return 0;
}

try
{
return fromGeosGeom( GEOSInterpolate( mGeos, distance ) );
}
CATCH_GEOS( 0 )
try
{
return fromGeosGeom( GEOSInterpolate( mGeos, distance ) );
}
CATCH_GEOS( 0 )
#else
QgsMessageLog::logMessage( QObject::tr( "GEOS prior to 3.2 doesn't support GEOSInterpolate" ), QObject::tr( "GEOS" ) );
#endif
}

QgsGeometry* QgsGeometry::intersection( QgsGeometry* geometry )
Expand Down
21 changes: 13 additions & 8 deletions src/core/qgsgeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class CORE_EXPORT QgsGeometry
unsigned char * asWkb();

/**
Returns the size of the WKB in asWkb().
*/
* Returns the size of the WKB in asWkb().
*/
size_t wkbSize();

/**Returns a geos geomtry. QgsGeometry keeps ownership, don't delete the returned object!
Expand Down Expand Up @@ -220,10 +220,9 @@ class CORE_EXPORT QgsGeometry
QgsPoint vertexAt( int atVertex );

/**
Returns the squared cartesian distance between the given point
to the given vertex index (vertex at the given position number,
ring and item (first number is index 0))
* Returns the squared cartesian distance between the given point
* to the given vertex index (vertex at the given position number,
* ring and item (first number is index 0))
*/
double sqrDistToVertexAt( QgsPoint& point, int atVertex );

Expand Down Expand Up @@ -343,6 +342,9 @@ class CORE_EXPORT QgsGeometry
/** Returns the smallest convex polygon that contains all the points in the geometry. */
QgsGeometry* convexHull();

/* Return interpolated point on line at distance
* @note added in 1.9
*/
QgsGeometry* interpolate( double distance );

/** Returns a geometry representing the points shared by this geometry and other. */
Expand All @@ -360,12 +362,14 @@ class CORE_EXPORT QgsGeometry
QgsGeometry* symDifference( QgsGeometry* geometry );

/** Exports the geometry to mWkt
@return true in case of success and false else
* @return true in case of success and false else
*/
QString exportToWkt();

/** Exports the geometry to mGeoJSON
@return true in case of success and false else
* @return true in case of success and false else
* @note added in 1.8
* @note python binding added in 1.9
*/
QString exportToGeoJSON();

Expand Down Expand Up @@ -441,6 +445,7 @@ class CORE_EXPORT QgsGeometry

/** Validate geometry and produce a list of geometry errors
* @note added in 1.5
* @note python binding added in 1.6
**/
void validateGeometry( QList<Error> &errors );

Expand Down
14 changes: 12 additions & 2 deletions src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
if ( size.isValid() )
{
double sizeDouble = size.toDouble();
if ( sizeDouble <= 0 )
if ( sizeDouble <= 0 || sizeToPixel( sizeDouble, context ) < 1 )
{
return;
}
Expand Down Expand Up @@ -859,8 +859,18 @@ int QgsPalLabeling::prepareLayer( QgsVectorLayer* layer, QSet<int>& attrIndices,
// set whether adjacent lines should be merged
l->setMergeConnectedLines( lyr.mergeLines );

lyr.textFont.setPixelSize( lyr.sizeToPixel( lyr.textFont.pointSizeF(), ctx ) );
// fix for font size in map units causing font to show pointsize at small map scales
int pixelFontSize = lyr.sizeToPixel( lyr.textFont.pointSizeF(), ctx );

if ( pixelFontSize < 1 )
{
lyr.textFont.setPixelSize( 1 );
lyr.textFont.setPointSize( 1 );
}
else
{
lyr.textFont.setPixelSize( pixelFontSize );
}
//raster and vector scale factors
lyr.vectorScaleFactor = ctx.scaleFactor();
lyr.rasterCompressFactor = ctx.rasterScaleFactor();
Expand Down
19 changes: 19 additions & 0 deletions src/core/qgspoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,25 @@ QString QgsPoint::toDegreesMinutesSeconds( int thePrecision ) const
return rep;
}

QString QgsPoint::toDegreesMinutes( int thePrecision ) const
{
int myDegreesX = int( qAbs( m_x ) );
float myFloatMinutesX = float(( qAbs( m_x ) - myDegreesX ) * 60 );

int myDegreesY = int( qAbs( m_y ) );
float myFloatMinutesY = float(( qAbs( m_y ) - myDegreesY ) * 60 );

QString myXHemisphere = m_x < 0 ? QObject::tr( "W" ) : QObject::tr( "E" );
QString myYHemisphere = m_y < 0 ? QObject::tr( "S" ) : QObject::tr( "N" );
QString rep = QString::number( myDegreesX ) + QChar( 176 ) +
QString::number( myFloatMinutesX, 'f', thePrecision ) + QString( "'" ) +
myXHemisphere + QString( "," ) +
QString::number( myDegreesY ) + QChar( 176 ) +
QString::number( myFloatMinutesY, 'f', thePrecision ) + QString( "'" ) +
myYHemisphere;
return rep;
}

QString QgsPoint::wellKnownText() const
{
return QString( "POINT(%1 %2)" ).arg( QString::number( m_x, 'f', 18 ) ).arg( QString::number( m_y, 'f', 18 ) );
Expand Down
7 changes: 7 additions & 0 deletions src/core/qgspoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ class CORE_EXPORT QgsPoint
*/
QString toDegreesMinutesSeconds( int thePrecision ) const;

/** Return a string representation as degrees minutes.
* Its up to the calling function to ensure that this point can
* be meaningfully represented in this form.
* @note added in QGIS 1.9
*/
QString toDegreesMinutes( int thePrecision ) const;


/*! Return the well known text representation for the point.
* The wkt is created without an SRID.
Expand Down
19 changes: 4 additions & 15 deletions src/core/qgsscalecalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,13 @@ double QgsScaleCalculator::calculate( const QgsRectangle &mapExtent, int canvasW
conversionFactor = 12.0;
delta = mapExtent.xMaximum() - mapExtent.xMinimum();
break;
case QGis::DecimalDegrees:
// degrees require conversion to meters first
conversionFactor = 39.3700787;
delta = calculateGeographicDistance( mapExtent );
break;
case QGis::DegreesMinutesSeconds:
// degrees require conversion to meters first
conversionFactor = 39.3700787;
delta = calculateGeographicDistance( mapExtent );
break;
case QGis::DegreesDecimalMinutes:

default:
case QGis::Degrees:
// degrees require conversion to meters first
conversionFactor = 39.3700787;
delta = calculateGeographicDistance( mapExtent );
break;
default:
Q_ASSERT( "bad map units" );
break;
}
QgsDebugMsg( "Using conversionFactor of " + QString::number( conversionFactor ) );
if ( canvasWidth == 0 || mDpi == 0 )
Expand All @@ -96,7 +85,7 @@ double QgsScaleCalculator::calculate( const QgsRectangle &mapExtent, int canvasW
}


double QgsScaleCalculator::calculateGeographicDistance( const QgsRectangle &mapExtent )
double QgsScaleCalculator::calculateGeographicDistance( const QgsRectangle &mapExtent )
{
// need to calculate the x distance in meters
// We'll use the middle latitude for the calculation
Expand Down
5 changes: 4 additions & 1 deletion src/core/raster/qgsrasterfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ QgsRasterFileWriter::WriterError QgsRasterFileWriter::writeDataRaster( QgsRaster
}

//Get output map units per pixel
int iterLeft, iterTop, iterCols, iterRows;
int iterLeft = 0;
int iterTop = 0;
int iterCols = 0;
int iterRows = 0;

iter->setMaximumTileWidth( mMaxTileWidth );
iter->setMaximumTileHeight( mMaxTileHeight );
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2697,7 +2697,7 @@ QString QgsRasterLayer::validateBandName( QString const & theBandName )
for ( int myIterator = 1; myIterator < mDataProvider->bandCount(); ++myIterator )
{
//find out the name of this band
if ( mDataProvider->generateBandName( myIterator ) == theBandName );
if ( mDataProvider->generateBandName( myIterator ) == theBandName )
{
QgsDebugMsg( "Matching band name found" );
return theBandName;
Expand Down
2 changes: 2 additions & 0 deletions src/gui/raster/qgsmultibandcolorrendererwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ void QgsMultiBandColorRendererWidget::setCustomMinMaxValues( QgsMultiBandColorRe

void QgsMultiBandColorRendererWidget::onBandChanged( int index )
{
Q_UNUSED( index );

QList<int> myBands;
myBands.append( mRedBandComboBox->itemData( mRedBandComboBox->currentIndex() ).toInt() );
myBands.append( mGreenBandComboBox->itemData( mGreenBandComboBox->currentIndex() ).toInt() );
Expand Down
12 changes: 8 additions & 4 deletions src/gui/raster/qgsrasterhistogramwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,9 @@ void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actio
else if ( actionName.left( 5 ) == "Load " && mRendererWidget )
{
QVector<int> myBands;
#if 0
double minMaxValues[2];
#endif
bool ok = false;

// find which band(s) need updating (all or current)
Expand Down Expand Up @@ -738,17 +740,19 @@ void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actio
{
leHistoMin->clear();
leHistoMax->clear();
#if 0
// TODO - fix gdal provider: changes data type when nodata value is not found
// this prevents us from getting proper min and max values here
// minMaxValues[0] = QgsContrastEnhancement::minimumValuePossible( ( QgsContrastEnhancement::QgsRasterDataType )
// mRasterLayer->dataProvider()->dataType( theBandNo ) );
// minMaxValues[1] = QgsContrastEnhancement::maximumValuePossible( ( QgsContrastEnhancement::QgsRasterDataType )
// mRasterLayer->dataProvider()->dataType( theBandNo ) );
minMaxValues[0] = QgsContrastEnhancement::minimumValuePossible(
( QgsContrastEnhancement::QgsRasterDataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) );
minMaxValues[1] = QgsContrastEnhancement::maximumValuePossible(
( QgsContrastEnhancement::QgsRasterDataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) );
}
else
{
leHistoMin->setText( QString::number( minMaxValues[0] ) );
leHistoMax->setText( QString::number( minMaxValues[1] ) );
#endif
}
applyHistoMin( );
applyHistoMax( );
Expand Down
3 changes: 3 additions & 0 deletions src/mapserver/qgsconfigparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class QgsConfigParser
/**Appends service metadata to the capabilities document*/
virtual void serviceCapabilities( QDomElement& parentElement, QDomDocument& doc ) const;

/**Returns service Adress (or empty string if not defined in the configuration*/
virtual QString serviceUrl() const { return QString(); }

QColor selectionColor() const { return mSelectionColor; }
void setSelectionColor( const QColor& c ) { mSelectionColor = c; }

Expand Down
21 changes: 21 additions & 0 deletions src/mapserver/qgsprojectparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,27 @@ void QgsProjectParser::serviceCapabilities( QDomElement& parentElement, QDomDocu
parentElement.appendChild( serviceElem );
}

QString QgsProjectParser::serviceUrl() const
{
QString url;

if( !mXMLDoc )
{
return url;
}

QDomElement propertiesElem = mXMLDoc->documentElement().firstChildElement( "properties" );
if ( !propertiesElem.isNull() )
{
QDomElement wmsUrlElem = propertiesElem.firstChildElement( "WMSUrl" );
if ( !wmsUrlElem.isNull() )
{
url = wmsUrlElem.text();
}
}
return url;
}

QString QgsProjectParser::convertToAbsolutePath( const QString& file ) const
{
if ( !file.startsWith( "./" ) && !file.startsWith( "../" ) )
Expand Down
2 changes: 2 additions & 0 deletions src/mapserver/qgsprojectparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class QgsProjectParser: public QgsConfigParser
/**Reads service metadata from projectfile or falls back to parent class method if not there*/
void serviceCapabilities( QDomElement& parentElement, QDomDocument& doc ) const;

QString serviceUrl() const;

private:

//forbidden
Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgssldparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ QgsVectorOverlay* QgsSLDParser::vectorOverlayFromDiagramSymbolizer( const QDomEl
QList<QgsDiagramItem> theItems;
QList<int> scalingAttributes;
QgsAttributeList factoryCategoryAttributes;
QgsDiagramRenderer::ItemInterpretation interpretation; //discrete or linear
QgsDiagramRenderer::ItemInterpretation interpretation = QgsDiagramRenderer::DISCRETE; //discrete or linear

//scale
double scaleFactor = scaleFactorFromScaleTag( diagramElem.namedItem( "Scale" ).toElement() );
Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgswfsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ QDomDocument QgsWFSServer::getCapabilities()

//wfs:FeatureTypeList element
QDomElement featureTypeListElement = doc.createElement( "FeatureTypeList"/*wfs:FeatureTypeList*/ );
capabilityElement.appendChild( featureTypeListElement );
wfsCapabilitiesElement.appendChild( featureTypeListElement );
//wfs:Operations element
QDomElement operationsElement = doc.createElement( "Operations"/*wfs:Operations*/ );
featureTypeListElement.appendChild( operationsElement );
Expand Down
107 changes: 56 additions & 51 deletions src/mapserver/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,58 +127,11 @@ QDomDocument QgsWMSServer::getCapabilities( QString version )
requestElement.appendChild( elem );

//Prepare url
//Some client requests already have http://<SERVER_NAME> in the REQUEST_URI variable
QString hrefString;
QString requestUrl = getenv( "REQUEST_URI" );
QUrl mapUrl( requestUrl );
mapUrl.setHost( getenv( "SERVER_NAME" ) );

//Add non-default ports to url
QString portString = getenv( "SERVER_PORT" );
if ( !portString.isEmpty() )
{
bool portOk;
int portNumber = portString.toInt( &portOk );
if ( portOk )
{
if ( portNumber != 80 )
{
mapUrl.setPort( portNumber );
}
}
}

if ( QString( getenv( "HTTPS" ) ).compare( "on", Qt::CaseInsensitive ) == 0 )
{
mapUrl.setScheme( "https" );
}
else
{
mapUrl.setScheme( "http" );
}

QList<QPair<QString, QString> > queryItems = mapUrl.queryItems();
QList<QPair<QString, QString> >::const_iterator queryIt = queryItems.constBegin();
for ( ; queryIt != queryItems.constEnd(); ++queryIt )
QString hrefString = mConfigParser->serviceUrl();
if ( hrefString.isEmpty() )
{
if ( queryIt->first.compare( "REQUEST", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if ( queryIt->first.compare( "VERSION", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if ( queryIt->first.compare( "SERVICE", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if ( queryIt->first.compare( "_DC", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
hrefString = serviceUrl();
}
hrefString = mapUrl.toString();


// SOAP platform
Expand All @@ -201,7 +154,6 @@ QDomDocument QgsWMSServer::getCapabilities( QString version )
QDomElement olResourceElement = doc.createElement( "OnlineResource"/*wms:OnlineResource*/ );
olResourceElement.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" );
olResourceElement.setAttribute( "xlink:type", "simple" );
requestUrl.truncate( requestUrl.indexOf( "?" ) + 1 );
olResourceElement.setAttribute( "xlink:href", hrefString );
getElement.appendChild( olResourceElement );

Expand Down Expand Up @@ -1993,3 +1945,56 @@ bool QgsWMSServer::checkMaximumWidthHeight() const
}
return true;
}

QString QgsWMSServer::serviceUrl() const
{
QUrl mapUrl( getenv( "REQUEST_URI" ) );
mapUrl.setHost( getenv( "SERVER_NAME" ) );

//Add non-default ports to url
QString portString = getenv( "SERVER_PORT" );
if ( !portString.isEmpty() )
{
bool portOk;
int portNumber = portString.toInt( &portOk );
if ( portOk )
{
if ( portNumber != 80 )
{
mapUrl.setPort( portNumber );
}
}
}

if ( QString( getenv( "HTTPS" ) ).compare( "on", Qt::CaseInsensitive ) == 0 )
{
mapUrl.setScheme( "https" );
}
else
{
mapUrl.setScheme( "http" );
}

QList<QPair<QString, QString> > queryItems = mapUrl.queryItems();
QList<QPair<QString, QString> >::const_iterator queryIt = queryItems.constBegin();
for ( ; queryIt != queryItems.constEnd(); ++queryIt )
{
if ( queryIt->first.compare( "REQUEST", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if ( queryIt->first.compare( "VERSION", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if ( queryIt->first.compare( "SERVICE", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
else if ( queryIt->first.compare( "_DC", Qt::CaseInsensitive ) == 0 )
{
mapUrl.removeQueryItem( queryIt->first );
}
}
return mapUrl.toString();
}
3 changes: 3 additions & 0 deletions src/mapserver/qgswmsserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class QgsWMSServer
@return true if width/height values are okay*/
bool checkMaximumWidthHeight() const;

/**Get service address from REQUEST_URI if not specified in the configuration*/
QString serviceUrl() const;

/**Map containing the WMS parameters*/
QMap<QString, QString> mParameterMap;
QgsConfigParser* mConfigParser;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/heatmap/heatmapgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void HeatmapGui::updateBBox()
mBBox = inputLayer->extent();
QgsCoordinateReferenceSystem layerCrs = inputLayer->crs();

float radiusInMapUnits;
float radiusInMapUnits = 0.0;
if ( useRadius->isChecked() )
{
float maxInField = inputLayer->maximumValue( radiusFieldCombo->itemData( radiusFieldCombo->currentIndex() ).toInt() ).toFloat();
Expand Down
7 changes: 5 additions & 2 deletions src/providers/grass/qgsgrassrasterprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,11 @@ double QgsGrassRasterProvider::noDataValue() const
// limit: 1.7976931348623157e+308
nul = -1e+300;
}
else if ( mGrassDataType == FCELL_TYPE )
else
{
if ( mGrassDataType != FCELL_TYPE )
QgsDebugMsg( "unexpected data type" );

// limit: 3.40282347e+38
nul = -1e+30;
}
Expand Down Expand Up @@ -303,7 +306,7 @@ QList<QgsColorRampShader::ColorRampItem> QgsGrassRasterProvider::colorTable( int
QList<QgsGrass::Color> colors = QgsGrass::colors( mGisdbase, mLocation, mMapset, mMapName );
QList<QgsGrass::Color>::iterator i;

double v, r, g, b;
double v = 0.0, r = 0.0, g = 0.0, b = 0.0;
for ( i = colors.begin(); i != colors.end(); ++i )
{
if ( ct.count() == 0 || i->value1 != v || i->red1 != r || i->green1 != g || i->blue1 != b )
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ows/qgsowsdataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ QVector<QgsDataItem*> QgsOWSConnectionItem::createChildren()

QVector<QgsDataItem*> serviceItems;

int layerCount;
int layerCount = 0;
// Try to open with WMS,WFS,WCS
foreach( QString key, QStringList() << "wms" << "WFS" << "gdal" )
{
Expand Down
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,8 @@ QString QgsPostgresProvider::geomParam( int offset ) const
{
QString geometry;

bool forceMulti;
bool forceMulti = false;

switch ( geometryType() )
{
case QGis::WKBPoint:
Expand All @@ -1845,7 +1846,6 @@ QString QgsPostgresProvider::geomParam( int offset ) const
break;
}


if ( forceMulti )
{
geometry += mConnectionRO->majorVersion() < 2 ? "multi(" : "st_multi(";
Expand Down
10 changes: 1 addition & 9 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2503,9 +2503,7 @@ void QgsWmsProvider::parseWMTSContents( QDomElement const &e )
metersPerUnit = 0.3048;
break;

case QGis::DecimalDegrees:
case QGis::DegreesMinutesSeconds:
case QGis::DegreesDecimalMinutes:
case QGis::Degrees:
metersPerUnit = 111319.49079327358;
break;

Expand Down Expand Up @@ -3063,12 +3061,10 @@ bool QgsWmsProvider::calculateExtent()
}

QgsDebugMsg( "no extent returned" );

return false;
}
else
{

bool firstLayer = true; //flag to know if a layer is the first to be successfully transformed
for ( QStringList::Iterator it = mActiveSubLayers.begin();
it != mActiveSubLayers.end();
Expand Down Expand Up @@ -3115,10 +3111,6 @@ bool QgsWmsProvider::calculateExtent()
QgsDebugMsg( "exiting with '" + mLayerExtent.toString() + "'." );
return true;
}

QgsDebugMsg( "exiting without extent." );
return false;

}


Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@
</property>
<property name="toolTip">
<string>Freeze or Thaw Labels
Shift thaws, Alt toggles, Ctl (Cmd) hides</string>
Shift thaws, Ctl (Cmd) toggles, Shift+Ctl (Cmd) hides</string>
</property>
</action>
<action name="mActionShowFrozenLabels">
Expand Down
232 changes: 140 additions & 92 deletions src/ui/qgsprojectpropertiesbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>604</width>
<height>588</height>
<width>644</width>
<height>661</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -194,7 +194,7 @@
<item row="1" column="0">
<widget class="QGroupBox" name="btnGrpMapUnits">
<property name="title">
<string>Layer units (only used when CRS transformation is disabled)</string>
<string>Layer units</string>
</property>
<layout class="QGridLayout" name="gridLayout_27">
<item row="0" column="0">
Expand All @@ -215,12 +215,35 @@
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="radDecimalDegrees">
<widget class="QRadioButton" name="radDegrees">
<property name="text">
<string>Degree</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="btnGrpDegreeDisplay">
<property name="title">
<string>Degree display</string>
</property>
<layout class="QGridLayout" name="gridLayout_30">
<item row="0" column="1">
<widget class="QRadioButton" name="radD">
<property name="text">
<string>Decimal degrees</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="radDM">
<property name="text">
<string>Degrees, Minutes</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QRadioButton" name="radDMS">
<property name="text">
Expand All @@ -231,7 +254,7 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QGroupBox" name="btnGrpPrecision">
<property name="title">
<string>Precision</string>
Expand Down Expand Up @@ -295,7 +318,7 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QGroupBox" name="grpProjectScales">
<property name="title">
<string>Project scales</string>
Expand Down Expand Up @@ -757,8 +780,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>637</width>
<height>808</height>
<width>660</width>
<height>792</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
Expand Down Expand Up @@ -868,6 +891,52 @@
<string>WMS Capabilitities</string>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="2" column="0">
<widget class="QCheckBox" name="mAddWktGeometryCheckBox">
<property name="text">
<string>Add WKT geometry to feature info response</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="grpWMSList">
<property name="title">
<string>Coordinate Systems Restrictions</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mWMSList"/>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pbnWMSAddSRS">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pbnWMSRemoveSRS">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pbnWMSSetUsedSRS">
<property name="text">
<string>Used</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="grpWMSExt">
<property name="title">
Expand Down Expand Up @@ -971,80 +1040,44 @@
</layout>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="grpWMSList">
<property name="title">
<string>Coordinate Systems Restrictions</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0" colspan="3">
<widget class="QListWidget" name="mWMSList"/>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pbnWMSAddSRS">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pbnWMSRemoveSRS">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pbnWMSSetUsedSRS">
<property name="text">
<string>Used</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mAddWktGeometryCheckBox">
<item row="3" column="0">
<widget class="QLabel" name="mWMSUrlLabel">
<property name="text">
<string>Add WKT geometry to feature info response</string>
<string>Advertised WMS url</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mMaxWidthLabel">
<property name="text">
<string>Maximum width</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxWidthLineEdit"/>
</item>
<item>
<widget class="QLabel" name="mMaxHeightLabel">
<property name="text">
<string>Maximum height</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxHeightLineEdit"/>
</item>
</layout>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLineEdit" name="mWMSUrlLineEdit"/>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mMaxWidthLabel">
<property name="text">
<string>Maximum width</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxWidthLineEdit"/>
</item>
<item>
<widget class="QLabel" name="mMaxHeightLabel">
<property name="text">
<string>Maximum height</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mMaxHeightLineEdit"/>
</item>
</layout>
</item>
<item row="3" column="0">
<item row="7" column="0">
<widget class="QGroupBox" name="grpWFSCapabilities">
<property name="title">
<string>WFS Capabilitities</string>
Expand Down Expand Up @@ -1098,7 +1131,6 @@
<tabstop>cbxAbsolutePath</tabstop>
<tabstop>radMeters</tabstop>
<tabstop>radFeet</tabstop>
<tabstop>radDecimalDegrees</tabstop>
<tabstop>radDMS</tabstop>
<tabstop>radAutomatic</tabstop>
<tabstop>radManual</tabstop>
Expand Down Expand Up @@ -1133,12 +1165,12 @@
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>289</x>
<y>322</y>
<x>353</x>
<y>407</y>
</hint>
<hint type="destinationlabel">
<x>418</x>
<y>325</y>
<x>515</x>
<y>408</y>
</hint>
</hints>
</connection>
Expand All @@ -1149,12 +1181,12 @@
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>289</x>
<y>322</y>
<x>353</x>
<y>407</y>
</hint>
<hint type="destinationlabel">
<x>522</x>
<y>320</y>
<x>606</x>
<y>405</y>
</hint>
</hints>
</connection>
Expand All @@ -1165,12 +1197,12 @@
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>128</x>
<y>322</y>
<x>154</x>
<y>407</y>
</hint>
<hint type="destinationlabel">
<x>418</x>
<y>325</y>
<x>515</x>
<y>408</y>
</hint>
</hints>
</connection>
Expand All @@ -1181,12 +1213,28 @@
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>115</x>
<y>322</y>
<x>141</x>
<y>407</y>
</hint>
<hint type="destinationlabel">
<x>606</x>
<y>405</y>
</hint>
</hints>
</connection>
<connection>
<sender>radDegrees</sender>
<signal>toggled(bool)</signal>
<receiver>btnGrpDegreeDisplay</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>443</x>
<y>262</y>
</hint>
<hint type="destinationlabel">
<x>522</x>
<y>320</y>
<x>410</x>
<y>304</y>
</hint>
</hints>
</connection>
Expand Down