Skip to content
Permalink
Browse files
Added button to vector props to let user change projection after laye…
…r has been loaded

git-svn-id: http://svn.osgeo.org/qgis/trunk@3431 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 22, 2005
1 parent ea4d488 commit ee33fb7b861e8791c82506dab74e76551e30a307
Showing with 154 additions and 90 deletions.
  1. +4 −2 ChangeLog
  2. +1 −1 configure.in
  3. +25 −0 src/qgsdlgvectorlayerproperties.cpp
  4. +1 −1 src/qgsdlgvectorlayerproperties.h
  5. +117 −85 src/qgsdlgvectorlayerpropertiesbase.ui
  6. +6 −0 src/qgsdlgvectorlayerpropertiesbase.ui.h
  7. +0 −1 src/qgsvectorlayer.cpp
@@ -3,11 +3,13 @@
Version 0.6 'Simon' .... development version
QGIS Change Log

2005-04-17 [timlinux] 0.6devel25
2005-04-12 [timlinux] 0.6devel26
** Added option to vector props dlg to let user change projection
2005-04-21 [timlinux] 0.6devel25
** More updates to qgsspatialrefsys. Changed splash to be a masked widget &
added the xcf masters for the splash. Splash still needs some minor
updating relating to text placement.
2005-04-17 [timlinux] 0.6devel24
2005-04-20 [timlinux] 0.6devel24
** Added logic for reverse mapping a wkt or proj4string to an srsid - not
very well tested at this stage but works for me with my test dataset
2005-04-17 [timlinux] 0.6devel23
@@ -25,7 +25,7 @@ dnl ---------------------------------------------------------------------------
MAJOR_VERSION=0
MINOR_VERSION=6
MICRO_VERSION=0
EXTRA_VERSION=25
EXTRA_VERSION=26
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
else
@@ -69,6 +69,9 @@
#ifdef HAVE_POSTGRESQL
#include "qgspgquerybuilder.h"
#endif
#include "qgslayerprojectionselector.h"
#include <qapplication.h>


QgsDlgVectorLayerProperties::QgsDlgVectorLayerProperties(QgsVectorLayer * lyr, QWidget * parent, const char *name, bool modal):QgsDlgVectorLayerPropertiesBase(parent, name, modal), layer(lyr), rendererDirty(false), bufferDialog(layer->rendererDialog()),
bufferRenderer(layer->
@@ -575,3 +578,25 @@ QString QgsDlgVectorLayerProperties::getMetadata()
return myMetadataQString;

}
void QgsDlgVectorLayerProperties::pbnChangeSpatialRefSys_clicked()
{


QgsLayerProjectionSelector * mySelector = new QgsLayerProjectionSelector();
long myDefaultSRS =layer->coordinateTransform()->sourceSRS().srsid();
if (myDefaultSRS==0)
{
myDefaultSRS=QgsProject::instance()->readNumEntry("SpatialRefSys","/ProjectSRSID",GEOSRS_ID);
}
mySelector->setSelectedSRSID(myDefaultSRS);
if(mySelector->exec())
{
layer->coordinateTransform()->sourceSRS().createFromSrsId(mySelector->getCurrentSRSID());
}
else
{
QApplication::restoreOverrideCursor();
}
delete mySelector;

}
@@ -73,7 +73,7 @@ class QgsDlgVectorLayerProperties : public QgsDlgVectorLayerPropertiesBase{
void btnHelp_clicked();
void pbnQueryBuilder_clicked();
void pbnIndex_clicked();

void pbnChangeSpatialRefSys_clicked();

protected:
QgsVectorLayer *layer;
@@ -1,4 +1,4 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>QgsDlgVectorLayerPropertiesBase</class>
<widget class="QDialog">
<property name="name">
@@ -320,7 +320,7 @@
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="4">
<widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>grpSubset</cstring>
</property>
@@ -330,63 +330,82 @@
<property name="title">
<string>Subset:</string>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>pbnQueryBuilder</cstring>
</property>
<property name="geometry">
<rect>
<x>497</x>
<y>292</y>
<width>129</width>
<height>28</height>
</rect>
</property>
<property name="text">
<string>Query Builder</string>
</property>
</widget>
<spacer>
<grid>
<property name="name">
<cstring>spacer43</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>480</width>
<height>21</height>
</size>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>295</y>
<width>480</width>
<height>21</height>
</rect>
<cstring>unnamed</cstring>
</property>
</spacer>
<widget class="QTextEdit">
<widget class="QPushButton" row="1" column="1">
<property name="name">
<cstring>pbnQueryBuilder</cstring>
</property>
<property name="text">
<string>Query Builder</string>
</property>
</widget>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer43</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>480</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QTextEdit" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>txtSubsetSQL</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>indexGroupBox_2</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="title">
<string>Spatial Reference System</string>
</property>
<grid>
<property name="name">
<cstring>txtSubsetSQL</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>36</y>
<width>615</width>
<height>250</height>
</rect>
<cstring>unnamed</cstring>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>pbnChangeSpatialRefSys</cstring>
</property>
<property name="text">
<string>Change</string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="0">
<property name="name">
<cstring>leSpatialRefSys</cstring>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="3" column="0" rowspan="1" colspan="4">
<property name="name">
@@ -404,38 +423,44 @@
<property name="title">
<string>Spatial Index</string>
</property>
<widget class="QLabel">
<property name="name">
<cstring>indexLabel</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>170</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Create Spatial Index</string>
</property>
</widget>
<widget class="QPushButton">
<grid>
<property name="name">
<cstring>indexPushButton</cstring>
</property>
<property name="geometry">
<rect>
<x>190</x>
<y>20</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>OK</string>
<cstring>unnamed</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>indexLabel</cstring>
</property>
<property name="text">
<string>Create Spatial Index</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="2">
<property name="name">
<cstring>indexPushButton</cstring>
</property>
<property name="text">
<string>Create</string>
</property>
</widget>
<spacer row="0" column="1">
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>141</width>
<height>21</height>
</size>
</property>
</spacer>
</grid>
</widget>
</grid>
</widget>
@@ -583,6 +608,12 @@
<receiver>QgsDlgVectorLayerPropertiesBase</receiver>
<slot>pbnIndex_clicked()</slot>
</connection>
<connection>
<sender>pbnChangeSpatialRefSys</sender>
<signal>clicked()</signal>
<receiver>QgsDlgVectorLayerPropertiesBase</receiver>
<slot>pbnChangeSpatialRefSys_clicked()</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in implementation">qgsdlgvectorlayerpropertiesbase.ui.h</include>
@@ -595,6 +626,7 @@
<slot>pbnCancel_pressed()</slot>
<slot>pbnQueryBuilder_clicked()</slot>
<slot>pbnIndex_clicked()</slot>
<slot>pbnChangeSpatialRefSys_clicked()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
@@ -48,3 +48,9 @@ void QgsDlgVectorLayerPropertiesBase::pbnIndex_clicked()
{

}


void QgsDlgVectorLayerPropertiesBase::pbnChangeSpatialRefSys_clicked()
{

}
@@ -89,7 +89,6 @@
#include "qgsclipper.h"
#endif
#include "qgssvgcache.h"
#include "qgslayerprojectionselector.h"
#include "qgsspatialrefsys.h"
#include "qgis.h" //for globals
//#include "wkbheader.h"

0 comments on commit ee33fb7

Please sign in to comment.