QGIS API Documentation 3.43.0-Master (b60ef06885e)
qgsrelationreferenceconfigdlg.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrelationreferenceconfigdlg.h
3 --------------------------------------
4 Date : 21.4.2013
5 Copyright : (C) 2013 Matthias Kuhn
6 Email : matthias at opengis dot ch
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 QGSRELATIONREFERENCECONFIGDLGBASE_H
17#define QGSRELATIONREFERENCECONFIGDLGBASE_H
18
19#include <QListWidget>
20
21#include "ui_qgsrelationreferenceconfigdlgbase.h"
23#include "qgis_gui.h"
24
26
34class GUI_EXPORT QgsRelationReferenceConfigDlg : public QgsEditorConfigWidget, private Ui::QgsRelReferenceConfigDlgBase
35{
36 Q_OBJECT
37
38 public:
39 explicit QgsRelationReferenceConfigDlg( QgsVectorLayer *vl, int fieldIdx, QWidget *parent );
40 QVariantMap config() override;
41 void setConfig( const QVariantMap &config ) override;
42
43 private:
44 void loadFields();
45 void addFilterField( const QString &field );
46 void addFilterField( QListWidgetItem *item );
47 int indexFromListWidgetItem( QListWidgetItem *item );
48
49 QgsVectorLayer *mReferencedLayer = nullptr;
50 bool mAllowNullWasSetByConfig = false;
51
52 private slots:
53 void relationChanged( int idx );
54 void mAddFilterButton_clicked();
55 void mRemoveFilterButton_clicked();
56
60 void mEditExpression_clicked();
61
62 friend class TestQgsRelationReferenceWidget;
63};
64
65#endif // QGSRELATIONREFERENCECONFIGDLGBASE_H
Base class for widgets which configure editor widget types.
virtual QVariantMap config()=0
Create a configuration from the current GUI state.
virtual void setConfig(const QVariantMap &config)=0
Update the configuration widget to represent the given configuration.
Configuration widget for relation reference widgets.
Represents a vector layer which manages a vector based dataset.
#define SIP_NO_FILE