QGIS API Documentation
3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
src
core
vector
qgsvectorlayertoolscontext.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsvectorlayertoolscontext.h
3
------------------------
4
begin : May 2024
5
copyright : (C) 2024 by Mathieu Pellerin
6
email : mathieu 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 QGSVECTORLAYERTOOLSCONTEXT_H
17
#define QGSVECTORLAYERTOOLSCONTEXT_H
18
19
#include "
qgsexpressioncontext.h
"
20
#include "qgis_core.h"
21
22
#include <memory>
23
31
class
CORE_EXPORT
QgsVectorLayerToolsContext
32
{
33
public
:
34
35
QgsVectorLayerToolsContext
() =
default
;
36
37
QgsVectorLayerToolsContext
(
const
QgsVectorLayerToolsContext
&other );
38
QgsVectorLayerToolsContext
&operator=(
const
QgsVectorLayerToolsContext
&other );
39
46
void
setExpressionContext(
const
QgsExpressionContext
*context );
47
53
QgsExpressionContext
*expressionContext()
const
;
54
60
void
setAdditionalExpressionContextScope(
const
QgsExpressionContextScope
*scope );
61
66
const
QgsExpressionContextScope
*additionalExpressionContextScope()
const
;
67
71
QWidget *
parentWidget
()
const
{
return
mParentWidget; }
72
77
void
setParentWidget
( QWidget *parent ) { mParentWidget = parent; }
78
82
bool
showModal
()
const
{
return
mShowModal; }
83
87
void
setShowModal
(
bool
modal ) { mShowModal = modal; }
88
92
bool
hideParent
()
const
{
return
mHideParent; }
93
97
void
setHideParent
(
bool
hide ) { mHideParent = hide; }
98
99
private
:
100
101
std::unique_ptr< QgsExpressionContext > mExpressionContext;
102
std::unique_ptr< QgsExpressionContextScope > mAdditionalExpressionContextScope;
103
104
QWidget *mParentWidget =
nullptr
;
105
bool
mShowModal =
true
;
106
bool
mHideParent =
false
;
107
};
108
109
#endif
// QGSVECTORLAYERTOOLSCONTEXT_H
QgsExpressionContextScope
Single scope for storing variables and functions for use within a QgsExpressionContext.
Definition
qgsexpressioncontext.h:115
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:471
QgsVectorLayerToolsContext
Contains settings which reflect the context in which vector layer tool operations should consider.
Definition
qgsvectorlayertoolscontext.h:32
QgsVectorLayerToolsContext::QgsVectorLayerToolsContext
QgsVectorLayerToolsContext()=default
QgsVectorLayerToolsContext::setParentWidget
void setParentWidget(QWidget *parent)
Sets the widget which should be parented to tools' dialogues.
Definition
qgsvectorlayertoolscontext.h:77
QgsVectorLayerToolsContext::hideParent
bool hideParent() const
Returns whether the parent widget should be hidden when showing tools' dialogues.
Definition
qgsvectorlayertoolscontext.h:92
QgsVectorLayerToolsContext::setHideParent
void setHideParent(bool hide)
Sets whether the parent widget should be hidden when showing tools' dialogues.
Definition
qgsvectorlayertoolscontext.h:97
QgsVectorLayerToolsContext::showModal
bool showModal() const
Returns whether tools' dialogues should be modal.
Definition
qgsvectorlayertoolscontext.h:82
QgsVectorLayerToolsContext::setShowModal
void setShowModal(bool modal)
Sets whether tools' dialogues should be modal.
Definition
qgsvectorlayertoolscontext.h:87
QgsVectorLayerToolsContext::parentWidget
QWidget * parentWidget() const
Returns the widget which should be parented to tools dialogues.
Definition
qgsvectorlayertoolscontext.h:71
qgsexpressioncontext.h
Generated on Sun Dec 15 2024 01:32:01 for QGIS API Documentation by
1.9.8