File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -277,5 +277,26 @@ class QgisInterface : QObject
277
277
/**This signal is emitted when QGIS' initialization is complete
278
278
@note added in version 1.6*/
279
279
void initializationCompleted();
280
+
281
+ /** emitted when a project file is successfully read
282
+ @note
283
+ This is useful for plug-ins that store properties with project files. A
284
+ plug-in can connect to this signal. When it is emitted, the plug-in
285
+ knows to then check the project properties for any relevant state.
286
+
287
+ Added in v1.6
288
+ */
289
+ void projectRead();
290
+ /** emitted when starting an entirely new project
291
+ @note
292
+ This is similar to projectRead(); plug-ins might want to be notified
293
+ that they're in a new project. Yes, projectRead() could have been
294
+ overloaded to be used in the case of new projects instead. However,
295
+ it's probably more semantically correct to have an entirely separate
296
+ signal for when this happens.
297
+
298
+ Added in v1.6
299
+ */
300
+ void newProjectCreated();
280
301
};
281
302
Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
52
52
this , SIGNAL ( composerWillBeRemoved ( QgsComposerView* ) ) );
53
53
connect ( qgis, SIGNAL ( initializationCompleted () ),
54
54
this , SIGNAL ( initializationCompleted () ) );
55
+ connect ( qgis, SIGNAL ( newProject () ),
56
+ this , SIGNAL ( newProjectCreated () ) );
57
+ connect ( qgis, SIGNAL ( projectRead () ),
58
+ this , SIGNAL ( projectRead () ) );
55
59
}
56
60
57
61
QgisAppInterface::~QgisAppInterface ()
Original file line number Diff line number Diff line change @@ -322,6 +322,27 @@ class GUI_EXPORT QgisInterface : public QObject
322
322
/* *This signal is emitted when the initialization is complete
323
323
@note added in version 1.6*/
324
324
void initializationCompleted ();
325
+ /* * emitted when a project file is successfully read
326
+ @note
327
+ This is useful for plug-ins that store properties with project files. A
328
+ plug-in can connect to this signal. When it is emitted, the plug-in
329
+ knows to then check the project properties for any relevant state.
330
+
331
+ Added in v1.6
332
+ */
333
+ void projectRead ();
334
+ /* * emitted when starting an entirely new project
335
+ @note
336
+ This is similar to projectRead(); plug-ins might want to be notified
337
+ that they're in a new project. Yes, projectRead() could have been
338
+ overloaded to be used in the case of new projects instead. However,
339
+ it's probably more semantically correct to have an entirely separate
340
+ signal for when this happens.
341
+
342
+ Added in v1.6
343
+ */
344
+ void newProjectCreated ();
345
+
325
346
};
326
347
327
348
// FIXME: also in core/qgis.h
You can’t perform that action at this time.
0 commit comments