QGIS API Documentation 3.41.0-Master (57ec4277f5e)
Loading...
Searching...
No Matches
qgssubstitutionlistwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssubstitutionlistwidget.h
3 ---------------------------
4 begin : August 2016
5 copyright : (C) 2016 Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18#ifndef QGSSUBSTITUTIONLISTWIDGET_H
19#define QGSSUBSTITUTIONLISTWIDGET_H
20
21#include <QDialog>
22#include "qgis_sip.h"
23#include "qgspanelwidget.h"
24#include "ui_qgssubstitutionlistwidgetbase.h"
25#include "qgsstringutils.h"
26#include "qgis_gui.h"
27
35class GUI_EXPORT QgsSubstitutionListWidget : public QgsPanelWidget, private Ui::QgsSubstitutionListWidgetBase
36{
37 Q_OBJECT
38 Q_PROPERTY( QgsStringReplacementCollection substitutions READ substitutions WRITE setSubstitutions NOTIFY substitutionsChanged )
39
40 public:
45 QgsSubstitutionListWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
46
52 void setSubstitutions( const QgsStringReplacementCollection &substitutions );
53
58 QgsStringReplacementCollection substitutions() const;
59
60 signals:
61
64
65 private slots:
66
67 void mButtonAdd_clicked();
68 void mButtonRemove_clicked();
69 void tableChanged();
70 void mButtonExport_clicked();
71 void mButtonImport_clicked();
72
73 private:
74 void addSubstitution( const QgsStringReplacement &substitution );
75};
76
84class GUI_EXPORT QgsSubstitutionListDialog : public QDialog
85{
86 Q_OBJECT
87 Q_PROPERTY( QgsStringReplacementCollection substitutions READ substitutions WRITE setSubstitutions )
88
89 public:
94 QgsSubstitutionListDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr );
95
101 void setSubstitutions( const QgsStringReplacementCollection &substitutions );
102
107 QgsStringReplacementCollection substitutions() const;
108
109
110 private:
111 QgsSubstitutionListWidget *mWidget = nullptr;
112};
113
114#endif // QGSSUBSTITUTIONLISTWIDGET_H
Base class for any widget that can be shown as a inline panel.
A collection of string replacements (specified using QgsStringReplacement objects).
A representation of a single string replacement.
A dialog which allows users to specify a list of substitutions to apply to a string,...
A widget which allows users to specify a list of substitutions to apply to a string,...
void substitutionsChanged(const QgsStringReplacementCollection &substitutions)
Emitted when the substitution definitions change.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53