QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
Abstract base class that may be implemented to handle new project file types within the QGIS application. More...
#include <qgscustomprojectopenhandler.h>
Public Member Functions | |
virtual bool | createDocumentThumbnailAfterOpen () const |
Returns true if a document thumbnail should automatically be created after opening the project. More... | |
virtual QStringList | filters () const =0 |
Returns file filters associated with this handler, e.g. More... | |
virtual bool | handleProjectOpen (const QString &file)=0 |
Called when the specified project file has been opened within QGIS. More... | |
virtual QIcon | icon () const |
Returns a custom icon used to represent this handler. More... | |
Abstract base class that may be implemented to handle new project file types within the QGIS application.
This interface allows extending the QGIS interface by adding support for opening additional (non QGS/QGZ) project files, e.g. allowing plugins to add support for opening other vendor project formats (such as ArcGIS MXD documents or MapInfo WOR workspaces).
Handler implementations should indicate the file types they support via their filters() implementation, and then implement handleProjectOpen() to open the associated files.
Definition at line 37 of file qgscustomprojectopenhandler.h.
|
virtual |
Returns true
if a document thumbnail should automatically be created after opening the project.
The default behavior is to return false
.
Definition at line 19 of file qgscustomprojectopenhandler.cpp.
|
pure virtual |
Returns file filters associated with this handler, e.g.
"MXD Documents (*.mxd)", "MapInfo Workspaces (*.wor)".
Each individual filter should be reflected as one entry in the returned list.
|
pure virtual |
Called when the specified project file has been opened within QGIS.
If true
is returned, then the handler has accepted this file and it should not be further processed (e.g. by other QgsCustomProjectOpenHandler).
It it is the subclasses' responsibility to ignore file types it cannot handle by returning false
for these.
The base class implementation does nothing.
|
virtual |
Returns a custom icon used to represent this handler.
Definition at line 24 of file qgscustomprojectopenhandler.cpp.