QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
vector
qgsattributeactiondialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsattributeactiondialog.h - attribute action dialog
3
-------------------
4
5
This class creates and manages the Action tab of the Vector Layer
6
Properties dialog box. Changes made in the dialog box are propagated
7
back to QgsVectorLayer.
8
9
begin : October 2004
10
copyright : (C) 2004 by Gavin Macaulay
11
email : gavin at macaulay dot co dot nz
12
***************************************************************************/
13
14
/***************************************************************************
15
* *
16
* This program is free software; you can redistribute it and/or modify *
17
* it under the terms of the GNU General Public License as published by *
18
* the Free Software Foundation; either version 2 of the License, or *
19
* (at your option) any later version. *
20
* *
21
***************************************************************************/
22
23
#ifndef QGSATTRIBUTEACTIONDIALOG_H
24
#define QGSATTRIBUTEACTIONDIALOG_H
25
26
// We don't want to expose this in the public API
27
28
#include "ui_qgsattributeactiondialogbase.h"
29
30
#include "
qgis.h
"
31
#include "qgis_gui.h"
32
#include "
qgsattributetableconfig.h
"
33
34
#include <QMap>
35
36
#define SIP_NO_FILE
37
38
class
QgsActionManager
;
39
class
QgsVectorLayer
;
40
class
QgsAction
;
41
47
class
GUI_EXPORT
QgsAttributeActionDialog
:
public
QWidget,
private
Ui::QgsAttributeActionDialogBase
48
{
49
Q_OBJECT
50
private
:
51
enum
ColumnIndexes
52
{
53
Type,
54
Description,
55
ShortTitle,
56
ActionText,
57
Capture,
58
ActionScopes,
59
NotificationMessage,
60
EnabledOnlyWhenEditable
61
};
62
64
enum
Role
65
{
66
ActionType = Qt::UserRole,
67
ActionId = Qt::UserRole + 1
68
};
69
70
public
:
71
QgsAttributeActionDialog
(
const
QgsActionManager
&
actions
, QWidget *parent =
nullptr
);
72
73
void
init
(
const
QgsActionManager
&action,
const
QgsAttributeTableConfig
&attributeTableConfig );
74
75
QList<QgsAction>
actions
()
const
;
76
77
bool
showWidgetInAttributeTable
()
const
;
78
79
QgsAttributeTableConfig::ActionWidgetStyle
attributeTableWidgetStyle
()
const
;
80
81
private
slots:
82
void
moveUp();
83
void
moveDown();
84
void
remove();
85
void
insert();
86
void
duplicate();
87
void
addDefaultActions();
88
void
itemDoubleClicked( QTableWidgetItem *item );
89
void
updateButtons();
90
91
private
:
92
void
insertRow(
int
row,
const
QgsAction
&action );
93
void
insertRow(
94
int
row,
95
Qgis::AttributeActionType
type,
96
const
QString &name,
97
const
QString &actionText,
98
const
QString &iconPath,
99
bool
capture,
100
const
QString &shortTitle,
101
const
QSet<QString> &actionScopes,
102
const
QString ¬ificationMessage,
103
bool
isEnabledOnlyWhenEditable =
false
104
);
105
void
swapRows(
int
row1,
int
row2 );
106
QgsAction
rowToAction(
int
row )
const
;
107
108
QString textForType(
Qgis::AttributeActionType
type );
109
110
void
rowSelected(
int
row );
111
112
QString uniqueName( QString name );
113
114
QgsVectorLayer
*mLayer =
nullptr
;
115
};
116
117
#endif
Qgis::AttributeActionType
AttributeActionType
Attribute action types.
Definition
qgis.h:5215
QgsActionManager
Storage and management of actions associated with a layer.
Definition
qgsactionmanager.h:52
QgsAction
Utility class that encapsulates an action based on vector attributes.
Definition
qgsaction.h:38
QgsAttributeActionDialog::init
void init(const QgsActionManager &action, const QgsAttributeTableConfig &attributeTableConfig)
Definition
qgsattributeactiondialog.cpp:67
QgsAttributeActionDialog::showWidgetInAttributeTable
bool showWidgetInAttributeTable() const
Definition
qgsattributeactiondialog.cpp:102
QgsAttributeActionDialog::QgsAttributeActionDialog
QgsAttributeActionDialog(const QgsActionManager &actions, QWidget *parent=nullptr)
Definition
qgsattributeactiondialog.cpp:42
QgsAttributeActionDialog::actions
QList< QgsAction > actions() const
Definition
qgsattributeactiondialog.cpp:90
QgsAttributeActionDialog::attributeTableWidgetStyle
QgsAttributeTableConfig::ActionWidgetStyle attributeTableWidgetStyle() const
Definition
qgsattributeactiondialog.cpp:107
QgsAttributeTableConfig
A container for configuration of the attribute table.
Definition
qgsattributetableconfig.h:36
QgsAttributeTableConfig::ActionWidgetStyle
ActionWidgetStyle
The style of the action widget in the attribute table.
Definition
qgsattributetableconfig.h:76
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis.h
qgsattributetableconfig.h
Generated on
for QGIS API Documentation by
1.17.0