QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsattributeactionpropertiesdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsattributeactionpropertiesdialog.h - QgsAttributeActionPropertiesDialog
3
4 ---------------------
5 begin : 18.4.2016
6 copyright : (C) 2016 by mku
7 email : [your-email-here]
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSATTRIBUTEACTIONPROPERTIESDIALOG_H
17#define QGSATTRIBUTEACTIONPROPERTIESDIALOG_H
18
19// We don't want to expose this in the public API
20#define SIP_NO_FILE
21
22#include "ui_qgsattributeactionpropertiesdialogbase.h"
23
24#include "qgis_gui.h"
26#include "qgshelp.h"
27
28#include <QDialog>
29
35class GUI_EXPORT QgsAttributeActionPropertiesDialog : public QDialog, private Ui::QgsAttributeActionPropertiesDialogBase, public QgsExpressionContextGenerator
36{
37 Q_OBJECT
38
39 public:
40
44 QgsAttributeActionPropertiesDialog( Qgis::AttributeActionType type, const QString &description, const QString &shortTitle, const QString &iconPath, const QString &actionText, bool capture, const QSet<QString> &actionScopes, const QString &notificationMessage, bool isEnabledOnlyWhenEditable, QgsVectorLayer *layer, QWidget *parent = nullptr );
45
46 QgsAttributeActionPropertiesDialog( QgsVectorLayer *layer, QWidget *parent = nullptr );
47
49
50 QString description() const;
51
52 QString shortTitle() const;
53
54 QString iconPath() const;
55
56 QString actionText() const;
57
58 QSet<QString> actionScopes() const;
59
60 QString notificationMessage() const;
61
62 bool isEnabledOnlyWhenEditable() const;
63
64 bool capture() const;
65
67
68 private slots:
69 void browse();
70 void insertExpressionOrField();
71 void chooseIcon();
72 void updateButtons();
73 void showHelp();
74
75 private:
76 void populateActionTypes();
77 void init( const QSet<QString> &actionScopes );
78
79 QgsVectorLayer *mLayer = nullptr;
80 QList<QCheckBox *> mActionScopeCheckBoxes;
81};
82
83#endif // QGSATTRIBUTEACTIONPROPERTIESDIALOG_H
AttributeActionType
Attribute action types.
Definition qgis.h:4675
QgsAttributeActionPropertiesDialog(Qgis::AttributeActionType type, const QString &description, const QString &shortTitle, const QString &iconPath, const QString &actionText, bool capture, const QSet< QString > &actionScopes, const QString &notificationMessage, bool isEnabledOnlyWhenEditable, QgsVectorLayer *layer, QWidget *parent=nullptr)
Constructor for QgsAttributeActionPropertiesDialog.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Represents a vector layer which manages a vector based dataset.