12 Commits

Author SHA1 Message Date
Nyall Dawson
99faf06f60 Make project title getters/setters a shortcut to metadata title field
And silently upgrade old project titles to metadata titles
2018-03-22 16:13:30 +11:00
Nyall Dawson
bba3f6c6fe Add QgsProjectMetadata member to QgsProject 2018-03-22 16:13:30 +11:00
Nyall Dawson
60afeadf44 Add QgsProjectDirtyBlocker and QgsProject.blockDirtying to prevent
project dirtying for the lifetime of an object

Python code can then call:

    project = QgsProject.instance()
    with QgsProject.blockDirtying(project):
      # do something

Use QgsProjectDirtyBlocker to prevent projects being marked as
dirty while creating a new project or while loading an existing
project -- avoids the titlebar temporarily showing the project
state as unsaved while it is being loaded.
2018-03-11 08:44:51 +11:00
Nyall Dawson
4e5c08e2b5 [FEATURE] Allow overwriting the project home path
This allows the project home path (which is used by the browser
to create the 'Project Home' item) to be set by users for a
project, instead of always matching the location where the project
is saved.

This allows users to set the project home to a folder which contains
data and other content, and is especially useful for organisations
where qgis projects are not stored in the root folder of a organisational
'project'.

Project home paths can also be set to relative paths, in which
case they will be relative to the project saved location.

The path can be set through the Project Properties dialog, or
by right-clicking on the Project Home browser item and
selecting 'set project home'

Sponsored by SMEC/SJ
2018-03-09 11:15:55 +11:00
Nyall Dawson
a30403dcbe Rename QgsProject::projectDirty to isDirtyChanged
Also show unsaved status in title bar even when project has
not been first saved
2018-03-06 11:57:51 +10:00
Nyall Dawson
f2a6780973 Sipify and style 2018-03-05 19:15:06 +10:00
Nathan Woodrow
894c550641 Add projectDirty signal for QgsProject 2018-03-05 15:13:00 +10:00
Denis Rouzaud
95ab3d05e0 doxymentation and better wording 2018-02-28 13:43:10 -04:00
Denis Rouzaud
b95f5c1a15 QgsReadWriteContext: add a category stack to know where the error message comes from
also change the QPair in favor of a struct for a better API
2018-02-28 13:43:10 -04:00
Denis Rouzaud
22008a5114 doxymentation 2018-02-28 13:43:10 -04:00
Denis Rouzaud
d421b857e5 QgsReadWriteContext can store message
app will show them in message bar when loading layers
2018-02-28 13:43:10 -04:00
Denis Rouzaud
7722010ca8 rename *.sip to *.sip.in for the auto generated sip files 2018-01-17 10:16:37 -04:00