QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsfindfilesbypatternwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsfindfilesbypatternwidget.h
3 -----------------------------
4 begin : April 2019
5 copyright : (C) 2019 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 QGSFINDFILESBYPATTERNWIDGET_H
17#define QGSFINDFILESBYPATTERNWIDGET_H
18
19#include "ui_qgsfindfilesbypatternwidget.h"
20
21#include "qgis_gui.h"
22
23#include <QDialog>
24
25class QDialogButtonBox;
26
33class GUI_EXPORT QgsFindFilesByPatternWidget : public QWidget, private Ui::QgsFindFilesByPatternWidgetBase
34{
35 Q_OBJECT
36
37 public:
41 QgsFindFilesByPatternWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
42
48 QStringList files() const { return mFiles; }
49
50 signals:
51
60 void findComplete( const QStringList &files );
61
62 private slots:
63
64 void find();
65 void cancel();
66
67 private:
68 bool mCanceled = false;
69 QStringList mFiles;
70};
71
78class GUI_EXPORT QgsFindFilesByPatternDialog : public QDialog
79{
80 Q_OBJECT
81
82 public:
86 QgsFindFilesByPatternDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr );
87
92 QStringList files() const;
93
94 private:
95 QgsFindFilesByPatternWidget *mWidget = nullptr;
96 QDialogButtonBox *mButtonBox = nullptr;
97};
98
99#endif // QGSFINDFILESBYPATTERNWIDGET_H
QStringList files() const
Returns the list of files found by the dialog.
QgsFindFilesByPatternDialog(QWidget *parent SIP_TRANSFERTHIS=nullptr)
Constructor for QgsFindFilesByPatternDialog, with the specified parent widget.
A reusable widget for finding files (recursively) by file pattern.
QStringList files() const
Returns the list of files found by the dialog.
void findComplete(const QStringList &files)
Emitted after files are found in the dialog.
QgsFindFilesByPatternWidget(QWidget *parent SIP_TRANSFERTHIS=nullptr)
Constructor for QgsFindFilesByPatternWidget, with the specified parent widget.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53