@@ -829,51 +829,6 @@ void QgsLayoutMapWidget::blockAllSignals( bool b )
829
829
blockOverviewItemsSignals ( b );
830
830
}
831
831
832
- void QgsLayoutMapWidget::handleChangedFrameDisplay ( QgsLayoutItemMapGrid::BorderSide border, const QgsLayoutItemMapGrid::DisplayMode mode )
833
- {
834
- QgsLayoutItemMapGrid *grid = currentGrid ();
835
- if ( !grid )
836
- {
837
- return ;
838
- }
839
-
840
- mMapItem ->layout ()->undoStack ()->beginCommand ( mMapItem , tr ( " Change Frame Divisions" ) );
841
- grid->setFrameDivisions ( mode, border );
842
- mMapItem ->layout ()->undoStack ()->endCommand ();
843
- mMapItem ->updateBoundingRect ();
844
- }
845
-
846
- void QgsLayoutMapWidget::handleChangedAnnotationDisplay ( QgsLayoutItemMapGrid::BorderSide border, const QString &text )
847
- {
848
- QgsLayoutItemMapGrid *grid = currentGrid ();
849
- if ( !grid )
850
- {
851
- return ;
852
- }
853
-
854
- mMapItem ->layout ()->undoStack ()->beginCommand ( mMapItem , tr ( " Change Annotation Display" ) );
855
- if ( text == tr ( " Show all" ) )
856
- {
857
- grid->setAnnotationDisplay ( QgsLayoutItemMapGrid::ShowAll, border );
858
- }
859
- else if ( text == tr ( " Show latitude only" ) )
860
- {
861
- grid->setAnnotationDisplay ( QgsLayoutItemMapGrid::LatitudeOnly, border );
862
- }
863
- else if ( text == tr ( " Show longitude only" ) )
864
- {
865
- grid->setAnnotationDisplay ( QgsLayoutItemMapGrid::LongitudeOnly, border );
866
- }
867
- else // disabled
868
- {
869
- grid->setAnnotationDisplay ( QgsLayoutItemMapGrid::HideAll, border );
870
- }
871
-
872
- mMapItem ->updateBoundingRect ();
873
- mMapItem ->update ();
874
- mMapItem ->layout ()->undoStack ()->endCommand ();
875
- }
876
-
877
832
void QgsLayoutMapWidget::updatePreview ()
878
833
{
879
834
if ( !mMapItem )
@@ -974,133 +929,6 @@ void QgsLayoutMapWidget::mDrawCanvasItemsCheckBox_stateChanged( int state )
974
929
mMapItem ->layout ()->undoStack ()->endCommand ();
975
930
}
976
931
977
- void QgsLayoutMapWidget::insertAnnotationPositionEntries ( QComboBox *c )
978
- {
979
- c->insertItem ( 0 , tr ( " Inside frame" ) );
980
- c->insertItem ( 1 , tr ( " Outside frame" ) );
981
- }
982
-
983
- void QgsLayoutMapWidget::insertAnnotationDirectionEntries ( QComboBox *c )
984
- {
985
- c->addItem ( tr ( " Horizontal" ), QgsLayoutItemMapGrid::Horizontal );
986
- c->addItem ( tr ( " Vertical ascending" ), QgsLayoutItemMapGrid::Vertical );
987
- c->addItem ( tr ( " Vertical descending" ), QgsLayoutItemMapGrid::VerticalDescending );
988
- }
989
-
990
- void QgsLayoutMapWidget::initFrameDisplayBox ( QComboBox *c, QgsLayoutItemMapGrid::DisplayMode display )
991
- {
992
- if ( !c )
993
- {
994
- return ;
995
- }
996
- c->setCurrentIndex ( c->findData ( display ) );
997
- }
998
-
999
- void QgsLayoutMapWidget::initAnnotationDisplayBox ( QComboBox *c, QgsLayoutItemMapGrid::DisplayMode display )
1000
- {
1001
- if ( !c )
1002
- {
1003
- return ;
1004
- }
1005
-
1006
- if ( display == QgsLayoutItemMapGrid::ShowAll )
1007
- {
1008
- c->setCurrentIndex ( c->findText ( tr ( " Show all" ) ) );
1009
- }
1010
- else if ( display == QgsLayoutItemMapGrid::LatitudeOnly )
1011
- {
1012
- c->setCurrentIndex ( c->findText ( tr ( " Show latitude only" ) ) );
1013
- }
1014
- else if ( display == QgsLayoutItemMapGrid::LongitudeOnly )
1015
- {
1016
- c->setCurrentIndex ( c->findText ( tr ( " Show longitude only" ) ) );
1017
- }
1018
- else
1019
- {
1020
- c->setCurrentIndex ( c->findText ( tr ( " Disabled" ) ) );
1021
- }
1022
- }
1023
-
1024
- void QgsLayoutMapWidget::handleChangedAnnotationPosition ( QgsLayoutItemMapGrid::BorderSide border, const QString &text )
1025
- {
1026
- QgsLayoutItemMapGrid *grid = currentGrid ();
1027
- if ( !grid )
1028
- {
1029
- return ;
1030
- }
1031
-
1032
- mMapItem ->layout ()->undoStack ()->beginCommand ( mMapItem , tr ( " Change Annotation Position" ) );
1033
- if ( text == tr ( " Inside frame" ) )
1034
- {
1035
- grid->setAnnotationPosition ( QgsLayoutItemMapGrid::InsideMapFrame, border );
1036
- }
1037
- else // Outside frame
1038
- {
1039
- grid->setAnnotationPosition ( QgsLayoutItemMapGrid::OutsideMapFrame, border );
1040
- }
1041
-
1042
- mMapItem ->updateBoundingRect ();
1043
- mMapItem ->update ();
1044
- mMapItem ->layout ()->undoStack ()->endCommand ();
1045
- }
1046
-
1047
- void QgsLayoutMapWidget::handleChangedAnnotationDirection ( QgsLayoutItemMapGrid::BorderSide border, QgsLayoutItemMapGrid::AnnotationDirection direction )
1048
- {
1049
- QgsLayoutItemMapGrid *grid = currentGrid ();
1050
- if ( !grid )
1051
- {
1052
- return ;
1053
- }
1054
-
1055
- mMapItem ->layout ()->undoStack ()->beginCommand ( mMapItem , tr ( " Change Annotation Direction" ) );
1056
- grid->setAnnotationDirection ( direction, border );
1057
- mMapItem ->updateBoundingRect ();
1058
- mMapItem ->update ();
1059
- mMapItem ->layout ()->undoStack ()->endCommand ();
1060
- }
1061
-
1062
- void QgsLayoutMapWidget::insertFrameDisplayEntries ( QComboBox *c )
1063
- {
1064
- c->addItem ( tr ( " All" ), QgsLayoutItemMapGrid::ShowAll );
1065
- c->addItem ( tr ( " Latitude/Y only" ), QgsLayoutItemMapGrid::LatitudeOnly );
1066
- c->addItem ( tr ( " Longitude/X only" ), QgsLayoutItemMapGrid::LongitudeOnly );
1067
- }
1068
-
1069
- void QgsLayoutMapWidget::insertAnnotationDisplayEntries ( QComboBox *c )
1070
- {
1071
- c->insertItem ( 0 , tr ( " Show all" ) );
1072
- c->insertItem ( 1 , tr ( " Show latitude only" ) );
1073
- c->insertItem ( 2 , tr ( " Show longitude only" ) );
1074
- c->insertItem ( 3 , tr ( " Disabled" ) );
1075
- }
1076
-
1077
- void QgsLayoutMapWidget::initAnnotationPositionBox ( QComboBox *c, QgsLayoutItemMapGrid::AnnotationPosition pos )
1078
- {
1079
- if ( !c )
1080
- {
1081
- return ;
1082
- }
1083
-
1084
- if ( pos == QgsLayoutItemMapGrid::InsideMapFrame )
1085
- {
1086
- c->setCurrentIndex ( c->findText ( tr ( " Inside frame" ) ) );
1087
- }
1088
- else
1089
- {
1090
- c->setCurrentIndex ( c->findText ( tr ( " Outside frame" ) ) );
1091
- }
1092
- }
1093
-
1094
- void QgsLayoutMapWidget::initAnnotationDirectionBox ( QComboBox *c, QgsLayoutItemMapGrid::AnnotationDirection dir )
1095
- {
1096
- if ( !c )
1097
- {
1098
- return ;
1099
- }
1100
- c->setCurrentIndex ( c->findData ( dir ) );
1101
- }
1102
-
1103
-
1104
932
void QgsLayoutMapWidget::atlasLayerChanged ( QgsVectorLayer *layer )
1105
933
{
1106
934
if ( !layer || layer->wkbType () == QgsWkbTypes::NoGeometry )
0 commit comments