QGIS API Documentation  3.20.0-Odense (decaadbb31)
qgscustomprojectopenhandler.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscustomprojectopenhandler.h
3  ---------------------
4  begin : April 2020
5  copyright : (C) 2020 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSCUSTOMPROJECTOPENHANDLER_H
17 #define QGSCUSTOMPROJECTOPENHANDLER_H
18 
19 #include "qgis_gui.h"
20 #include <QStringList>
21 #include <QObject>
22 
37 class GUI_EXPORT QgsCustomProjectOpenHandler : public QObject
38 {
39  Q_OBJECT
40 
41  public:
42 
53  virtual bool handleProjectOpen( const QString &file ) = 0;
54 
60  virtual QStringList filters() const = 0;
61 
67  virtual bool createDocumentThumbnailAfterOpen() const;
68 
72  virtual QIcon icon() const;
73 };
74 
75 #endif // QgsCustomProjectOpenHandler_H
Abstract base class that may be implemented to handle new project file types within the QGIS applicat...
virtual QStringList filters() const =0
Returns file filters associated with this handler, e.g.
virtual bool handleProjectOpen(const QString &file)=0
Called when the specified project file has been opened within QGIS.