QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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 "ui_qgssubstitutionlistwidgetbase.h"
22
23#include "qgis_gui.h"
24#include "qgis_sip.h"
25#include "qgspanelwidget.h"
26#include "qgsstringutils.h"
27
28#include <QDialog>
29
37class GUI_EXPORT QgsSubstitutionListWidget : public QgsPanelWidget, private Ui::QgsSubstitutionListWidgetBase
38{
39 Q_OBJECT
41
42 public:
47 QgsSubstitutionListWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
48
55
61
62 signals:
63
66
67 private slots:
68
69 void mButtonAdd_clicked();
70 void mButtonRemove_clicked();
71 void tableChanged();
72 void mButtonExport_clicked();
73 void mButtonImport_clicked();
74
75 private:
76 void addSubstitution( const QgsStringReplacement &substitution );
77};
78
86class GUI_EXPORT QgsSubstitutionListDialog : public QDialog
87{
88 Q_OBJECT
90
91 public:
96 QgsSubstitutionListDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr );
97
104
110
111
112 private:
113 QgsSubstitutionListWidget *mWidget = nullptr;
114};
115
116#endif // QGSSUBSTITUTIONLISTWIDGET_H
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
A collection of string replacements (specified using QgsStringReplacement objects).
A representation of a single string replacement.
QgsSubstitutionListDialog(QWidget *parent=nullptr)
Constructor for QgsSubstitutionListDialog.
QgsStringReplacementCollection substitutions
void setSubstitutions(const QgsStringReplacementCollection &substitutions)
Sets the list of substitutions to show in the dialog.
A widget which allows users to specify a list of substitutions to apply to a string,...
QgsSubstitutionListWidget(QWidget *parent=nullptr)
Constructor for QgsSubstitutionListWidget.
void setSubstitutions(const QgsStringReplacementCollection &substitutions)
Sets the list of substitutions to show in the widget.
void substitutionsChanged(const QgsStringReplacementCollection &substitutions)
Emitted when the substitution definitions change.
QgsStringReplacementCollection substitutions
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53