snappingoptiondocked.diff
src/app/qgsoptions.cpp (Arbeitskopie) | ||
---|---|---|
249 | 249 |
cbxHideSplash->setChecked( settings.value( "/qgis/hideSplash", false ).toBool() ); |
250 | 250 |
cbxAttributeTableDocked->setChecked( settings.value( "/qgis/dockAttributeTable", false ).toBool() ); |
251 | 251 |
cbxIdentifyResultsDocked->setChecked( settings.value( "/qgis/dockIdentifyResults", false ).toBool() ); |
252 |
cbxSnappingOptionsDocked->setChecked( settings.value( "/qgis/dockSnapping", false ).toBool() ); |
|
252 | 253 |
cbxAddPostgisDC->setChecked( settings.value( "/qgis/addPostgisDC", false ).toBool() ); |
253 | 254 |
cbxAddNewLayersToCurrentGroup->setChecked( settings.value( "/qgis/addNewLayersToCurrentGroup", false ).toBool() ); |
254 | 255 |
cbxCreateRasterLegendIcons->setChecked( settings.value( "/qgis/createRasterLegendIcons", true ).toBool() ); |
... | ... | |
505 | 506 |
settings.setValue( "/qgis/dockAttributeTable", cbxAttributeTableDocked->isChecked() ); |
506 | 507 |
settings.setValue( "/qgis/attributeTableBehaviour", cmbAttrTableBehaviour->currentIndex() ); |
507 | 508 |
settings.setValue( "/qgis/dockIdentifyResults", cbxIdentifyResultsDocked->isChecked() ); |
509 |
settings.setValue( "/qgis/dockSnapping", cbxSnappingOptionsDocked->isChecked() ); |
|
508 | 510 |
settings.setValue( "/qgis/addPostgisDC", cbxAddPostgisDC->isChecked() ); |
509 | 511 |
settings.setValue( "/qgis/addNewLayersToCurrentGroup", cbxAddNewLayersToCurrentGroup->isChecked() ); |
510 | 512 |
settings.setValue( "/qgis/createRasterLegendIcons", cbxCreateRasterLegendIcons->isChecked() ); |
src/app/qgssnappingdialog.cpp (Arbeitskopie) | ||
---|---|---|
19 | 19 |
#include "qgsmapcanvas.h" |
20 | 20 |
#include "qgsmaplayer.h" |
21 | 21 |
#include "qgsvectorlayer.h" |
22 |
#include "qgsmaplayerregistry.h" |
|
23 |
#include "qgisapp.h" |
|
24 |
#include "qgsproject.h" |
|
22 | 25 |
#include <QCheckBox> |
23 | 26 |
#include <QDoubleValidator> |
24 | 27 |
#include <QComboBox> |
25 | 28 |
#include <QLineEdit> |
29 |
#include <QDockWidget> |
|
26 | 30 | |
27 |
QgsSnappingDialog::QgsSnappingDialog( QgsMapCanvas* canvas, const QMap<QString, LayerEntry >& settings ): mMapCanvas( canvas ) |
|
31 | ||
32 |
class QgsSnappingDock : public QDockWidget |
|
28 | 33 |
{ |
34 |
public: |
|
35 |
QgsSnappingDock( const QString & title, QWidget * parent = 0, Qt::WindowFlags flags = 0 ) |
|
36 |
: QDockWidget( title, parent, flags ) |
|
37 |
{ |
|
38 |
setObjectName( "Snapping Options" ); // set object name so the position can be saved |
|
39 |
} |
|
40 |
|
|
41 |
virtual void closeEvent( QCloseEvent * ev ) |
|
42 |
{ |
|
43 |
//deleteLater(); |
|
44 |
} |
|
45 |
|
|
46 |
}; |
|
47 | ||
48 | ||
49 |
QgsSnappingDialog::QgsSnappingDialog( QWidget* parent, QgsMapCanvas* canvas ): QDialog(parent), mMapCanvas( canvas ) |
|
50 |
{ |
|
29 | 51 |
setupUi( this ); |
30 |
connect( mButtonBox, SIGNAL( accepted() ), this, SLOT( accept() ) ); |
|
31 |
connect( mButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) ); |
|
52 |
|
|
53 |
QSettings myQsettings; |
|
54 |
bool myDockFlag = myQsettings.value( "/qgis/dockSnapping", false ).toBool(); |
|
55 |
if ( myDockFlag ) |
|
56 |
{ |
|
57 |
mDock = new QgsSnappingDock( tr( "Snapping Options"), QgisApp::instance() ); |
|
58 |
mDock->setAllowedAreas( Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea ); |
|
59 |
mDock->setWidget( this ); |
|
60 |
connect( this, SIGNAL( destroyed() ), mDock, SLOT( close() ) ); |
|
61 |
QgisApp::instance()->addDockWidget( Qt::BottomDockWidgetArea, mDock ); |
|
62 |
mButtonBox->setVisible(false); |
|
63 |
} |
|
64 |
else |
|
65 |
{ |
|
66 |
connect( mButtonBox, SIGNAL( accepted() ), this, SLOT( apply() ) ); |
|
67 |
} |
|
68 |
connect( QgsMapLayerRegistry::instance(),SIGNAL(layerWasAdded ( QgsMapLayer * ) ),this,SLOT( update() ) ); |
|
69 |
connect( QgsMapLayerRegistry::instance(),SIGNAL(layerWillBeRemoved ( QString ) ),this,SLOT( update() ) ); |
|
70 |
|
|
71 |
|
|
72 |
update(); |
|
73 |
mLayerTreeWidget->setHeaderLabels(QStringList() << ""); |
|
74 |
mLayerTreeWidget->resizeColumnToContents( 0); |
|
75 |
mLayerTreeWidget->setColumnWidth( 1, 200 ); //hardcoded for now |
|
76 |
mLayerTreeWidget->setColumnWidth( 2, 200 ); //hardcoded for now |
|
77 |
mLayerTreeWidget->resizeColumnToContents( 3 ); |
|
78 |
mLayerTreeWidget->resizeColumnToContents( 4 ); |
|
79 |
} |
|
32 | 80 | |
81 |
QgsSnappingDialog::QgsSnappingDialog() |
|
82 |
{ |
|
83 | ||
84 |
} |
|
85 | ||
86 |
QgsSnappingDialog::~QgsSnappingDialog() |
|
87 |
{ |
|
88 | ||
89 |
} |
|
90 | ||
91 |
void QgsSnappingDialog::layerSettings( ) |
|
92 |
{ |
|
93 |
mSnappingLayerSettings .clear(); |
|
94 | ||
95 |
int nRows = mLayerTreeWidget->topLevelItemCount(); |
|
96 |
QTreeWidgetItem* currentItem = 0; |
|
97 |
QString layerId; |
|
98 |
QString layerName; |
|
99 |
QString snapToItemText; |
|
100 |
QString toleranceItemText; |
|
101 |
int snapTo; |
|
102 |
int toleranceUnit; |
|
103 |
double tolerance; |
|
104 |
bool checked = false; |
|
105 | ||
106 |
for ( int i = 0; i < nRows; ++i ) |
|
107 |
{ |
|
108 |
currentItem = mLayerTreeWidget->topLevelItem( i ); |
|
109 |
if ( !currentItem ) |
|
110 |
{ |
|
111 |
continue; |
|
112 |
} |
|
113 | ||
114 |
//get layer id, to vertex/to segment and tolerance |
|
115 |
layerName = currentItem->text( 1 ); |
|
116 |
layerId = mLayerIds.at( i ); |
|
117 |
//checked = ( currentItem->checkState( 0 ) == Qt::Checked ); |
|
118 |
checked = ( (( QCheckBox* )( mLayerTreeWidget->itemWidget( currentItem, 0 ) ) )->checkState() == Qt::Checked ); |
|
119 |
snapToItemText = (( QComboBox* )( mLayerTreeWidget->itemWidget( currentItem, 2 ) ) )->currentText(); |
|
120 |
toleranceItemText = (( QComboBox* )( mLayerTreeWidget->itemWidget( currentItem, 4 ) ) )->currentText(); |
|
121 |
if ( snapToItemText == tr( "to vertex" ) ) |
|
122 |
{ |
|
123 |
snapTo = 0; |
|
124 |
} |
|
125 |
else if ( snapToItemText == tr( "to segment" ) ) |
|
126 |
{ |
|
127 |
snapTo = 1; |
|
128 |
} |
|
129 |
else //to vertex and segment |
|
130 |
{ |
|
131 |
snapTo = 2; |
|
132 |
} |
|
133 |
if ( toleranceItemText == tr( "map units" ) ) |
|
134 |
{ |
|
135 |
toleranceUnit = 0; |
|
136 |
} |
|
137 |
else //to vertex and segment |
|
138 |
{ |
|
139 |
toleranceUnit = 1; |
|
140 |
} |
|
141 |
tolerance = (( QLineEdit* )( mLayerTreeWidget->itemWidget( currentItem, 3 ) ) )->text().toDouble(); |
|
142 |
LayerEntry newEntry; |
|
143 |
newEntry.checked = checked; newEntry.snapTo = snapTo; newEntry.layerName = layerName; |
|
144 |
newEntry.tolerance = tolerance; newEntry.toleranceUnit = toleranceUnit; |
|
145 |
mSnappingLayerSettings.insert( layerId, newEntry ); |
|
146 |
} |
|
147 |
} |
|
148 | ||
149 |
void QgsSnappingDialog::closeEvent( QCloseEvent* event ) |
|
150 |
{ |
|
151 |
QDialog::closeEvent( event ); |
|
152 | ||
153 |
if ( mDock == NULL ) |
|
154 |
{ |
|
155 |
QSettings settings; |
|
156 |
settings.setValue( "/Windows/BetterSnapping/geometry", saveGeometry() ); |
|
157 |
} |
|
158 |
} |
|
159 | ||
160 | ||
161 |
void QgsSnappingDialog::update( ) |
|
162 |
{ |
|
163 |
QSettings myQsettings; |
|
164 |
bool myDockFlag = myQsettings.value( "/qgis/dockSnapping", false ).toBool(); |
|
165 | ||
166 |
bool layerIdListOk, enabledListOk, toleranceListOk, toleranceUnitListOk, snapToListOk; |
|
167 |
QStringList layerIdList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingList", &layerIdListOk ); |
|
168 |
QStringList enabledList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingEnabledList", &enabledListOk ); |
|
169 |
QStringList toleranceList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingToleranceList", & toleranceListOk ); |
|
170 |
QStringList toleranceUnitList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingToleranceUnitList", & toleranceUnitListOk ); |
|
171 |
QStringList snapToList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnapToList", &snapToListOk ); |
|
172 |
|
|
173 |
QStringList::const_iterator idIter = layerIdList.constBegin(); |
|
174 |
QStringList::const_iterator enabledIter = enabledList.constBegin(); |
|
175 |
QStringList::const_iterator tolIter = toleranceList.constBegin(); |
|
176 |
QStringList::const_iterator tolUnitIter = toleranceUnitList.constBegin(); |
|
177 |
QStringList::const_iterator snapToIter = snapToList.constBegin(); |
|
178 | ||
179 |
QgsMapLayer* currentLayer = 0; |
|
180 | ||
181 |
//create the new layer entries |
|
182 |
for ( ; idIter != layerIdList.constEnd(); ++idIter, ++enabledIter, ++tolIter, ++tolUnitIter, ++snapToIter ) |
|
183 |
{ |
|
184 |
if ( layerIdListOk ) |
|
185 |
{ |
|
186 |
currentLayer = QgsMapLayerRegistry::instance()->mapLayer( *idIter ); |
|
187 |
} |
|
188 |
else |
|
189 |
{ |
|
190 |
break; |
|
191 |
} |
|
192 | ||
193 |
if ( currentLayer ) |
|
194 |
{ |
|
195 |
LayerEntry newEntry; |
|
196 |
newEntry.layerName = currentLayer->name(); |
|
197 | ||
198 |
newEntry.checked = false; |
|
199 |
if ( enabledListOk && enabledIter != enabledList.constEnd() ) |
|
200 |
{ |
|
201 |
if (( *enabledIter ) == "enabled" ) |
|
202 |
{ |
|
203 |
newEntry.checked = true; |
|
204 |
} |
|
205 |
} |
|
206 | ||
207 |
//snap to vertex / segment / vertex and segment |
|
208 |
if ( snapToListOk && snapToIter != snapToList.constEnd() ) |
|
209 |
{ |
|
210 |
if (( *snapToIter ) == "to_vertex" ) |
|
211 |
{ |
|
212 |
newEntry.snapTo = 0; |
|
213 |
} |
|
214 |
else if (( *snapToIter ) == "to_segment" ) |
|
215 |
{ |
|
216 |
newEntry.snapTo = 1; |
|
217 |
} |
|
218 |
else //to vertex and segment |
|
219 |
{ |
|
220 |
newEntry.snapTo = 2; |
|
221 |
} |
|
222 |
} |
|
223 |
else |
|
224 |
{ |
|
225 |
newEntry.snapTo = 0; |
|
226 |
} |
|
227 | ||
228 |
//snap tolerance |
|
229 |
if ( toleranceListOk && tolIter != toleranceList.constEnd() ) |
|
230 |
{ |
|
231 |
newEntry.tolerance = tolIter->toDouble(); |
|
232 |
} |
|
233 |
else |
|
234 |
{ |
|
235 |
newEntry.tolerance = 0; |
|
236 |
} |
|
237 | ||
238 |
//snap tolerance unit |
|
239 |
if ( toleranceUnitListOk && tolUnitIter != toleranceUnitList.constEnd() ) |
|
240 |
{ |
|
241 |
newEntry.toleranceUnit = tolUnitIter->toInt(); |
|
242 |
} |
|
243 |
else |
|
244 |
{ |
|
245 |
newEntry.toleranceUnit = 0; |
|
246 |
} |
|
247 | ||
248 |
mSnappingLayerSettings.insert( *idIter, newEntry ); |
|
249 | ||
250 |
} |
|
251 |
} |
|
33 | 252 |
//an entry for each layer |
34 | 253 |
int nLayers = mMapCanvas->layerCount(); |
35 | 254 |
int nVectorLayers = 0; |
36 | 255 |
//mLayerTableWidget->setRowCount(nLayers); |
256 |
mLayerTreeWidget->clear(); |
|
37 | 257 | |
38 |
QgsMapLayer* currentLayer = 0; |
|
39 |
QgsVectorLayer* currentVectorLayer = 0; |
|
258 |
QgsVectorLayer* currentVectorLayer = 0; |
|
40 | 259 |
QString currentLayerName; |
41 | 260 |
QMap<QString, LayerEntry >::const_iterator settingIt; |
42 | 261 |
QTreeWidgetItem* newItem = 0; |
43 | ||
44 | 262 |
if ( mMapCanvas ) |
45 | 263 |
{ |
46 | 264 |
for ( int i = 0; i < nLayers; ++i ) |
... | ... | |
53 | 271 |
{ |
54 | 272 |
//snap to layer yes/no |
55 | 273 |
newItem = new QTreeWidgetItem( mLayerTreeWidget ); |
56 |
newItem->setText( 0, currentLayer->name() ); |
|
274 | ||
275 |
newItem->setText( 1, currentLayer->name() ); |
|
57 | 276 |
mLayerIds << currentLayer->getLayerID(); //store also the layer id |
58 |
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsUserCheckable ); |
|
59 |
newItem->setCheckState( 0, Qt::Unchecked ); |
|
277 |
//newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsUserCheckable ); |
|
278 |
newItem->setFlags( Qt::ItemIsEnabled ); |
|
279 |
//newItem->setCheckState( 0, Qt::Unchecked ); |
|
280 |
QCheckBox* snapToLayerChkBox = new QCheckBox ( mLayerTreeWidget); |
|
281 |
mLayerTreeWidget->setItemWidget( newItem, 0, snapToLayerChkBox ); |
|
282 |
if ( myDockFlag ) |
|
283 |
{ |
|
284 |
connect(snapToLayerChkBox,SIGNAL(stateChanged ( int )),this,SLOT(apply())); |
|
285 |
} |
|
60 | 286 | |
61 | 287 |
//snap to vertex/ snap to segment |
62 | 288 |
QComboBox* snapToComboBox = new QComboBox( mLayerTreeWidget ); |
63 | 289 |
snapToComboBox->insertItem( 0, tr( "to vertex" ) ); |
64 | 290 |
snapToComboBox->insertItem( 1, tr( "to segment" ) ); |
65 | 291 |
snapToComboBox->insertItem( 2, tr( "to vertex and segment" ) ); |
66 |
mLayerTreeWidget->setItemWidget( newItem, 1, snapToComboBox ); |
|
292 |
mLayerTreeWidget->setItemWidget( newItem, 2, snapToComboBox ); |
|
293 |
if ( myDockFlag ) |
|
294 |
{ |
|
295 |
connect(snapToComboBox,SIGNAL(currentIndexChanged ( int )),this,SLOT(apply())); |
|
296 |
} |
|
67 | 297 | |
68 | 298 |
//snapping tolerance |
69 | 299 |
QLineEdit* snappingToleranceEdit = new QLineEdit( mLayerTreeWidget ); |
70 | 300 |
QDoubleValidator* validator = new QDoubleValidator( snappingToleranceEdit ); |
71 | 301 |
snappingToleranceEdit->setValidator( validator ); |
72 |
mLayerTreeWidget->setItemWidget( newItem, 2, snappingToleranceEdit ); |
|
302 |
mLayerTreeWidget->setItemWidget( newItem, 3, snappingToleranceEdit ); |
|
303 |
if ( myDockFlag ) |
|
304 |
{ |
|
305 |
connect(snappingToleranceEdit,SIGNAL(textEdited ( const QString )),this,SLOT(apply())); |
|
306 |
} |
|
73 | 307 | |
74 | 308 |
//snap to vertex/ snap to segment |
75 | 309 |
QComboBox* toleranceUnitsComboBox = new QComboBox( mLayerTreeWidget ); |
76 | 310 |
toleranceUnitsComboBox->insertItem( 0, tr( "map units" ) ); |
77 | 311 |
toleranceUnitsComboBox->insertItem( 1, tr( "pixels" ) ); |
78 |
mLayerTreeWidget->setItemWidget( newItem, 3, toleranceUnitsComboBox ); |
|
312 |
mLayerTreeWidget->setItemWidget( newItem, 4, toleranceUnitsComboBox ); |
|
313 |
if ( myDockFlag ) |
|
314 |
{ |
|
315 |
connect(toleranceUnitsComboBox,SIGNAL(currentIndexChanged ( int )),this,SLOT(apply())); |
|
316 |
} |
|
79 | 317 | |
80 |
settingIt = settings.find( currentVectorLayer->getLayerID() );
|
|
81 |
if ( settingIt != settings.constEnd() )
|
|
318 |
settingIt = mSnappingLayerSettings.find( currentVectorLayer->getLayerID() );
|
|
319 |
if ( settingIt != mSnappingLayerSettings.constEnd() )
|
|
82 | 320 |
{ |
83 | 321 |
snappingToleranceEdit->setText( QString::number( settingIt.value().tolerance ) ); |
84 | 322 |
int index; |
... | ... | |
117 | 355 |
} |
118 | 356 |
} |
119 | 357 |
} |
120 |
mLayerTreeWidget->resizeColumnToContents( 0 ); |
|
121 |
mLayerTreeWidget->setColumnWidth( 1, 200 ); //hardcoded for now |
|
122 |
mLayerTreeWidget->resizeColumnToContents( 2 ); |
|
123 |
mLayerTreeWidget->resizeColumnToContents( 3 ); |
|
124 | 358 |
} |
125 | 359 |
} |
126 | 360 | |
127 |
QgsSnappingDialog::QgsSnappingDialog()
|
|
361 |
void QgsSnappingDialog::apply()
|
|
128 | 362 |
{ |
363 |
layerSettings( ); |
|
364 |
QMap<QString, LayerEntry>::const_iterator layerEntryIt; |
|
129 | 365 | |
130 |
} |
|
366 |
//store the layer snapping settings as string lists |
|
367 |
QStringList layerIdList; |
|
368 |
QStringList snapToList; |
|
369 |
QStringList toleranceList; |
|
370 |
QStringList enabledList; |
|
371 |
QStringList toleranceUnitList; |
|
131 | 372 | |
132 |
QgsSnappingDialog::~QgsSnappingDialog() |
|
133 |
{ |
|
134 | ||
135 |
} |
|
136 | ||
137 |
void QgsSnappingDialog::layerSettings( QMap<QString, LayerEntry>& settings ) const |
|
138 |
{ |
|
139 |
settings.clear(); |
|
140 | ||
141 |
int nRows = mLayerTreeWidget->topLevelItemCount(); |
|
142 |
QTreeWidgetItem* currentItem = 0; |
|
143 |
QString layerId; |
|
144 |
QString layerName; |
|
145 |
QString snapToItemText; |
|
146 |
QString toleranceItemText; |
|
147 |
int snapTo; |
|
148 |
int toleranceUnit; |
|
149 |
double tolerance; |
|
150 |
bool checked = false; |
|
151 | ||
152 |
for ( int i = 0; i < nRows; ++i ) |
|
373 |
for ( layerEntryIt = mSnappingLayerSettings.constBegin(); layerEntryIt != mSnappingLayerSettings.constEnd(); ++layerEntryIt ) |
|
153 | 374 |
{ |
154 |
currentItem = mLayerTreeWidget->topLevelItem( i ); |
|
155 |
if ( !currentItem ) |
|
375 |
layerIdList << layerEntryIt.key(); |
|
376 |
toleranceList << QString::number( layerEntryIt->tolerance, 'f' ); |
|
377 |
toleranceUnitList << QString::number(( int )layerEntryIt->toleranceUnit ); |
|
378 |
if ( layerEntryIt->checked ) |
|
156 | 379 |
{ |
157 |
continue;
|
|
380 |
enabledList << "enabled";
|
|
158 | 381 |
} |
159 | ||
160 |
//get layer id, to vertex/to segment and tolerance |
|
161 |
layerName = currentItem->text( 0 ); |
|
162 |
layerId = mLayerIds.at( i ); |
|
163 |
checked = ( currentItem->checkState( 0 ) == Qt::Checked ); |
|
164 |
snapToItemText = (( QComboBox* )( mLayerTreeWidget->itemWidget( currentItem, 1 ) ) )->currentText(); |
|
165 |
toleranceItemText = (( QComboBox* )( mLayerTreeWidget->itemWidget( currentItem, 3 ) ) )->currentText(); |
|
166 |
if ( snapToItemText == tr( "to vertex" ) ) |
|
382 |
else |
|
167 | 383 |
{ |
168 |
snapTo = 0;
|
|
384 |
enabledList << "disabled";
|
|
169 | 385 |
} |
170 |
else if ( snapToItemText == tr( "to segment" ) )
|
|
386 |
if ( layerEntryIt->snapTo == 0 )
|
|
171 | 387 |
{ |
172 |
snapTo = 1;
|
|
388 |
snapToList << "to_vertex";
|
|
173 | 389 |
} |
174 |
else //to vertex and segment
|
|
390 |
else if ( layerEntryIt->snapTo == 1 )
|
|
175 | 391 |
{ |
176 |
snapTo = 2;
|
|
392 |
snapToList << "to_segment";
|
|
177 | 393 |
} |
178 |
if ( toleranceItemText == tr( "map units" ) ) |
|
179 |
{ |
|
180 |
toleranceUnit = 0; |
|
181 |
} |
|
182 | 394 |
else //to vertex and segment |
183 | 395 |
{ |
184 |
toleranceUnit = 1;
|
|
396 |
snapToList << "to_vertex_and_segment";
|
|
185 | 397 |
} |
186 |
tolerance = (( QLineEdit* )( mLayerTreeWidget->itemWidget( currentItem, 2 ) ) )->text().toDouble(); |
|
187 |
LayerEntry newEntry; |
|
188 |
newEntry.checked = checked; newEntry.snapTo = snapTo; newEntry.layerName = layerName; |
|
189 |
newEntry.tolerance = tolerance; newEntry.toleranceUnit = toleranceUnit; |
|
190 |
settings.insert( layerId, newEntry ); |
|
191 | 398 |
} |
399 | ||
400 |
if ( mSnappingLayerSettings.size() > 0 ) |
|
401 |
{ |
|
402 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingList", layerIdList ); |
|
403 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnapToList", snapToList ); |
|
404 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingToleranceList", toleranceList ); |
|
405 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingToleranceUnitList", toleranceUnitList ); |
|
406 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingEnabledList", enabledList ); |
|
407 |
} |
|
192 | 408 |
} |
src/app/qgsprojectproperties.cpp (Arbeitskopie) | ||
---|---|---|
127 | 127 |
} |
128 | 128 |
} |
129 | 129 | |
130 |
bool layerIdListOk, enabledListOk, toleranceListOk, toleranceUnitListOk, snapToListOk; |
|
131 |
QStringList layerIdList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingList", &layerIdListOk ); |
|
132 |
QStringList enabledList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingEnabledList", &enabledListOk ); |
|
133 |
QStringList toleranceList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingToleranceList", & toleranceListOk ); |
|
134 |
QStringList toleranceUnitList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnappingToleranceUnitList", & toleranceUnitListOk ); |
|
135 |
QStringList snapToList = QgsProject::instance()->readListEntry( "Digitizing", "/LayerSnapToList", &snapToListOk ); |
|
136 | ||
137 |
QStringList::const_iterator idIter = layerIdList.constBegin(); |
|
138 |
QStringList::const_iterator enabledIter = enabledList.constBegin(); |
|
139 |
QStringList::const_iterator tolIter = toleranceList.constBegin(); |
|
140 |
QStringList::const_iterator tolUnitIter = toleranceUnitList.constBegin(); |
|
141 |
QStringList::const_iterator snapToIter = snapToList.constBegin(); |
|
142 | ||
143 | 130 |
QgsMapLayer* currentLayer = 0; |
144 | 131 | |
145 |
//create the new layer entries |
|
146 |
for ( ; idIter != layerIdList.constEnd(); ++idIter, ++enabledIter, ++tolIter, ++tolUnitIter, ++snapToIter ) |
|
147 |
{ |
|
148 |
if ( layerIdListOk ) |
|
149 |
{ |
|
150 |
currentLayer = QgsMapLayerRegistry::instance()->mapLayer( *idIter ); |
|
151 |
} |
|
152 |
else |
|
153 |
{ |
|
154 |
break; |
|
155 |
} |
|
156 | ||
157 |
if ( currentLayer ) |
|
158 |
{ |
|
159 |
LayerEntry newEntry; |
|
160 |
newEntry.layerName = currentLayer->name(); |
|
161 | ||
162 |
newEntry.checked = false; |
|
163 |
if ( enabledListOk && enabledIter != enabledList.constEnd() ) |
|
164 |
{ |
|
165 |
if (( *enabledIter ) == "enabled" ) |
|
166 |
{ |
|
167 |
newEntry.checked = true; |
|
168 |
} |
|
169 |
} |
|
170 | ||
171 |
//snap to vertex / segment / vertex and segment |
|
172 |
if ( snapToListOk && snapToIter != snapToList.constEnd() ) |
|
173 |
{ |
|
174 |
if (( *snapToIter ) == "to_vertex" ) |
|
175 |
{ |
|
176 |
newEntry.snapTo = 0; |
|
177 |
} |
|
178 |
else if (( *snapToIter ) == "to_segment" ) |
|
179 |
{ |
|
180 |
newEntry.snapTo = 1; |
|
181 |
} |
|
182 |
else //to vertex and segment |
|
183 |
{ |
|
184 |
newEntry.snapTo = 2; |
|
185 |
} |
|
186 |
} |
|
187 |
else |
|
188 |
{ |
|
189 |
newEntry.snapTo = 0; |
|
190 |
} |
|
191 | ||
192 |
//snap tolerance |
|
193 |
if ( toleranceListOk && tolIter != toleranceList.constEnd() ) |
|
194 |
{ |
|
195 |
newEntry.tolerance = tolIter->toDouble(); |
|
196 |
} |
|
197 |
else |
|
198 |
{ |
|
199 |
newEntry.tolerance = 0; |
|
200 |
} |
|
201 | ||
202 |
//snap tolerance unit |
|
203 |
if ( toleranceUnitListOk && tolUnitIter != toleranceUnitList.constEnd() ) |
|
204 |
{ |
|
205 |
newEntry.toleranceUnit = tolUnitIter->toInt(); |
|
206 |
} |
|
207 |
else |
|
208 |
{ |
|
209 |
newEntry.toleranceUnit = 0; |
|
210 |
} |
|
211 |
mSnappingLayerSettings.insert( *idIter, newEntry ); |
|
212 |
} |
|
213 |
} |
|
214 | ||
215 | 132 |
QStringList noIdentifyLayerIdList = QgsProject::instance()->readListEntry( "Identify", "/disabledLayers" ); |
216 | 133 | |
217 | 134 |
const QMap<QString, QgsMapLayer*> &mapLayers = QgsMapLayerRegistry::instance()->mapLayers(); |
... | ... | |
418 | 335 |
QgsProject::instance()->writeEntry( "Digitizing", "/AvoidIntersectionsList", avoidIntersectionList ); |
419 | 336 | |
420 | 337 | |
421 |
QMap<QString, LayerEntry>::const_iterator layerEntryIt; |
|
422 | ||
423 |
//store the layer snapping settings as string lists |
|
424 |
QStringList layerIdList; |
|
425 |
QStringList snapToList; |
|
426 |
QStringList toleranceList; |
|
427 |
QStringList enabledList; |
|
428 |
QStringList toleranceUnitList; |
|
429 | ||
430 |
for ( layerEntryIt = mSnappingLayerSettings.constBegin(); layerEntryIt != mSnappingLayerSettings.constEnd(); ++layerEntryIt ) |
|
431 |
{ |
|
432 |
layerIdList << layerEntryIt.key(); |
|
433 |
toleranceList << QString::number( layerEntryIt->tolerance, 'f' ); |
|
434 |
toleranceUnitList << QString::number(( int )layerEntryIt->toleranceUnit ); |
|
435 |
if ( layerEntryIt->checked ) |
|
436 |
{ |
|
437 |
enabledList << "enabled"; |
|
438 |
} |
|
439 |
else |
|
440 |
{ |
|
441 |
enabledList << "disabled"; |
|
442 |
} |
|
443 |
if ( layerEntryIt->snapTo == 0 ) |
|
444 |
{ |
|
445 |
snapToList << "to_vertex"; |
|
446 |
} |
|
447 |
else if ( layerEntryIt->snapTo == 1 ) |
|
448 |
{ |
|
449 |
snapToList << "to_segment"; |
|
450 |
} |
|
451 |
else //to vertex and segment |
|
452 |
{ |
|
453 |
snapToList << "to_vertex_and_segment"; |
|
454 |
} |
|
455 |
} |
|
456 | ||
457 |
if ( mSnappingLayerSettings.size() > 0 ) |
|
458 |
{ |
|
459 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingList", layerIdList ); |
|
460 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnapToList", snapToList ); |
|
461 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingToleranceList", toleranceList ); |
|
462 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingToleranceUnitList", toleranceUnitList ); |
|
463 |
QgsProject::instance()->writeEntry( "Digitizing", "/LayerSnappingEnabledList", enabledList ); |
|
464 |
} |
|
465 | ||
466 | 338 |
QStringList noIdentifyLayerList; |
467 | 339 |
for ( int i = 0; i < twIdentifyLayers->rowCount(); i++ ) |
468 | 340 |
{ |
... | ... | |
517 | 389 |
} |
518 | 390 |
} |
519 | 391 | |
520 |
void QgsProjectProperties::on_mSnappingOptionsPushButton_clicked() |
|
521 |
{ |
|
522 |
QgsSnappingDialog d( mMapCanvas, mSnappingLayerSettings ); |
|
523 |
if ( d.exec() == QDialog::Accepted ) |
|
524 |
{ |
|
525 |
//retrieve the new layer snapping settings from the dialog |
|
526 |
d.layerSettings( mSnappingLayerSettings ); |
|
527 |
} |
|
528 |
} |
|
529 | 392 | |
530 | 393 |
void QgsProjectProperties::on_cbxProjectionEnabled_stateChanged( int state ) |
531 | 394 |
{ |
src/app/qgisapp.h (Arbeitskopie) | ||
---|---|---|
67 | 67 |
class QNetworkProxy; |
68 | 68 |
class QAuthenticator; |
69 | 69 | |
70 |
class QgsSnappingDialog; |
|
70 | 71 |
class QgsGPSInformationWidget; |
71 | 72 | |
72 | 73 |
#include <QMainWindow> |
... | ... | |
78 | 79 |
#include "qgsconfig.h" |
79 | 80 |
#include "qgsfeature.h" |
80 | 81 |
#include "qgspoint.h" |
82 |
#include "qgssnappingdialog.h" |
|
81 | 83 | |
82 | 84 |
/*! \class QgisApp |
83 | 85 |
* \brief Main window for the Qgis application |
... | ... | |
242 | 244 |
QAction *actionDeletePart() { return mActionDeletePart; } |
243 | 245 |
QAction *actionNodeTool() { return mActionNodeTool; } |
244 | 246 |
QAction *actionEditSeparator2() { return mActionEditSeparator2; } |
247 |
QAction *actionSnappingOptions() { return mActionSnappingOptions; } |
|
248 |
QAction *actionEditSeparator4() { return mActionEditSeparator4; } |
|
245 | 249 | |
246 | 250 |
QAction *actionPan() { return mActionPan; } |
247 | 251 |
QAction *actionZoomIn() { return mActionZoomIn; } |
... | ... | |
618 | 622 |
void nodeTool(); |
619 | 623 |
//! activates the rotate points tool |
620 | 624 |
void rotatePointSymbols(); |
625 |
//! shows the snapping Options |
|
626 |
void snappingOptions(); |
|
621 | 627 | |
622 | 628 |
//! activates the selection tool |
623 | 629 |
void select(); |
... | ... | |
900 | 906 |
QAction *mActionNodeTool; |
901 | 907 |
QAction *mActionRotatePointSymbols; |
902 | 908 |
QAction *mActionEditSeparator3; |
909 |
QAction *mActionSnappingOptions; |
|
910 |
QAction *mActionEditSeparator4; |
|
903 | 911 | |
904 | 912 |
QAction *mActionPan; |
905 | 913 |
QAction *mActionZoomIn; |
... | ... | |
1015 | 1023 |
QDockWidget *mpTileScaleDock; |
1016 | 1024 |
QDockWidget *mpGpsDock; |
1017 | 1025 | |
1026 |
|
|
1018 | 1027 |
#ifdef Q_WS_MAC |
1019 | 1028 |
//! Window menu action to select this window |
1020 | 1029 |
QAction *mWindowAction; |
... | ... | |
1164 | 1173 |
static QgisApp *smInstance; |
1165 | 1174 | |
1166 | 1175 |
QgsUndoWidget* mUndoWidget; |
1167 | ||
1176 |
|
|
1177 |
QgsSnappingDialog* mSnappingDialog; |
|
1178 |
|
|
1168 | 1179 |
//! Persistent tile scale slider |
1169 | 1180 |
QgsTileScaleWidget * mpTileScaleWidget; |
1170 | 1181 |
src/app/qgssnappingdialog.h (Arbeitskopie) | ||
---|---|---|
20 | 20 | |
21 | 21 |
#include "ui_qgssnappingdialogbase.h" |
22 | 22 | |
23 |
class QDockWidget; |
|
24 | ||
23 | 25 |
class QgsMapCanvas; |
24 | 26 | |
25 | 27 |
struct LayerEntry |
... | ... | |
38 | 40 |
Q_OBJECT |
39 | 41 | |
40 | 42 |
public: |
41 |
/**Constructor |
|
42 |
@param canvas pointer to the map canvas (for detecting which vector layers are loaded
|
|
43 |
@param settings existing snapping layer settings*/
|
|
44 |
QgsSnappingDialog( QgsMapCanvas* canvas, const QMap<QString, LayerEntry >& settings );
|
|
43 |
|
|
44 |
//! Returns the instance pointer, creating the object on the first call
|
|
45 |
//static QgsSnappingDialog * instance( QgsMapCanvas* canvas );
|
|
46 |
QgsSnappingDialog( QWidget* parent, QgsMapCanvas* canvas );
|
|
45 | 47 |
~QgsSnappingDialog(); |
46 | 48 | |
47 | 49 |
/**Returns the snapping settings per layer. Key of the map is the layer id and value the |
48 | 50 |
corresponding layer entry*/ |
49 |
void layerSettings( QMap<QString, LayerEntry>& settings ) const; |
|
51 |
void layerSettings( ) ; |
|
52 |
|
|
53 |
public slots: |
|
54 |
/** |
|
55 |
* apply the changes |
|
56 |
*/ |
|
57 |
void apply ( ); |
|
58 |
/** |
|
59 |
* update the Dialog |
|
60 |
*/ |
|
61 |
void update( ); |
|
62 |
|
|
50 | 63 | |
64 | ||
65 |
protected: |
|
66 |
/**Constructor |
|
67 |
@param canvas pointer to the map canvas (for detecting which vector layers are loaded |
|
68 |
*/ |
|
69 |
//QgsSnappingDialog( QgsMapCanvas* canvas ); |
|
70 |
/** |
|
71 |
* Handle closing of the window |
|
72 |
* @param event unused |
|
73 |
*/ |
|
74 |
void closeEvent( QCloseEvent* event ); |
|
75 | ||
76 |
|
|
51 | 77 |
private: |
52 | 78 |
/**Default constructor forbidden*/ |
53 | 79 |
QgsSnappingDialog(); |
... | ... | |
55 | 81 |
QgsMapCanvas* mMapCanvas; |
56 | 82 |
/**Stores the layer ids from top to bottom*/ |
57 | 83 |
QStringList mLayerIds; |
84 |
|
|
85 |
QDockWidget *mDock; |
|
86 |
QMap<QString, LayerEntry> mSnappingLayerSettings; |
|
87 | ||
58 | 88 |
}; |
59 | 89 | |
60 | 90 |
#endif |
src/app/qgsprojectproperties.h (Arbeitskopie) | ||
---|---|---|
98 | 98 |
/*! |
99 | 99 |
* Slot to show dialog for the layer snapping options |
100 | 100 |
*/ |
101 |
void on_mSnappingOptionsPushButton_clicked(); |
|
101 |
// void on_mSnappingOptionsPushButton_clicked();
|
|
102 | 102 | |
103 | 103 |
void on_cbxProjectionEnabled_stateChanged( int state ); |
104 | 104 | |
... | ... | |
121 | 121 |
/**Snapping settings to pass/read from QgsSnappingDialog. |
122 | 122 |
Key is the layer id, the pair consists of snap to vertex = 0/snap to segment = 1, |
123 | 123 |
snapping tolerance*/ |
124 |
QMap<QString, LayerEntry> mSnappingLayerSettings; |
|
124 |
//QMap<QString, LayerEntry> mSnappingLayerSettings;
|
|
125 | 125 | |
126 | 126 |
/**Stores ids of layers where intersections of new polygons is considered. Is passed to / read from QgsAvoidIntersectionsDialog*/ |
127 | 127 |
QSet<QString> mAvoidIntersectionsSettings; |
src/app/qgisapp.cpp (Arbeitskopie) | ||
---|---|---|
162 | 162 |
#include "qgsquerybuilder.h" |
163 | 163 |
#include "qgsattributeaction.h" |
164 | 164 |
#include "qgsgpsinformationwidget.h" |
165 |
#include "qgssnappingdialog.h" |
|
165 | 166 | |
166 | 167 |
// |
167 | 168 |
// Gdal/Ogr includes |
... | ... | |
212 | 213 |
#include "qgsmaptoolsimplify.h" |
213 | 214 |
#include "qgsmeasuretool.h" |
214 | 215 | |
216 | ||
215 | 217 |
// |
216 | 218 |
// Conditional Includes |
217 | 219 |
// |
... | ... | |
413 | 415 |
// create undo widget |
414 | 416 |
mUndoWidget = new QgsUndoWidget( NULL, mMapCanvas ); |
415 | 417 |
mUndoWidget->setObjectName( "Undo" ); |
416 | ||
418 |
|
|
419 |
|
|
420 |
|
|
417 | 421 |
createActions(); |
418 | 422 |
createActionGroups(); |
419 | 423 |
createMenus(); |
... | ... | |
429 | 433 | |
430 | 434 |
addDockWidget( Qt::LeftDockWidgetArea, mUndoWidget ); |
431 | 435 |
mUndoWidget->hide(); |
432 | ||
436 |
|
|
437 |
mSnappingDialog = 0; |
|
438 |
mSnappingDialog = new QgsSnappingDialog ( this, mMapCanvas ); |
|
439 |
mSnappingDialog->setObjectName( "SnappingOption" ); |
|
440 |
|
|
433 | 441 |
mInternalClipboard = new QgsClipboard; // create clipboard |
434 | 442 |
mQgisInterface = new QgisAppInterface( this ); // create the interfce |
435 | 443 | |
... | ... | |
861 | 869 |
mActionRotatePointSymbols->setStatusTip( tr( "Rotate Point Symbols" ) ); |
862 | 870 |
connect( mActionRotatePointSymbols, SIGNAL( triggered() ), this, SLOT( rotatePointSymbols() ) ); |
863 | 871 |
mActionRotatePointSymbols->setEnabled( false ); |
872 |
|
|
873 |
mActionSnappingOptions = new QAction( getThemeIcon( "mActionSnappingOptions.png" ), tr( "Snapping Options..." ), this ); |
|
874 |
shortcuts->registerAction( mActionSnappingOptions ); |
|
875 |
mActionSnappingOptions->setStatusTip( tr( "Manage the background snapping options" ) ); |
|
876 |
connect( mActionSnappingOptions, SIGNAL( triggered() ), this, SLOT( snappingOptions() ) ); |
|
864 | 877 | |
865 | 878 |
// View Menu Items |
866 | 879 | |
... | ... | |
1428 | 1441 |
#endif |
1429 | 1442 | |
1430 | 1443 |
mActionEditSeparator2 = mEditMenu->addSeparator(); |
1431 | ||
1444 |
|
|
1432 | 1445 |
mEditMenu->addAction( mActionSimplifyFeature ); |
1433 | 1446 |
mEditMenu->addAction( mActionAddRing ); |
1434 | 1447 |
mEditMenu->addAction( mActionAddIsland ); |
... | ... | |
1441 | 1454 |
mEditMenu->addAction( mActionNodeTool ); |
1442 | 1455 |
mEditMenu->addAction( mActionRotatePointSymbols ); |
1443 | 1456 | |
1444 |
if ( layout == QDialogButtonBox::GnomeLayout || layout == QDialogButtonBox::MacLayout ) |
|
1457 |
QSettings myQsettings; |
|
1458 |
bool myDockFlag = myQsettings.value( "/qgis/dockSnapping", false ).toBool(); |
|
1459 |
if(!myDockFlag) |
|
1445 | 1460 |
{ |
1461 |
mActionEditSeparator4 = mEditMenu->addSeparator(); |
|
1462 |
mEditMenu->addAction( mActionSnappingOptions ); |
|
1463 |
} |
|
1464 | ||
1465 |
if( layout == QDialogButtonBox::GnomeLayout || layout == QDialogButtonBox::MacLayout ) |
|
1466 |
{ |
|
1446 | 1467 |
mActionEditSeparator3 = mEditMenu->addSeparator(); |
1447 | 1468 |
mEditMenu->addAction( mActionOptions ); |
1448 | 1469 |
mEditMenu->addAction( mActionConfigureShortcuts ); |
... | ... | |
2541 | 2562 |
abt->setVersion( versionString ); |
2542 | 2563 |
QString whatsNew = "<html><body>" ; |
2543 | 2564 |
whatsNew += "<h2>" + tr( "Version" ) + " " + QString( QGis::QGIS_VERSION ) + "</h2>"; |
2544 |
whatsNew += "<h2>" + trUtf8( "What's new in Version 1.6.0 'Capiapó'?" ) + "</h2>";
|
|
2565 |
whatsNew += "<h2>" + trUtf8( "What's new in Version 1.6.0 'Capiap贸'?" ) + "</h2>";
|
|
2545 | 2566 |
whatsNew += "<p>"; |
2546 | 2567 |
whatsNew += tr( "Please note that this is a release in our 'cutting edge' release series. As such it contains new features and extends the programmatic interface over QGIS 1.0.x and QGIS 1.5.0. We recommend that you use this version over previous releases." ); |
2547 | 2568 |
whatsNew += "</p>"; |
... | ... | |
4446 | 4467 |
mMapCanvas->setMapTool( mMapTools.mRotatePointSymbolsTool ); |
4447 | 4468 |
} |
4448 | 4469 | |
4470 |
void QgisApp::snappingOptions() |
|
4471 |
{ |
|
4472 |
mSnappingDialog->show(); |
|
4473 |
} |
|
4474 | ||
4449 | 4475 |
void QgisApp::splitFeatures() |
4450 | 4476 |
{ |
4451 | 4477 |
mMapCanvas->setMapTool( mMapTools.mSplitFeatures ); |
src/ui/qgsoptionsbase.ui (Arbeitskopie) | ||
---|---|---|
41 | 41 |
<height>32</height> |
42 | 42 |
</size> |
43 | 43 |
</property> |
44 |
<widget class="QWidget" name="tabWidgetPage1" native="true">
|
|
44 |
<widget class="QWidget" name="tabWidgetPage1"> |
|
45 | 45 |
<attribute name="icon"> |
46 | 46 |
<iconset resource="../../images/images.qrc"> |
47 | 47 |
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset> |
... | ... | |
59 | 59 |
<property name="geometry"> |
60 | 60 |
<rect> |
61 | 61 |
<x>0</x> |
62 |
<y>0</y>
|
|
63 |
<width>746</width>
|
|
64 |
<height>530</height>
|
|
62 |
<y>-126</y>
|
|
63 |
<width>744</width>
|
|
64 |
<height>574</height>
|
|
65 | 65 |
</rect> |
66 | 66 |
</property> |
67 | 67 |
<layout class="QGridLayout" name="gridLayout_12"> |
... | ... | |
247 | 247 |
</widget> |
248 | 248 |
</item> |
249 | 249 |
<item> |
250 |
<widget class="QCheckBox" name="cbxSnappingOptionsDocked"> |
|
251 |
<property name="text"> |
|
252 |
<string>Open snapping options in a dock window (QGIS restart required)</string> |
|
253 |
</property> |
|
254 |
</widget> |
|
255 |
</item> |
|
256 |
<item> |
|
250 | 257 |
<widget class="QCheckBox" name="cbxAttributeTableDocked"> |
251 | 258 |
<property name="text"> |
252 |
<string>Open attribute table in a dock window</string> |
|
259 |
<string>Open attribute table in a dock window (QGIS restart required)</string>
|
|
253 | 260 |
</property> |
254 | 261 |
</widget> |
255 | 262 |
</item> |
... | ... | |
318 | 325 |
</item> |
319 | 326 |
</layout> |
320 | 327 |
</widget> |
321 |
<widget class="QWidget" name="tabWidgetPage2" native="true">
|
|
328 |
<widget class="QWidget" name="tabWidgetPage2"> |
|
322 | 329 |
<attribute name="icon"> |
323 | 330 |
<iconset resource="../../images/images.qrc"> |
324 | 331 |
<normaloff>:/images/themes/default/propertyicons/rendering.png</normaloff>:/images/themes/default/propertyicons/rendering.png</iconset> |
... | ... | |
337 | 344 |
<rect> |
338 | 345 |
<x>0</x> |
339 | 346 |
<y>0</y> |
340 |
<width>746</width>
|
|
341 |
<height>473</height>
|
|
347 |
<width>621</width>
|
|
348 |
<height>479</height>
|
|
342 | 349 |
</rect> |
343 | 350 |
</property> |
344 | 351 |
<layout class="QGridLayout" name="gridLayout_8"> |
... | ... | |
489 | 496 |
</item> |
490 | 497 |
</layout> |
491 | 498 |
</widget> |
492 |
<widget class="QWidget" name="tabWidgetPage3" native="true">
|
|
499 |
<widget class="QWidget" name="tabWidgetPage3"> |
|
493 | 500 |
<attribute name="icon"> |
494 | 501 |
<iconset resource="../../images/images.qrc"> |
495 | 502 |
<normaloff>:/images/themes/default/propertyicons/map_tools.png</normaloff>:/images/themes/default/propertyicons/map_tools.png</iconset> |
... | ... | |
508 | 515 |
<rect> |
509 | 516 |
<x>0</x> |
510 | 517 |
<y>0</y> |
511 |
<width>746</width>
|
|
512 |
<height>490</height>
|
|
518 |
<width>541</width>
|
|
519 |
<height>496</height>
|
|
513 | 520 |
</rect> |
514 | 521 |
</property> |
515 | 522 |
<layout class="QGridLayout" name="gridLayout_4"> |
... | ... | |
769 | 776 |
</item> |
770 | 777 |
</layout> |
771 | 778 |
</widget> |
772 |
<widget class="QWidget" name="tabWidgetPage4" native="true">
|
|
779 |
<widget class="QWidget" name="tabWidgetPage4"> |
|
773 | 780 |
<attribute name="icon"> |
774 | 781 |
<iconset resource="../../images/images.qrc"> |
775 | 782 |
<normaloff>:/images/themes/default/propertyicons/overlay.png</normaloff>:/images/themes/default/propertyicons/overlay.png</iconset> |
... | ... | |
788 | 795 |
<rect> |
789 | 796 |
<x>0</x> |
790 | 797 |
<y>0</y> |
791 |
<width>762</width>
|
|
792 |
<height>448</height>
|
|
798 |
<width>277</width>
|
|
799 |
<height>87</height>
|
|
793 | 800 |
</rect> |
794 | 801 |
</property> |
795 | 802 |
<layout class="QGridLayout" name="gridLayout_10"> |
... | ... | |
844 | 851 |
</item> |
845 | 852 |
</layout> |
846 | 853 |
</widget> |
847 |
<widget class="QWidget" name="tabWidgetPage5" native="true">
|
|
854 |
<widget class="QWidget" name="tabWidgetPage5"> |
|
848 | 855 |
<attribute name="icon"> |
849 | 856 |
<iconset resource="../../images/images.qrc"> |
850 | 857 |
<normaloff>:/images/themes/default/propertyicons/digitising.png</normaloff>:/images/themes/default/propertyicons/digitising.png</iconset> |
... | ... | |
863 | 870 |
<rect> |
864 | 871 |
<x>0</x> |
865 | 872 |
<y>0</y> |
866 |
<width>762</width>
|
|
867 |
<height>448</height>
|
|
873 |
<width>744</width>
|
|
874 |
<height>454</height>
|
|
868 | 875 |
</rect> |
869 | 876 |
</property> |
870 | 877 |
<layout class="QGridLayout" name="gridLayout_13"> |
... | ... | |
1174 | 1181 |
</item> |
1175 | 1182 |
</layout> |
1176 | 1183 |
</widget> |
1177 |
<widget class="QWidget" name="tabWidgetPage6" native="true">
|
|
1184 |
<widget class="QWidget" name="tabWidgetPage6"> |
|
1178 | 1185 |
<attribute name="icon"> |
1179 | 1186 |
<iconset resource="../../images/images.qrc"> |
1180 | 1187 |
<normaloff>:/images/themes/default/propertyicons/CRS.png</normaloff>:/images/themes/default/propertyicons/CRS.png</iconset> |
... | ... | |
1193 | 1200 |
<rect> |
1194 | 1201 |
<x>0</x> |
1195 | 1202 |
<y>0</y> |
1196 |
<width>746</width>
|
|
1197 |
<height>531</height>
|
|
1203 |
<width>390</width>
|
|
1204 |
<height>563</height>
|
|
1198 | 1205 |
</rect> |
1199 | 1206 |
</property> |
1200 | 1207 |
<layout class="QGridLayout" name="gridLayout_15"> |
... | ... | |
1270 | 1277 |
</item> |
1271 | 1278 |
</layout> |
1272 | 1279 |
</widget> |
1273 |
<widget class="QWidget" name="tabWidgetPage7" native="true">
|
|
1280 |
<widget class="QWidget" name="tabWidgetPage7"> |
|
1274 | 1281 |
<attribute name="icon"> |
1275 | 1282 |
<iconset resource="../../images/images.qrc"> |
1276 | 1283 |
<normaloff>:/images/themes/default/propertyicons/locale.png</normaloff>:/images/themes/default/propertyicons/locale.png</iconset> |
... | ... | |
1289 | 1296 |
<rect> |
1290 | 1297 |
<x>0</x> |
1291 | 1298 |
<y>0</y> |
1292 |
<width>746</width>
|
|
1293 |
<height>548</height>
|
|
1299 |
<width>519</width>
|
|
1300 |
<height>565</height>
|
|
1294 | 1301 |
</rect> |
1295 | 1302 |
</property> |
1296 | 1303 |
<layout class="QGridLayout" name="gridLayout_17"> |
... | ... | |
1361 | 1368 |
</item> |
1362 | 1369 |
</layout> |
1363 | 1370 |
</widget> |
1364 |
<widget class="QWidget" name="tabWidgetPage8" native="true">
|
|
1371 |
<widget class="QWidget" name="tabWidgetPage8"> |
|
1365 | 1372 |
<attribute name="icon"> |
1366 | 1373 |
<iconset resource="../../images/images.qrc"> |
1367 | 1374 |
<normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</iconset> |
... | ... | |
1380 | 1387 |
<rect> |
1381 | 1388 |
<x>0</x> |
1382 | 1389 |
<y>0</y> |
1383 |
<width>746</width>
|
|
1384 |
<height>538</height>
|
|
1390 |
<width>352</width>
|
|
1391 |
<height>544</height>
|
|
1385 | 1392 |
</rect> |
1386 | 1393 |
</property> |
1387 | 1394 |
<layout class="QGridLayout" name="gridLayout_20"> |
src/ui/qgssnappingdialogbase.ui (Arbeitskopie) | ||
---|---|---|
1 |
<ui version="4.0" > |
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<ui version="4.0"> |
|
2 | 3 |
<class>QgsSnappingDialogBase</class> |
3 |
<widget class="QDialog" name="QgsSnappingDialogBase" >
|
|
4 |
<property name="geometry" >
|
|
4 |
<widget class="QDialog" name="QgsSnappingDialogBase"> |
|
5 |
<property name="geometry"> |
|
5 | 6 |
<rect> |
6 | 7 |
<x>0</x> |
7 | 8 |
<y>0</y> |
... | ... | |
9 | 10 |
<height>290</height> |
10 | 11 |
</rect> |
11 | 12 |
</property> |
12 |
<property name="windowTitle" >
|
|
13 |
<property name="windowTitle"> |
|
13 | 14 |
<string>Snapping options</string> |
14 | 15 |
</property> |
15 |
<layout class="QGridLayout" >
|
|
16 |
<property name="leftMargin" >
|
|
16 |
<layout class="QGridLayout"> |
|
17 |
<property name="margin">
|
|
17 | 18 |
<number>9</number> |
18 | 19 |
</property> |
19 |
<property name="topMargin" > |
|
20 |
<number>9</number> |
|
21 |
</property> |
|
22 |
<property name="rightMargin" > |
|
23 |
<number>9</number> |
|
24 |
</property> |
|
25 |
<property name="bottomMargin" > |
|
26 |
<number>9</number> |
|
27 |
</property> |
|
28 |
<property name="horizontalSpacing" > |
|
20 |
<property name="spacing"> |
|
29 | 21 |
<number>6</number> |
30 | 22 |
</property> |
31 |
<property name="verticalSpacing" > |
|
32 |
<number>6</number> |
|
33 |
</property> |
|
34 |
<item row="0" column="0" > |
|
35 |
<widget class="QTreeWidget" name="mLayerTreeWidget" > |
|
23 |
<item row="0" column="0"> |
|
24 |
<widget class="QTreeWidget" name="mLayerTreeWidget"> |
|
25 |
<property name="indentation"> |
|
26 |
<number>0</number> |
|
27 |
</property> |
|
28 |
<property name="rootIsDecorated"> |
|
29 |
<bool>false</bool> |
|
30 |
</property> |
|
36 | 31 |
<column> |
37 |
<property name="text" > |
|
32 |
<property name="text"> |
|
33 |
<string> </string> |
|
34 |
</property> |
|
35 |
</column> |
|
36 |
<column> |
|
37 |
<property name="text"> |
|
38 | 38 |
<string>Layer</string> |
39 | 39 |
</property> |
40 | 40 |
</column> |
41 | 41 |
<column> |
42 |
<property name="text" >
|
|
42 |
<property name="text"> |
|
43 | 43 |
<string>Mode</string> |
44 | 44 |
</property> |
45 | 45 |
</column> |
46 | 46 |
<column> |
47 |
<property name="text" >
|
|
47 |
<property name="text"> |
|
48 | 48 |
<string>Tolerance</string> |
49 | 49 |
</property> |
50 | 50 |
</column> |
51 | 51 |
<column> |
52 |
<property name="text" >
|
|
52 |
<property name="text"> |
|
53 | 53 |
<string>Units</string> |
54 | 54 |
</property> |
55 | 55 |
</column> |
56 | 56 |
</widget> |
57 | 57 |
</item> |
58 |
<item row="1" column="0" >
|
|
59 |
<widget class="QDialogButtonBox" name="mButtonBox" >
|
|
60 |
<property name="orientation" >
|
|
58 |
<item row="1" column="0"> |
|
59 |
<widget class="QDialogButtonBox" name="mButtonBox"> |
|
60 |
<property name="orientation"> |
|
61 | 61 |
<enum>Qt::Horizontal</enum> |
62 | 62 |
</property> |
63 |
<property name="standardButtons" >
|
|
64 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
|
|
63 |
<property name="standardButtons"> |
|
64 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
|
65 | 65 |
</property> |
66 | 66 |
</widget> |
67 | 67 |
</item> |
... | ... | |
75 | 75 |
<receiver>QgsSnappingDialogBase</receiver> |
76 | 76 |
<slot>accept()</slot> |
77 | 77 |
<hints> |
78 |
<hint type="sourcelabel" >
|
|
78 |
<hint type="sourcelabel"> |
|
79 | 79 |
<x>248</x> |
80 | 80 |
<y>254</y> |
81 | 81 |
</hint> |
82 |
<hint type="destinationlabel" >
|
|
82 |
<hint type="destinationlabel"> |
|
83 | 83 |
<x>157</x> |
84 | 84 |
<y>274</y> |
85 | 85 |
</hint> |
... | ... | |
91 | 91 |
<receiver>QgsSnappingDialogBase</receiver> |
92 | 92 |
<slot>reject()</slot> |
93 | 93 |
<hints> |
94 |
<hint type="sourcelabel" >
|
|
94 |
<hint type="sourcelabel"> |
|
95 | 95 |
<x>316</x> |
96 | 96 |
<y>260</y> |
97 | 97 |
</hint> |
98 |
<hint type="destinationlabel" >
|
|
98 |
<hint type="destinationlabel"> |
|
99 | 99 |
<x>286</x> |
100 | 100 |
<y>274</y> |
101 | 101 |
</hint> |
src/ui/qgsprojectpropertiesbase.ui (Arbeitskopie) | ||
---|---|---|
6 | 6 |
<rect> |
7 | 7 |
<x>0</x> |
8 | 8 |
<y>0</y> |
9 |
<width>552</width>
|
|
10 |
<height>525</height>
|
|
9 |
<width>555</width>
|
|
10 |
<height>538</height>
|
|
11 | 11 |
</rect> |
12 | 12 |
</property> |
13 | 13 |
<property name="windowTitle"> |
... | ... | |
301 | 301 |
</property> |
302 | 302 |
</widget> |
303 | 303 |
</item> |
304 |
<item row="2" column="0"> |
|
305 |
<widget class="QPushButton" name="mSnappingOptionsPushButton"> |
|
306 |
<property name="text"> |
|
307 |
<string>Snapping options...</string> |
|
308 |
</property> |
|
309 |
</widget> |
|
310 |
</item> |
|
311 | 304 |
</layout> |
312 | 305 |
</widget> |
313 | 306 |
</item> |
... | ... | |
413 | 406 |
<tabstop>spinBoxDP</tabstop> |
414 | 407 |
<tabstop>mEnableTopologicalEditingCheckBox</tabstop> |
415 | 408 |
<tabstop>mAvoidIntersectionsPushButton</tabstop> |
416 |
<tabstop>mSnappingOptionsPushButton</tabstop> |
|
417 | 409 |
<tabstop>cbxProjectionEnabled</tabstop> |
418 | 410 |
<tabstop>twIdentifyLayers</tabstop> |
419 | 411 |
<tabstop>tabWidget</tabstop> |