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;
 
  157     void updateComposerExtentFromGui();
 
  160     void blockAllSignals( 
bool b );
 
  162     void rotationChanged( 
double value );
 
  165     void toggleAtlasScalingOptionsByLayerType();
 
  168     void updateMapForAtlas();
 
  171     bool hasPredefinedScales() 
const;
 
  173     QListWidgetItem *addGridListItem( 
const QString &
id, 
const QString &name );
 
  175     void loadGridEntries();
 
  177     QListWidgetItem *addOverviewListItem( 
const QString &
id, 
const QString &name );
 
  179     void loadOverviewEntries();
 
  181     void storeCurrentLayerSet();
 
  187     QList<QgsMapLayer *> orderedPresetVisibleLayers( 
const QString &name ) 
const;
 
  206     int columnCount( 
const QModelIndex &parent = QModelIndex() ) 
const override;
 
  207     QVariant data( 
const QModelIndex &index, 
int role ) 
const override;
 
  208     bool setData( 
const QModelIndex &index, 
const QVariant &value, 
int role ) 
override;
 
  209     Qt::ItemFlags flags( 
const QModelIndex &index ) 
const override;
 
  213     bool filterAcceptsRow( 
int source_row, 
const QModelIndex &source_parent ) 
const override;
 
  217     QPointer< QgsLayoutItemMap > mMapItem;
 
  240     void updateGuiElements();
 
  241     void labelMarginChanged( 
double val );
 
  242     void labelMarginUnitsChanged();
 
  243     void showPartialsToggled( 
bool checked );
 
  244     void showUnplacedToggled( 
bool checked );
 
  247     QPointer< QgsLayoutItemMap > mMapItem;
 
  271     void updateGuiElements();
 
  273     void atlasToggled( 
bool atlasEnabled );
 
  276     QPointer< QgsLayoutItemMap > mMapItem;
 
  279     bool mBlockUpdates = 
false;