Skip to content

Commit 0164058

Browse files
committed
make raster source in General tab enabled (but read-only), so it can be copied ; add vector source to vector properties General tab, make UI consistent with that of raster properties
1 parent cf9a1b5 commit 0164058

File tree

3 files changed

+97
-79
lines changed

3 files changed

+97
-79
lines changed

src/app/qgsvectorlayerproperties.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ void QgsVectorLayerProperties::reset( void )
327327
// populate the general information
328328
mLayerOrigNameLineEdit->setText( layer->originalName() );
329329
txtDisplayName->setText( layer->name() );
330+
txtLayerSource->setText( layer->publicSource() );
330331
pbnQueryBuilder->setWhatsThis( tr( "This button opens the query "
331332
"builder and allows you to create a subset of features to display on "
332333
"the map canvas rather than displaying all features in the layer" ) );

src/ui/qgsrasterlayerpropertiesbase.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@
265265
</item>
266266
<item row="1" column="1" colspan="3">
267267
<widget class="QLineEdit" name="leLayerSource">
268-
<property name="enabled">
269-
<bool>false</bool>
268+
<property name="readOnly">
269+
<bool>true</bool>
270270
</property>
271271
</widget>
272272
</item>

src/ui/qgsvectorlayerpropertiesbase.ui

Lines changed: 94 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@
264264
<rect>
265265
<x>0</x>
266266
<y>0</y>
267-
<width>785</width>
268-
<height>755</height>
267+
<width>792</width>
268+
<height>774</height>
269269
</rect>
270270
</property>
271271
<layout class="QVBoxLayout" name="verticalLayout_13">
@@ -283,73 +283,90 @@
283283
<property name="syncGroup" stdset="0">
284284
<string notr="true">vectorgeneral</string>
285285
</property>
286-
<layout class="QVBoxLayout" name="verticalLayout_4">
287-
<item>
288-
<layout class="QHBoxLayout" name="horizontalLayout_2">
286+
<layout class="QGridLayout" name="gridLayout">
287+
<item row="1" column="0">
288+
<widget class="QLabel" name="textLabel3">
289+
<property name="text">
290+
<string>Layer name</string>
291+
</property>
292+
</widget>
293+
</item>
294+
<item row="5" column="0">
295+
<widget class="QFrame" name="mDataSourceEncodingFrame">
296+
<layout class="QHBoxLayout" name="horizontalLayout_4">
297+
<property name="margin">
298+
<number>0</number>
299+
</property>
300+
</layout>
301+
</widget>
302+
</item>
303+
<item row="1" column="1">
304+
<widget class="QLineEdit" name="mLayerOrigNameLineEdit"/>
305+
</item>
306+
<item row="1" column="3">
307+
<widget class="QLineEdit" name="txtDisplayName">
308+
<property name="readOnly">
309+
<bool>true</bool>
310+
</property>
311+
</widget>
312+
</item>
313+
<item row="1" column="2">
314+
<widget class="QLabel" name="label_2">
315+
<property name="text">
316+
<string>displayed as</string>
317+
</property>
318+
</widget>
319+
</item>
320+
<item row="2" column="0">
321+
<widget class="QLabel" name="lblLayerSource">
322+
<property name="text">
323+
<string>Layer source</string>
324+
</property>
325+
</widget>
326+
</item>
327+
<item row="2" column="1" colspan="3">
328+
<widget class="QLineEdit" name="txtLayerSource">
329+
<property name="enabled">
330+
<bool>true</bool>
331+
</property>
332+
<property name="readOnly">
333+
<bool>true</bool>
334+
</property>
335+
</widget>
336+
</item>
337+
<item row="4" column="0" colspan="4">
338+
<layout class="QHBoxLayout" name="horizontalLayout_6">
289339
<item>
290-
<widget class="QLabel" name="textLabel3">
340+
<widget class="QLabel" name="label_3">
341+
<property name="sizePolicy">
342+
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
343+
<horstretch>0</horstretch>
344+
<verstretch>0</verstretch>
345+
</sizepolicy>
346+
</property>
291347
<property name="text">
292-
<string>Layer name</string>
348+
<string>Data source encoding</string>
293349
</property>
294350
</widget>
295351
</item>
296352
<item>
297-
<widget class="QLineEdit" name="mLayerOrigNameLineEdit"/>
353+
<widget class="QComboBox" name="cboProviderEncoding"/>
298354
</item>
299355
<item>
300-
<widget class="QLabel" name="label_2">
301-
<property name="text">
302-
<string>displayed as</string>
356+
<spacer name="horizontalSpacer_2">
357+
<property name="orientation">
358+
<enum>Qt::Horizontal</enum>
303359
</property>
304-
</widget>
305-
</item>
306-
<item>
307-
<widget class="QLineEdit" name="txtDisplayName">
308-
<property name="readOnly">
309-
<bool>true</bool>
360+
<property name="sizeHint" stdset="0">
361+
<size>
362+
<width>0</width>
363+
<height>20</height>
364+
</size>
310365
</property>
311-
</widget>
366+
</spacer>
312367
</item>
313368
</layout>
314369
</item>
315-
<item>
316-
<widget class="QFrame" name="mDataSourceEncodingFrame">
317-
<layout class="QHBoxLayout" name="horizontalLayout_4">
318-
<property name="margin">
319-
<number>0</number>
320-
</property>
321-
<item>
322-
<widget class="QLabel" name="label_3">
323-
<property name="sizePolicy">
324-
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
325-
<horstretch>0</horstretch>
326-
<verstretch>0</verstretch>
327-
</sizepolicy>
328-
</property>
329-
<property name="text">
330-
<string>Data source encoding</string>
331-
</property>
332-
</widget>
333-
</item>
334-
<item>
335-
<widget class="QComboBox" name="cboProviderEncoding"/>
336-
</item>
337-
<item>
338-
<spacer name="horizontalSpacer_2">
339-
<property name="orientation">
340-
<enum>Qt::Horizontal</enum>
341-
</property>
342-
<property name="sizeHint" stdset="0">
343-
<size>
344-
<width>0</width>
345-
<height>20</height>
346-
</size>
347-
</property>
348-
</spacer>
349-
</item>
350-
</layout>
351-
</widget>
352-
</item>
353370
</layout>
354371
</widget>
355372
</item>
@@ -451,12 +468,12 @@
451468
<string notr="true">vectorgeneral</string>
452469
</property>
453470
<layout class="QGridLayout" name="_5">
454-
<property name="verticalSpacing">
455-
<number>6</number>
456-
</property>
457471
<property name="margin">
458472
<number>11</number>
459473
</property>
474+
<property name="verticalSpacing">
475+
<number>6</number>
476+
</property>
460477
<item row="0" column="4">
461478
<widget class="QLabel" name="textLabel1_2_2_2">
462479
<property name="toolTip">
@@ -689,8 +706,8 @@
689706
<rect>
690707
<x>0</x>
691708
<y>0</y>
692-
<width>949</width>
693-
<height>776</height>
709+
<width>84</width>
710+
<height>16</height>
694711
</rect>
695712
</property>
696713
<layout class="QVBoxLayout" name="verticalLayout_18">
@@ -750,8 +767,8 @@
750767
<rect>
751768
<x>0</x>
752769
<y>0</y>
753-
<width>949</width>
754-
<height>776</height>
770+
<width>84</width>
771+
<height>16</height>
755772
</rect>
756773
</property>
757774
<layout class="QVBoxLayout" name="verticalLayout_19">
@@ -805,8 +822,8 @@
805822
<rect>
806823
<x>0</x>
807824
<y>0</y>
808-
<width>949</width>
809-
<height>776</height>
825+
<width>133</width>
826+
<height>37</height>
810827
</rect>
811828
</property>
812829
<layout class="QVBoxLayout" name="verticalLayout_28">
@@ -882,8 +899,8 @@
882899
<rect>
883900
<x>0</x>
884901
<y>0</y>
885-
<width>949</width>
886-
<height>776</height>
902+
<width>84</width>
903+
<height>16</height>
887904
</rect>
888905
</property>
889906
<layout class="QVBoxLayout" name="verticalLayout_20">
@@ -937,8 +954,8 @@
937954
<rect>
938955
<x>0</x>
939956
<y>0</y>
940-
<width>949</width>
941-
<height>776</height>
957+
<width>473</width>
958+
<height>186</height>
942959
</rect>
943960
</property>
944961
<layout class="QVBoxLayout" name="verticalLayout_26">
@@ -1111,8 +1128,8 @@
11111128
<rect>
11121129
<x>0</x>
11131130
<y>0</y>
1114-
<width>949</width>
1115-
<height>776</height>
1131+
<width>84</width>
1132+
<height>16</height>
11161133
</rect>
11171134
</property>
11181135
<layout class="QVBoxLayout" name="verticalLayout_21">
@@ -1172,8 +1189,8 @@
11721189
<rect>
11731190
<x>0</x>
11741191
<y>0</y>
1175-
<width>949</width>
1176-
<height>776</height>
1192+
<width>134</width>
1193+
<height>155</height>
11771194
</rect>
11781195
</property>
11791196
<layout class="QVBoxLayout" name="verticalLayout_23">
@@ -1287,8 +1304,8 @@
12871304
<rect>
12881305
<x>0</x>
12891306
<y>0</y>
1290-
<width>949</width>
1291-
<height>776</height>
1307+
<width>84</width>
1308+
<height>16</height>
12921309
</rect>
12931310
</property>
12941311
<layout class="QVBoxLayout" name="verticalLayout_24">
@@ -1348,8 +1365,8 @@
13481365
<rect>
13491366
<x>0</x>
13501367
<y>0</y>
1351-
<width>949</width>
1352-
<height>776</height>
1368+
<width>186</width>
1369+
<height>249</height>
13531370
</rect>
13541371
</property>
13551372
<layout class="QVBoxLayout" name="verticalLayout_8">

0 commit comments

Comments
 (0)