Skip to content

Commit d56ca40

Browse files
committedJul 22, 2016
Make filename in project properties a readonly line edit
(Because it's nice to be able to copy the project path easily)
1 parent 95fd61c commit d56ca40

File tree

2 files changed

+51
-60
lines changed

2 files changed

+51
-60
lines changed
 

‎src/app/qgsprojectproperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
154154

155155
mAutoTransaction->setChecked( QgsProject::instance()->autoTransaction() );
156156
title( QgsProject::instance()->title() );
157-
projectFileName->setText( QgsProject::instance()->fileName() );
157+
mProjectFileLineEdit->setText( QgsProject::instance()->fileName() );
158158

159159
// get the manner in which the number of decimal places in the mouse
160160
// position display is set (manual or automatic)

‎src/ui/qgsprojectpropertiesbase.ui

Lines changed: 50 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
</sizepolicy>
228228
</property>
229229
<property name="currentIndex">
230-
<number>7</number>
230+
<number>0</number>
231231
</property>
232232
<widget class="QWidget" name="mProjOpts_01">
233233
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -256,8 +256,8 @@
256256
<rect>
257257
<x>0</x>
258258
<y>0</y>
259-
<width>565</width>
260-
<height>685</height>
259+
<width>683</width>
260+
<height>779</height>
261261
</rect>
262262
</property>
263263
<layout class="QVBoxLayout" name="verticalLayout_8">
@@ -276,7 +276,7 @@
276276
<string notr="true">projgeneral</string>
277277
</property>
278278
<layout class="QGridLayout" name="gridLayout_26">
279-
<item row="2" column="0" colspan="4">
279+
<item row="2" column="0" colspan="5">
280280
<layout class="QHBoxLayout" name="horizontalLayout_5">
281281
<item>
282282
<widget class="QLabel" name="textLabel1">
@@ -363,32 +363,6 @@
363363
</item>
364364
</layout>
365365
</item>
366-
<item row="3" column="0">
367-
<widget class="QLabel" name="label_3">
368-
<property name="sizePolicy">
369-
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
370-
<horstretch>0</horstretch>
371-
<verstretch>0</verstretch>
372-
</sizepolicy>
373-
</property>
374-
<property name="text">
375-
<string>Save paths</string>
376-
</property>
377-
<property name="buddy">
378-
<cstring>cbxAbsolutePath</cstring>
379-
</property>
380-
</widget>
381-
</item>
382-
<item row="1" column="1" colspan="3">
383-
<widget class="QLineEdit" name="titleEdit">
384-
<property name="toolTip">
385-
<string>Descriptive project name</string>
386-
</property>
387-
<property name="text">
388-
<string>Default project title</string>
389-
</property>
390-
</widget>
391-
</item>
392366
<item row="1" column="0">
393367
<widget class="QLabel" name="label_2">
394368
<property name="sizePolicy">
@@ -400,9 +374,6 @@
400374
<property name="text">
401375
<string>Project title</string>
402376
</property>
403-
<property name="buddy">
404-
<cstring>projectFileName</cstring>
405-
</property>
406377
</widget>
407378
</item>
408379
<item row="0" column="0">
@@ -421,23 +392,7 @@
421392
</property>
422393
</widget>
423394
</item>
424-
<item row="0" column="1">
425-
<widget class="QLabel" name="projectFileName">
426-
<property name="sizePolicy">
427-
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
428-
<horstretch>0</horstretch>
429-
<verstretch>0</verstretch>
430-
</sizepolicy>
431-
</property>
432-
<property name="text">
433-
<string>Project title</string>
434-
</property>
435-
<property name="buddy">
436-
<cstring>titleEdit</cstring>
437-
</property>
438-
</widget>
439-
</item>
440-
<item row="3" column="2" colspan="2">
395+
<item row="3" column="3" colspan="2">
441396
<spacer>
442397
<property name="orientation">
443398
<enum>Qt::Horizontal</enum>
@@ -464,7 +419,23 @@
464419
</item>
465420
</widget>
466421
</item>
467-
<item row="4" column="0" colspan="4">
422+
<item row="3" column="0">
423+
<widget class="QLabel" name="label_3">
424+
<property name="sizePolicy">
425+
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
426+
<horstretch>0</horstretch>
427+
<verstretch>0</verstretch>
428+
</sizepolicy>
429+
</property>
430+
<property name="text">
431+
<string>Save paths</string>
432+
</property>
433+
<property name="buddy">
434+
<cstring>cbxAbsolutePath</cstring>
435+
</property>
436+
</widget>
437+
</item>
438+
<item row="4" column="0" colspan="5">
468439
<widget class="QCheckBox" name="mMapTileRenderingCheckBox">
469440
<property name="toolTip">
470441
<string>Checking this setting avoids visible edge artifacts when rendering this project as separate map tiles. Rendering performance will be degraded.</string>
@@ -474,6 +445,23 @@
474445
</property>
475446
</widget>
476447
</item>
448+
<item row="1" column="1" colspan="4">
449+
<widget class="QLineEdit" name="titleEdit">
450+
<property name="toolTip">
451+
<string>Descriptive project name</string>
452+
</property>
453+
<property name="text">
454+
<string>Default project title</string>
455+
</property>
456+
</widget>
457+
</item>
458+
<item row="0" column="1" colspan="4">
459+
<widget class="QLineEdit" name="mProjectFileLineEdit">
460+
<property name="readOnly">
461+
<bool>true</bool>
462+
</property>
463+
</widget>
464+
</item>
477465
</layout>
478466
</widget>
479467
</item>
@@ -758,8 +746,8 @@
758746
<rect>
759747
<x>0</x>
760748
<y>0</y>
761-
<width>294</width>
762-
<height>59</height>
749+
<width>368</width>
750+
<height>46</height>
763751
</rect>
764752
</property>
765753
<layout class="QVBoxLayout" name="verticalLayout_7">
@@ -903,8 +891,8 @@
903891
<rect>
904892
<x>0</x>
905893
<y>0</y>
906-
<width>676</width>
907-
<height>764</height>
894+
<width>379</width>
895+
<height>564</height>
908896
</rect>
909897
</property>
910898
<layout class="QVBoxLayout" name="verticalLayout_12">
@@ -1370,8 +1358,8 @@
13701358
<rect>
13711359
<x>0</x>
13721360
<y>0</y>
1373-
<width>676</width>
1374-
<height>2317</height>
1361+
<width>663</width>
1362+
<height>2249</height>
13751363
</rect>
13761364
</property>
13771365
<layout class="QVBoxLayout" name="verticalLayout_13">
@@ -2436,8 +2424,8 @@
24362424
<rect>
24372425
<x>0</x>
24382426
<y>0</y>
2439-
<width>676</width>
2440-
<height>764</height>
2427+
<width>168</width>
2428+
<height>46</height>
24412429
</rect>
24422430
</property>
24432431
<layout class="QVBoxLayout" name="verticalLayout_17">
@@ -2620,6 +2608,7 @@
26202608
<tabstops>
26212609
<tabstop>mOptionsListWidget</tabstop>
26222610
<tabstop>scrollArea_2</tabstop>
2611+
<tabstop>mProjectFileLineEdit</tabstop>
26232612
<tabstop>titleEdit</tabstop>
26242613
<tabstop>pbnSelectionColor</tabstop>
26252614
<tabstop>pbnCanvasColor</tabstop>
@@ -2723,6 +2712,8 @@
27232712
<tabstop>mWMSInspireMetadataUrlType</tabstop>
27242713
<tabstop>pbnLaunchOWSChecker</tabstop>
27252714
<tabstop>teOWSChecker</tabstop>
2715+
<tabstop>mAutoTransaction</tabstop>
2716+
<tabstop>mEvaluateDefaultValues</tabstop>
27262717
</tabstops>
27272718
<resources>
27282719
<include location="../../images/images.qrc"/>

0 commit comments

Comments
 (0)
Please sign in to comment.