mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
76 lines
2.8 KiB
Plaintext
76 lines
2.8 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgscustomprojectopenhandler.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
class QgsCustomProjectOpenHandler : QObject
|
|
{
|
|
%Docstring(signature="appended")
|
|
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 :py:func:`~filters` implementation, and then implement
|
|
:py:func:`~handleProjectOpen` to open the associated files.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgscustomprojectopenhandler.h"
|
|
%End
|
|
public:
|
|
virtual bool handleProjectOpen( const QString &file ) = 0;
|
|
%Docstring
|
|
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.
|
|
%End
|
|
|
|
virtual QStringList filters() const = 0;
|
|
%Docstring
|
|
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.
|
|
%End
|
|
|
|
virtual bool createDocumentThumbnailAfterOpen() const;
|
|
%Docstring
|
|
Returns ``True`` if a document thumbnail should automatically be created
|
|
after opening the project.
|
|
|
|
The default behavior is to return ``False``.
|
|
%End
|
|
|
|
virtual QIcon icon() const;
|
|
%Docstring
|
|
Returns a custom icon used to represent this handler.
|
|
%End
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgscustomprojectopenhandler.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|