QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
layout
qgslayoutelevationprofilewidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayoutelevationprofilewidget.h
3
----------------------
4
begin : January 2023
5
copyright : (C) 2023 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSLAYOUTELEVATIONPROFILEWIDGET_H
19
#define QGSLAYOUTELEVATIONPROFILEWIDGET_H
20
21
// We don't want to expose this in the public API
22
23
#include "ui_qgslayoutelevationprofilewidgetbase.h"
24
25
#include <functional>
26
27
#include "qgis_gui.h"
28
#include "
qgslayoutitemelevationprofile.h
"
29
#include "
qgslayoutitemwidget.h
"
30
31
#include <QPointer>
32
33
#define SIP_NO_FILE
34
35
class
QgsElevationProfileLayerTreeView
;
36
class
QgsElevationProfileCanvas
;
37
class
QgsProfileSourceRegistry
;
38
46
class
GUI_EXPORT
QgsLayoutElevationProfileWidget
:
public
QgsLayoutItemBaseWidget
,
public
QgsExpressionContextGenerator
,
private
Ui::QgsLayoutElevationProfileWidgetBase
47
{
48
Q_OBJECT
49
public
:
51
explicit
QgsLayoutElevationProfileWidget
(
QgsLayoutItemElevationProfile
*profile );
52
~QgsLayoutElevationProfileWidget
()
override
;
53
void
setMasterLayout
(
QgsMasterLayoutInterface
*masterLayout )
override
;
54
QgsExpressionContext
createExpressionContext
()
const override
;
55
void
setDesignerInterface
(
QgsLayoutDesignerInterface
*iface )
override
;
56
void
setReportTypeString
(
const
QString &
string
)
override
;
57
61
void
copySettingsFromProfileCanvas
(
QgsElevationProfileCanvas
*canvas );
62
63
static
std::function<void(
QgsLayoutElevationProfileWidget
*, QMenu * )>
sBuildCopyMenuFunction
;
64
65
protected
:
66
bool
setNewItem
(
QgsLayoutItem
*item )
override
;
67
68
private
slots:
69
70
void
setGuiElementValues();
71
void
updateItemSources();
72
void
layoutAtlasToggled(
bool
atlasEnabled );
73
void
atlasLayerChanged(
QgsVectorLayer
*layer );
74
75
private
:
76
void
syncLayerTreeAndProfileItemSources();
77
78
int
mBlockChanges = 0;
79
80
QgsLayoutDesignerInterface
*mInterface =
nullptr
;
81
82
QPointer<QgsLayoutItemElevationProfile> mProfile =
nullptr
;
83
84
QgsLayoutItemPropertiesWidget
*mItemPropertiesWidget =
nullptr
;
85
86
std::unique_ptr<QgsLayerTree> mLayerTree;
87
QgsLayerTreeRegistryBridge
*mLayerTreeBridge =
nullptr
;
88
QgsElevationProfileLayerTreeView
*mLayerTreeView =
nullptr
;
89
QMenu *mCopyFromDockMenu =
nullptr
;
90
91
friend
class
TestQgsLayoutGui
;
92
};
93
94
#endif
//QGSLAYOUTELEVATIONPROFILEWIDGET_H
QgsElevationProfileCanvas
A canvas for elevation profiles.
Definition
qgselevationprofilecanvas.h:49
QgsElevationProfileLayerTreeView
A layer tree view for elevation profiles.
Definition
qgselevationprofilelayertreeview.h:129
QgsExpressionContextGenerator
Abstract interface for generating an expression context.
Definition
qgsexpressioncontextgenerator.h:36
QgsExpressionContextGenerator::createExpressionContext
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:491
QgsLayerTreeRegistryBridge
Listens to layer changes from a QgsProject and applies changes to a QgsLayerTree.
Definition
qgslayertreeregistrybridge.h:46
QgsLayoutDesignerInterface
A common interface for layout designer dialogs and widgets.
Definition
qgslayoutdesignerinterface.h:56
QgsLayoutElevationProfileWidget::copySettingsFromProfileCanvas
void copySettingsFromProfileCanvas(QgsElevationProfileCanvas *canvas)
Copies selected settings from a elevation profile canvas.
Definition
qgslayoutelevationprofilewidget.cpp:659
QgsLayoutElevationProfileWidget::TestQgsLayoutGui
friend class TestQgsLayoutGui
Definition
qgslayoutelevationprofilewidget.h:91
QgsLayoutElevationProfileWidget::sBuildCopyMenuFunction
static std::function< void(QgsLayoutElevationProfileWidget *, QMenu *)> sBuildCopyMenuFunction
Definition
qgslayoutelevationprofilewidget.h:47
QgsLayoutElevationProfileWidget::~QgsLayoutElevationProfileWidget
~QgsLayoutElevationProfileWidget() override
QgsLayoutElevationProfileWidget::QgsLayoutElevationProfileWidget
QgsLayoutElevationProfileWidget(QgsLayoutItemElevationProfile *profile)
constructor
Definition
qgslayoutelevationprofilewidget.cpp:49
QgsLayoutItemBaseWidget::setNewItem
virtual bool setNewItem(QgsLayoutItem *item)
Attempts to update the widget to show the properties for the specified item.
Definition
qgslayoutitemwidget.cpp:270
QgsLayoutItemBaseWidget::setDesignerInterface
virtual void setDesignerInterface(QgsLayoutDesignerInterface *iface)
Sets the the layout designer interface in which the widget is being shown.
Definition
qgslayoutitemwidget.cpp:238
QgsLayoutItemBaseWidget::setMasterLayout
virtual void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.
Definition
qgslayoutitemwidget.cpp:252
QgsLayoutItemBaseWidget::QgsLayoutItemBaseWidget
QgsLayoutItemBaseWidget(QWidget *parent SIP_TRANSFERTHIS, QgsLayoutObject *layoutObject)
Constructor for QgsLayoutItemBaseWidget, linked with the specified layoutObject.
Definition
qgslayoutitemwidget.cpp:202
QgsLayoutItemBaseWidget::setReportTypeString
virtual void setReportTypeString(const QString &string)
Sets the string to use to describe the current report type (e.g.
Definition
qgslayoutitemwidget.cpp:235
QgsLayoutItemElevationProfile
A layout item subclass for elevation profile plots.
Definition
qgslayoutitemelevationprofile.h:36
QgsLayoutItemPropertiesWidget
A widget for controlling the common properties of layout items (e.g.
Definition
qgslayoutitemwidget.h:214
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition
qgslayoutitem.h:106
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition
qgsmasterlayoutinterface.h:45
QgsProfileSourceRegistry
Registry of profile sources used by QgsProfilePlotRenderer.
Definition
qgsprofilesourceregistry.h:38
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgslayoutitemelevationprofile.h
qgslayoutitemwidget.h
Generated on
for QGIS API Documentation by
1.17.0