QGIS API Documentation 4.5.0-Master (f3f69a543c6)
Loading...
Searching...
No Matches
qgsfilefiltergenerator.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfilefiltergenerator.h
3 ------------------------
4 begin : March 2020
5 copyright : (C) 2020 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSFILEFILTERGENERATOR_H
19#define QGSFILEFILTERGENERATOR_H
20
21#include "qgis_core.h"
22
23#include <QCoreApplication>
24#include <QString>
25
35class CORE_EXPORT QgsFileFilterGenerator
36{
37 Q_DECLARE_TR_FUNCTIONS( QgsFileFilterGenerator )
38
39 public:
40 virtual ~QgsFileFilterGenerator() = default;
41
46 virtual QString createFileFilter() const = 0;
47
54 {
55 QML,
56 HTML,
57 TXT,
58 SLD,
59 QgisStyleDbExport,
60 AllFiles,
61 };
62
68 static QString fileFilter( QgsFileFilterGenerator::StandardFileFormat format );
69
77 static QString filterString( const QList< QgsFileFilterGenerator::StandardFileFormat > &formats, bool includeAllFiles = false );
78};
79
80#endif // QGSPROCESSINGUTILS_H
Abstract interface for classes which generate a file filter string.
virtual QString createFileFilter() const =0
This method needs to be reimplemented in all classes which implement this interface and return a file...
virtual ~QgsFileFilterGenerator()=default
StandardFileFormat
Standard file filters.