Skip to content
Permalink
Browse files

Add projectDirty signal for QgsProject

  • Loading branch information
NathanW2 committed Mar 5, 2018
1 parent c5fa66d commit 894c5506419a82a2c640bf32fda9aa781adfcbc0
Showing with 12 additions and 1 deletion.
  1. +5 −0 python/core/qgsproject.sip.in
  2. +1 −0 src/core/qgsproject.cpp
  3. +6 −1 src/core/qgsproject.h
@@ -1140,7 +1140,12 @@ advertised by this signal.
:param layers: List of QgsMapLayer which were added to the legend.
%End

void projectDirty( const bool dirty );
%Docstring
Emitted, when the project dirty status changes.

:param dirty: True if the project is in a dirty state and has pending unsaved changes.
%End

public slots:

@@ -414,6 +414,7 @@ bool QgsProject::isDirty() const
void QgsProject::setDirty( bool b )
{
mDirty = b;
emit projectDirty( mDirty );
}

void QgsProject::setFileName( const QString &name )
@@ -1090,7 +1090,12 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
*/
void legendLayersAdded( const QList<QgsMapLayer *> &layers );


/**
* Emitted when the project dirty status changes.
*
* \param dirty True if the project is in a dirty state and has pending unsaved changes.
*/

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Mar 5, 2018

Collaborator

\since 3.2

This comment has been minimized.

Copy link
@wonder-sk

wonder-sk Mar 5, 2018

Member

and maybe rename the signal to isDirtyChanged?

This comment has been minimized.

Copy link
@NathanW2

NathanW2 via email Mar 6, 2018

Author Member

This comment has been minimized.

Copy link
@nyalldawson

nyalldawson Mar 6, 2018

Collaborator

tenor

(^^ That's the true open-source way summarised in a single gif)

This comment has been minimized.

Copy link
@NathanW2

NathanW2 via email Mar 6, 2018

Author Member
void projectDirty( const bool dirty );

public slots:

0 comments on commit 894c550

Please sign in to comment.
You can’t perform that action at this time.