QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsfeatureselectiondlg.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfeatureselectiondlg.h
3
--------------------------------------
4
Date : 11.6.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 QGSFEATURESELECTIONDLG_H
17
#define QGSFEATURESELECTIONDLG_H
18
19
class
QgsVectorLayerSelectionManager
;
20
21
#include "ui_qgsfeatureselectiondlg.h"
22
23
#include "qgis_gui.h"
24
#include "
qgis_sip.h
"
25
26
#ifdef SIP_RUN
27
// This is required for the ConvertToSubClassCode to work properly
28
// so RTTI for casting is available in the whole module.
29
//%ModuleCode
30
#include "
qgsfeatureselectiondlg.h
"
31
//%End
32
#endif
33
39
class
GUI_EXPORT
QgsFeatureSelectionDlg
:
public
QDialog,
private
Ui::QgsFeatureSelectionDlg
40
{
41
#ifdef SIP_RUN
42
SIP_CONVERT_TO_SUBCLASS_CODE
43
if
( qobject_cast<QgsFeatureSelectionDlg *>( sipCpp ) )
44
sipType = sipType_QgsFeatureSelectionDlg;
45
else
46
sipType = 0;
47
SIP_END
48
#endif
49
50
Q_OBJECT
51
52
public
:
54
explicit
QgsFeatureSelectionDlg
(
QgsVectorLayer
*vl,
const
QgsAttributeEditorContext
&context, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
55
61
const
QgsFeatureIds
&
selectedFeatures
();
62
67
void
setSelectedFeatures
(
const
QgsFeatureIds
&ids );
68
72
void
setFilterExpression
(
const
QString &filter,
QgsAttributeForm::FilterType
type );
73
74
protected
:
75
void
keyPressEvent
( QKeyEvent *evt )
override
;
76
78
void
showEvent
( QShowEvent *event )
override
;
79
80
private
slots:
81
85
void
mActionInvertSelection_triggered();
86
90
void
mActionRemoveSelection_triggered();
91
95
void
mActionSelectAll_triggered();
96
100
void
mActionZoomMapToSelectedRows_triggered();
101
105
void
mActionPanMapToSelectedRows_triggered();
106
110
void
mActionExpressionSelect_triggered();
111
115
void
viewModeChanged(
QgsAttributeEditorContext::Mode
mode );
116
117
private
:
118
QgsVectorLayerSelectionManager
*mFeatureSelection =
nullptr
;
119
QgsVectorLayer
*mVectorLayer =
nullptr
;
120
QgsAttributeEditorContext
mContext;
121
};
122
123
#endif
// QGSFEATURESELECTIONDLG_H
QgsAttributeEditorContext
Contains context information for attribute editor widgets.
Definition
qgsattributeeditorcontext.h:42
QgsAttributeEditorContext::Mode
Mode
modes
Definition
qgsattributeeditorcontext.h:48
QgsAttributeForm::FilterType
FilterType
Filter types.
Definition
qgsattributeform.h:66
QgsFeatureSelectionDlg::setSelectedFeatures
void setSelectedFeatures(const QgsFeatureIds &ids)
Set the selected features.
Definition
qgsfeatureselectiondlg.cpp:78
QgsFeatureSelectionDlg::selectedFeatures
const QgsFeatureIds & selectedFeatures()
Gets the selected features.
Definition
qgsfeatureselectiondlg.cpp:73
QgsFeatureSelectionDlg::QgsFeatureSelectionDlg
QgsFeatureSelectionDlg(QgsVectorLayer *vl, const QgsAttributeEditorContext &context, QWidget *parent=nullptr)
Constructor for QgsFeatureSelectionDlg.
Definition
qgsfeatureselectiondlg.cpp:34
QgsFeatureSelectionDlg::setFilterExpression
void setFilterExpression(const QString &filter, QgsAttributeForm::FilterType type)
Set form filter expression.
Definition
qgsfeatureselectiondlg.cpp:140
QgsFeatureSelectionDlg::showEvent
void showEvent(QShowEvent *event) override
Make sure the dialog does not grow too much.
Definition
qgsfeatureselectiondlg.cpp:83
QgsFeatureSelectionDlg::keyPressEvent
void keyPressEvent(QKeyEvent *evt) override
Definition
qgsfeatureselectiondlg.cpp:65
QgsVectorLayerSelectionManager
Manages vector layer selections.
Definition
qgsvectorlayerselectionmanager.h:33
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis_sip.h
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:203
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_END
#define SIP_END
Definition
qgis_sip.h:220
QgsFeatureIds
QSet< QgsFeatureId > QgsFeatureIds
Definition
qgsfeatureid.h:41
qgsfeatureselectiondlg.h
Generated on
for QGIS API Documentation by
1.17.0