-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- ltr-3_40
- ltr-3_34
- ltr-3_28
- ltr-3_22
- ltr-3_16
- ltr-3_10
- ltr-3_4
- final-3_40_2
- final-3_40_1
- final-3_40_0
- final-3_38_3
- final-3_38_2
- final-3_38_1
- final-3_38_0
- final-3_36_3
- final-3_36_2
- final-3_36_1
- final-3_36_0
- final-3_34_14
- final-3_34_13
- final-3_34_12
- final-3_34_11
- final-3_34_10
- final-3_34_9
- final-3_34_8
- final-3_34_7
- final-3_34_6
- final-3_34_5
- final-3_34_4
- final-3_34_3
- final-3_34_2
- final-3_34_1
- final-3_34_0
- final-3_32_3
- final-3_32_2
- final-3_32_1
- final-3_32_0
- final-3_30_3
- final-3_30_2
- final-3_30_1
- final-3_30_0
- final-3_28_15
- final-3_28_14
- final-3_28_13
- final-3_28_12
- final-3_28_11
- final-3_28_10
- final-3_28_9
- final-3_28_8
- final-3_28_7
- final-3_28_6
- final-3_28_5
- final-3_28_4
- final-3_28_3
- final-3_28_2
- final-3_28_1
- final-3_28_0
- final-3_26_3
- final-3_26_2
- final-3_26_1
- final-3_26_0
- final-3_24_3
- final-3_24_2
- final-3_24_1
- final-3_24_0
- final-3_22_16
- final-3_22_15
- final-3_22_14
- final-3_22_13
- final-3_22_12
- final-3_22_11
- final-3_22_10
- final-3_22_9
- final-3_22_8
- final-3_22_7
- final-3_22_6
- final-3_22_5
- final-3_22_4
- final-3_22_3
- final-3_22_2
- final-3_22_1
- final-3_22_0
- final-3_20_3
- final-3_20_2
- final-3_20_1
- final-3_20_0
- final-3_18_3
- final-3_18_2
- final-3_18_1
- final-3_18_0
- final-3_16_16
- final-3_16_15
- final-3_16_14
- final-3_16_13
- final-3_16_12
- final-3_16_11
- final-3_16_10
- final-3_16_9
- final-3_16_8
- final-3_16_7
- final-3_16_6
- final-3_16_5
- final-3_16_4
- final-3_16_3
- final-3_16_2
- final-3_16_1
- final-3_16_0
- final-3_14_16
- final-3_14_15
- final-3_14_1
- final-3_14_0
- final-3_12_3
- final-3_12_2
- final-3_12_1
- final-3_12_0
- final-3_10_14
- final-3_10_13
- final-3_10_12
- final-3_10_11
- final-3_10_10
- final-3_10_9
- final-3_10_8
- final-3_10_7
- final-3_10_6
- final-3_10_5
- final-3_10_4
- final-3_10_3
- final-3_10_2
- final-3_10_1
- final-3_10_0
- final-3_8_3
- final-3_8_2
- final-3_8_1
- final-3_8_0
- final-3_6_3
- final-3_6_2
- final-3_6_1
- final-3_6_0
- final-3_4_15
- final-3_4_14
- final-3_4_13
- final-3_4_12
- final-3_4_11
- final-3_4_10
- final-3_4_9
- final-3_4_8
- final-3_4_7
- final-3_4_6
- final-3_4_5
- final-3_4_4
- final-3_4_3
- final-3_4_2
- final-3_4_1
- final-3_4_0
- final-3_2_3
- final-3_2_2
- final-3_2_1
- final-3_2_0
- final-3_0_3
- final-3_0_2
- final-3_0_1
- final-3_0_0
1 parent
835653b
commit ab4606d
Showing
7 changed files
with
2,288 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
/*************************************************************************** | ||
qgslayoutmapgridwidget.h | ||
---------------------- | ||
begin : October 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSLAYOUTMAPGRIDWIDGET_H | ||
#define QGSLAYOUTMAPGRIDWIDGET_H | ||
|
||
#include "ui_qgslayoutmapgridwidgetbase.h" | ||
#include "qgslayoutitemwidget.h" | ||
#include "qgslayoutitemmapgrid.h" | ||
|
||
/** | ||
* \ingroup app | ||
* Input widget for the configuration of QgsLayoutItemMapGrids | ||
* */ | ||
class QgsLayoutMapGridWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapGridWidgetBase | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, QgsLayoutItemMap *map ); | ||
|
||
public slots: | ||
|
||
void setGridItems(); | ||
void mGridLineStyleButton_clicked(); | ||
void mGridMarkerStyleButton_clicked(); | ||
void mIntervalXSpinBox_editingFinished(); | ||
void mIntervalYSpinBox_editingFinished(); | ||
void mOffsetXSpinBox_valueChanged( double value ); | ||
void mOffsetYSpinBox_valueChanged( double value ); | ||
void mCrossWidthSpinBox_valueChanged( double val ); | ||
void mFrameWidthSpinBox_valueChanged( double val ); | ||
void mFrameStyleComboBox_currentIndexChanged( const QString &text ); | ||
void mGridFramePenSizeSpinBox_valueChanged( double d ); | ||
void mGridFramePenColorButton_colorChanged( const QColor &newColor ); | ||
void mGridFrameFill1ColorButton_colorChanged( const QColor &newColor ); | ||
void mGridFrameFill2ColorButton_colorChanged( const QColor &newColor ); | ||
void mGridTypeComboBox_currentIndexChanged( const QString &text ); | ||
void mMapGridCRSButton_clicked(); | ||
void mMapGridUnitComboBox_currentIndexChanged( const QString &text ); | ||
void mGridBlendComboBox_currentIndexChanged( int index ); | ||
void mCheckGridLeftSide_toggled( bool checked ); | ||
void mCheckGridRightSide_toggled( bool checked ); | ||
void mCheckGridTopSide_toggled( bool checked ); | ||
void mCheckGridBottomSide_toggled( bool checked ); | ||
|
||
//frame divisions display | ||
void mFrameDivisionsLeftComboBox_currentIndexChanged( int index ); | ||
void mFrameDivisionsRightComboBox_currentIndexChanged( int index ); | ||
void mFrameDivisionsTopComboBox_currentIndexChanged( int index ); | ||
void mFrameDivisionsBottomComboBox_currentIndexChanged( int index ); | ||
|
||
void mDrawAnnotationGroupBox_toggled( bool state ); | ||
void mAnnotationFormatButton_clicked(); | ||
|
||
//annotation display | ||
void mAnnotationDisplayLeftComboBox_currentIndexChanged( const QString &text ); | ||
void mAnnotationDisplayRightComboBox_currentIndexChanged( const QString &text ); | ||
void mAnnotationDisplayTopComboBox_currentIndexChanged( const QString &text ); | ||
void mAnnotationDisplayBottomComboBox_currentIndexChanged( const QString &text ); | ||
|
||
//annotation position | ||
void mAnnotationPositionLeftComboBox_currentIndexChanged( const QString &text ); | ||
void mAnnotationPositionRightComboBox_currentIndexChanged( const QString &text ); | ||
void mAnnotationPositionTopComboBox_currentIndexChanged( const QString &text ); | ||
void mAnnotationPositionBottomComboBox_currentIndexChanged( const QString &text ); | ||
|
||
//annotation direction | ||
void mAnnotationDirectionComboBoxLeft_currentIndexChanged( int index ); | ||
void mAnnotationDirectionComboBoxRight_currentIndexChanged( int index ); | ||
void mAnnotationDirectionComboBoxTop_currentIndexChanged( int index ); | ||
void mAnnotationDirectionComboBoxBottom_currentIndexChanged( int index ); | ||
|
||
void mAnnotationFormatComboBox_currentIndexChanged( int index ); | ||
void mCoordinatePrecisionSpinBox_valueChanged( int value ); | ||
void mDistanceToMapFrameSpinBox_valueChanged( double d ); | ||
void mAnnotationFontColorButton_colorChanged( const QColor &color ); | ||
|
||
protected: | ||
|
||
//! Sets the current composer map values to the GUI elements | ||
virtual void updateGuiElements(); | ||
|
||
protected slots: | ||
//! Initializes data defined buttons to current atlas coverage layer | ||
void populateDataDefinedButtons(); | ||
|
||
private slots: | ||
|
||
//! Sets the GUI elements to the values of mPicture | ||
void setGuiElementValues(); | ||
|
||
void updateGridLineStyleFromWidget(); | ||
void cleanUpGridLineStyleSelector( QgsPanelWidget *container ); | ||
void updateGridMarkerStyleFromWidget(); | ||
void cleanUpGridMarkerStyleSelector( QgsPanelWidget *container ); | ||
void annotationFontChanged(); | ||
|
||
private: | ||
QgsLayoutItemMap *mMap = nullptr; | ||
QgsLayoutItemMapGrid *mMapGrid = nullptr; | ||
|
||
//! Blocks / unblocks the signals of all GUI elements | ||
void blockAllSignals( bool b ); | ||
|
||
void handleChangedFrameDisplay( QgsLayoutItemMapGrid::BorderSide border, const QgsLayoutItemMapGrid::DisplayMode mode ); | ||
void handleChangedAnnotationDisplay( QgsLayoutItemMapGrid::BorderSide border, const QString &text ); | ||
void handleChangedAnnotationPosition( QgsLayoutItemMapGrid::BorderSide border, const QString &text ); | ||
void handleChangedAnnotationDirection( QgsLayoutItemMapGrid::BorderSide border, QgsLayoutItemMapGrid::AnnotationDirection direction ); | ||
|
||
void insertFrameDisplayEntries( QComboBox *c ); | ||
void insertAnnotationDisplayEntries( QComboBox *c ); | ||
void insertAnnotationPositionEntries( QComboBox *c ); | ||
void insertAnnotationDirectionEntries( QComboBox *c ); | ||
|
||
void initFrameDisplayBox( QComboBox *c, QgsLayoutItemMapGrid::DisplayMode display ); | ||
void initAnnotationDisplayBox( QComboBox *c, QgsLayoutItemMapGrid::DisplayMode display ); | ||
void initAnnotationPositionBox( QComboBox *c, QgsLayoutItemMapGrid::AnnotationPosition pos ); | ||
void initAnnotationDirectionBox( QComboBox *c, QgsLayoutItemMapGrid::AnnotationDirection dir ); | ||
|
||
void updateGridLineSymbolMarker(); | ||
void updateGridMarkerSymbolMarker(); | ||
|
||
//! Enables/disables grid frame related controls | ||
void toggleFrameControls( bool frameEnabled, bool frameFillEnabled, bool frameSizeEnabled ); | ||
|
||
//! Is there some predefined scales, globally or as project's options ? | ||
bool hasPredefinedScales() const; | ||
|
||
}; | ||
|
||
#endif //QGSLAYOUTMAPGRIDWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.