QGIS API Documentation 3.33.0-Master (bf22a165b3)
Loading...
Searching...
No Matches
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
33class GUI_EXPORT QgsRelationReferenceConfigDlg : public QgsEditorConfigWidget, private Ui::QgsRelReferenceConfigDlgBase
34{
35 Q_OBJECT
36
37 public:
38 explicit QgsRelationReferenceConfigDlg( QgsVectorLayer *vl, int fieldIdx, QWidget *parent );
39 QVariantMap config() override;
40 void setConfig( const QVariantMap &config ) override;
41
42 private:
43 void loadFields();
44 void addFilterField( const QString &field );
45 void addFilterField( QListWidgetItem *item );
46 int indexFromListWidgetItem( QListWidgetItem *item );
47
48 QgsVectorLayer *mReferencedLayer = nullptr;
49
50 private slots:
51 void relationChanged( int idx );
52 void mAddFilterButton_clicked();
53 void mRemoveFilterButton_clicked();
54
58 void mEditExpression_clicked();
59};
60
61#endif // QGSRELATIONREFERENCECONFIGDLGBASE_H
This class should be subclassed for every configurable editor widget type.
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.
Represents a vector layer which manages a vector based data sets.
#define SIP_NO_FILE
const QgsField & field
Definition qgsfield.h:554