18 #ifndef QGSLAYOUTMAPWIDGET_H
19 #define QGSLAYOUTMAPWIDGET_H
25 #include "ui_qgslayoutmapwidgetbase.h"
26 #include "ui_qgslayoutmaplabelingwidgetbase.h"
27 #include "ui_qgslayoutmapclippingwidgetbase.h"
58 void mScaleLineEdit_editingFinished();
59 void setToMapCanvasExtent();
60 void setToMapCanvasScale();
61 void viewExtentInCanvas();
62 void viewScaleInCanvas();
64 void mFollowVisibilityPresetCheckBox_stateChanged(
int state );
65 void mKeepLayerListCheckBox_stateChanged(
int state );
66 void mKeepLayerStylesCheckBox_stateChanged(
int state );
67 void mDrawCanvasItemsCheckBox_stateChanged(
int state );
69 void mOverviewBlendModeComboBox_currentIndexChanged(
int index );
70 void mOverviewInvertCheckbox_toggled(
bool state );
71 void mOverviewCenterCheckbox_toggled(
bool state );
72 void overviewStackingChanged(
int value );
73 void overviewStackingLayerChanged(
QgsMapLayer *layer );
75 void mXMinLineEdit_editingFinished();
76 void mXMaxLineEdit_editingFinished();
77 void mYMinLineEdit_editingFinished();
78 void mYMaxLineEdit_editingFinished();
80 void mAtlasMarginRadio_toggled(
bool checked );
82 void mAtlasCheckBox_toggled(
bool checked );
83 void mAtlasMarginSpinBox_valueChanged(
int value );
84 void mAtlasFixedScaleRadio_toggled(
bool checked );
85 void mAtlasPredefinedScaleRadio_toggled(
bool checked );
87 void mAddGridPushButton_clicked();
88 void mRemoveGridPushButton_clicked();
89 void mGridUpButton_clicked();
90 void mGridDownButton_clicked();
93 void mGridListWidget_currentItemChanged( QListWidgetItem *current, QListWidgetItem *previous );
94 void mGridListWidget_itemChanged( QListWidgetItem *item );
95 void mGridPropertiesButton_clicked();
98 void mAddOverviewPushButton_clicked();
99 void mRemoveOverviewPushButton_clicked();
100 void mOverviewUpButton_clicked();
101 void mOverviewDownButton_clicked();
103 void mOverviewCheckBox_toggled(
bool state );
104 void mOverviewListWidget_currentItemChanged( QListWidgetItem *current, QListWidgetItem *previous );
105 void mOverviewListWidget_itemChanged( QListWidgetItem *item );
106 void setOverviewItemsEnabled(
bool enabled );
108 void blockOverviewItemsSignals(
bool block );
110 void mTemporalCheckBox_toggled(
bool checked );
111 void updateTemporalExtent();
118 void populateDataDefinedButtons();
123 void updateGuiElements();
129 void compositionAtlasToggled(
bool atlasEnabled );
131 void aboutToShowKeepLayersVisibilityPresetsMenu();
133 void followVisibilityPresetSelected(
int currentIndex );
134 void keepLayersVisibilityPresetSelected();
136 void onMapThemesChanged();
139 void overviewSymbolChanged();
140 void showLabelSettings();
141 void showClipSettings();
142 void switchToMoveContentTool();
143 void aboutToShowBookmarkMenu();
146 QPointer< QgsLayoutItemMap > mMapItem;
150 QPointer< QgsLayoutMapLabelingWidget > mLabelWidget;
151 QPointer< QgsLayoutMapClippingWidget > mClipWidget;
152 QMenu *mBookmarkMenu =
nullptr;
154 QString mReportTypeString;
155 int mBlockThemeComboChanges = 0;
158 void updateComposerExtentFromGui();
161 void blockAllSignals(
bool b );
163 void rotationChanged(
double value );
166 void toggleAtlasScalingOptionsByLayerType();
169 void updateMapForAtlas();
172 bool hasPredefinedScales()
const;
174 QListWidgetItem *addGridListItem(
const QString &
id,
const QString &name );
176 void loadGridEntries();
178 QListWidgetItem *addOverviewListItem(
const QString &
id,
const QString &name );
180 void loadOverviewEntries();
182 void storeCurrentLayerSet();
188 QList<QgsMapLayer *> orderedPresetVisibleLayers(
const QString &name )
const;
207 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
208 QVariant data(
const QModelIndex &index,
int role )
const override;
209 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
210 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
214 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
218 QPointer< QgsLayoutItemMap > mMapItem;
241 void updateGuiElements();
242 void labelMarginChanged(
double val );
243 void labelMarginUnitsChanged();
244 void showPartialsToggled(
bool checked );
245 void showUnplacedToggled(
bool checked );
248 QPointer< QgsLayoutItemMap > mMapItem;
272 void updateGuiElements();
274 void atlasToggled(
bool atlasEnabled );
277 QPointer< QgsLayoutItemMap > mMapItem;
280 bool mBlockUpdates =
false;