Skip to content

Commit

Permalink
Removed view menu actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TurboGraphxBeige authored and nyalldawson committed Jan 5, 2021
1 parent 69154c2 commit b2af412
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 47 deletions.
21 changes: 0 additions & 21 deletions src/app/qgisapp.cpp
Expand Up @@ -2705,7 +2705,6 @@ void QgisApp::createActions()
// View Menu Items // View Menu Items
connect( mActionPan, &QAction::triggered, this, &QgisApp::pan ); connect( mActionPan, &QAction::triggered, this, &QgisApp::pan );
connect( mActionPanToSelected, &QAction::triggered, this, &QgisApp::panToSelected ); connect( mActionPanToSelected, &QAction::triggered, this, &QgisApp::panToSelected );
connect( mActionPanToAllSelected, &QAction::triggered, this, &QgisApp::panToAllSelected );
connect( mActionZoomIn, &QAction::triggered, this, &QgisApp::zoomIn ); connect( mActionZoomIn, &QAction::triggered, this, &QgisApp::zoomIn );
connect( mActionZoomOut, &QAction::triggered, this, &QgisApp::zoomOut ); connect( mActionZoomOut, &QAction::triggered, this, &QgisApp::zoomOut );
connect( mActionSelectFeatures, &QAction::triggered, this, &QgisApp::selectFeatures ); connect( mActionSelectFeatures, &QAction::triggered, this, &QgisApp::selectFeatures );
Expand Down Expand Up @@ -2741,7 +2740,6 @@ void QgisApp::createActions()
connect( mActionZoomToLayer, &QAction::triggered, this, &QgisApp::zoomToLayerExtent ); connect( mActionZoomToLayer, &QAction::triggered, this, &QgisApp::zoomToLayerExtent );
connect( mActionZoomToLayers, &QAction::triggered, this, &QgisApp::zoomToLayerExtent ); connect( mActionZoomToLayers, &QAction::triggered, this, &QgisApp::zoomToLayerExtent );
connect( mActionZoomToSelected, &QAction::triggered, this, &QgisApp::zoomToSelected ); connect( mActionZoomToSelected, &QAction::triggered, this, &QgisApp::zoomToSelected );
connect( mActionZoomToAllSelected, &QAction::triggered, this, &QgisApp::zoomToAllSelected );
connect( mActionZoomLast, &QAction::triggered, this, &QgisApp::zoomToPrevious ); connect( mActionZoomLast, &QAction::triggered, this, &QgisApp::zoomToPrevious );
connect( mActionZoomNext, &QAction::triggered, this, &QgisApp::zoomToNext ); connect( mActionZoomNext, &QAction::triggered, this, &QgisApp::zoomToNext );
connect( mActionZoomActualSize, &QAction::triggered, this, &QgisApp::zoomActualSize ); connect( mActionZoomActualSize, &QAction::triggered, this, &QgisApp::zoomActualSize );
Expand Down Expand Up @@ -4097,12 +4095,10 @@ void QgisApp::setTheme( const QString &themeName )
mActionZoomOut->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomOut.svg" ) ) ); mActionZoomOut->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomOut.svg" ) ) );
mActionZoomFullExtent->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomFullExtent.svg" ) ) ); mActionZoomFullExtent->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomFullExtent.svg" ) ) );
mActionZoomToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToSelected.svg" ) ) ); mActionZoomToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToSelected.svg" ) ) );
mActionZoomToAllSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToSelected.svg" ) ) );
mActionShowRasterCalculator->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowRasterCalculator.png" ) ) ); mActionShowRasterCalculator->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowRasterCalculator.png" ) ) );
mActionShowMeshCalculator->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowMeshCalculator.png" ) ) ); mActionShowMeshCalculator->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowMeshCalculator.png" ) ) );
mActionPan->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPan.svg" ) ) ); mActionPan->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPan.svg" ) ) );
mActionPanToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPanToSelected.svg" ) ) ); mActionPanToSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPanToSelected.svg" ) ) );
mActionPanToAllSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionPanToSelected.svg" ) ) );
mActionZoomLast->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomLast.svg" ) ) ); mActionZoomLast->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomLast.svg" ) ) );
mActionZoomNext->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomNext.svg" ) ) ); mActionZoomNext->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomNext.svg" ) ) );
mActionZoomToLayer->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToLayer.svg" ) ) ); mActionZoomToLayer->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionZoomToLayer.svg" ) ) );
Expand Down Expand Up @@ -8205,12 +8201,6 @@ void QgisApp::zoomToSelected()


} }


void QgisApp::zoomToAllSelected()
{
const QList<QgsMapLayer *> layers = mMapCanvas->layers();
mMapCanvas->zoomToAllSelected( &layers );
}

void QgisApp::panToSelected() void QgisApp::panToSelected()
{ {
QList<QgsMapLayer *> layers = mLayerTreeView->selectedLayers(); QList<QgsMapLayer *> layers = mLayerTreeView->selectedLayers();
Expand All @@ -8222,12 +8212,6 @@ void QgisApp::panToSelected()
mMapCanvas->panToSelected(); mMapCanvas->panToSelected();
} }


void QgisApp::panToAllSelected()
{
const QList<QgsMapLayer *> layers = mMapCanvas->layers();
mMapCanvas->panToAllSelected( &layers );
}

void QgisApp::pan() void QgisApp::pan()
{ {
mMapCanvas->setMapTool( mMapTools.mPan ); mMapCanvas->setMapTool( mMapTools.mPan );
Expand Down Expand Up @@ -14743,7 +14727,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomToLayer->setEnabled( isSpatial ); mActionZoomToLayer->setEnabled( isSpatial );
mActionZoomToLayers->setEnabled( isSpatial ); mActionZoomToLayers->setEnabled( isSpatial );
mActionZoomToSelected->setEnabled( isSpatial ); mActionZoomToSelected->setEnabled( isSpatial );
mActionZoomToAllSelected->setEnabled( true );
mActionLabeling->setEnabled( isSpatial ); mActionLabeling->setEnabled( isSpatial );
mActionDiagramProperties->setEnabled( isSpatial ); mActionDiagramProperties->setEnabled( isSpatial );
mActionReverseLine->setEnabled( false ); mActionReverseLine->setEnabled( false );
Expand Down Expand Up @@ -14999,7 +14982,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomToLayer->setEnabled( true ); mActionZoomToLayer->setEnabled( true );
mActionZoomToLayers->setEnabled( true ); mActionZoomToLayers->setEnabled( true );
mActionZoomToSelected->setEnabled( false ); mActionZoomToSelected->setEnabled( false );
mActionZoomToAllSelected->setEnabled( true );
mActionOpenTable->setEnabled( false ); mActionOpenTable->setEnabled( false );
mActionSelectAll->setEnabled( false ); mActionSelectAll->setEnabled( false );
mActionReselect->setEnabled( false ); mActionReselect->setEnabled( false );
Expand Down Expand Up @@ -15114,7 +15096,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomToLayer->setEnabled( true ); mActionZoomToLayer->setEnabled( true );
mActionZoomToLayers->setEnabled( true ); mActionZoomToLayers->setEnabled( true );
mActionZoomToSelected->setEnabled( false ); mActionZoomToSelected->setEnabled( false );
mActionZoomToAllSelected->setEnabled( true );
mActionOpenTable->setEnabled( false ); mActionOpenTable->setEnabled( false );
mActionSelectAll->setEnabled( false ); mActionSelectAll->setEnabled( false );
mActionReselect->setEnabled( false ); mActionReselect->setEnabled( false );
Expand Down Expand Up @@ -15181,7 +15162,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomToLayer->setEnabled( true ); mActionZoomToLayer->setEnabled( true );
mActionZoomToLayers->setEnabled( true ); mActionZoomToLayers->setEnabled( true );
mActionZoomToSelected->setEnabled( false ); mActionZoomToSelected->setEnabled( false );
mActionZoomToAllSelected->setEnabled( true );
mActionOpenTable->setEnabled( false ); mActionOpenTable->setEnabled( false );
mActionSelectAll->setEnabled( false ); mActionSelectAll->setEnabled( false );
mActionReselect->setEnabled( false ); mActionReselect->setEnabled( false );
Expand Down Expand Up @@ -15248,7 +15228,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomToLayer->setEnabled( true ); mActionZoomToLayer->setEnabled( true );
mActionZoomToLayers->setEnabled( true ); mActionZoomToLayers->setEnabled( true );
mActionZoomToSelected->setEnabled( false ); mActionZoomToSelected->setEnabled( false );
mActionZoomToAllSelected->setEnabled( true );
mActionOpenTable->setEnabled( false ); mActionOpenTable->setEnabled( false );
mActionSelectAll->setEnabled( false ); mActionSelectAll->setEnabled( false );
mActionReselect->setEnabled( false ); mActionReselect->setEnabled( false );
Expand Down
6 changes: 0 additions & 6 deletions src/app/qgisapp.h
Expand Up @@ -497,7 +497,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionOffsetCurve() { return mActionOffsetCurve; } QAction *actionOffsetCurve() { return mActionOffsetCurve; }
QAction *actionPan() { return mActionPan; } QAction *actionPan() { return mActionPan; }
QAction *actionPanToSelected() { return mActionPanToSelected; } QAction *actionPanToSelected() { return mActionPanToSelected; }
QAction *actionPanToAllSelected() { return mActionPanToAllSelected; }
QAction *actionZoomIn() { return mActionZoomIn; } QAction *actionZoomIn() { return mActionZoomIn; }
QAction *actionZoomOut() { return mActionZoomOut; } QAction *actionZoomOut() { return mActionZoomOut; }
QAction *actionSelect() { return mActionSelectFeatures; } QAction *actionSelect() { return mActionSelectFeatures; }
Expand All @@ -513,7 +512,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionZoomToLayer() { return mActionZoomToLayer; } QAction *actionZoomToLayer() { return mActionZoomToLayer; }
QAction *actionZoomToLayers() { return mActionZoomToLayers; } QAction *actionZoomToLayers() { return mActionZoomToLayers; }
QAction *actionZoomToSelected() { return mActionZoomToSelected; } QAction *actionZoomToSelected() { return mActionZoomToSelected; }
QAction *actionZoomToAllSelected() { return mActionZoomToAllSelected; }
QAction *actionZoomLast() { return mActionZoomLast; } QAction *actionZoomLast() { return mActionZoomLast; }
QAction *actionZoomNext() { return mActionZoomNext; } QAction *actionZoomNext() { return mActionZoomNext; }
QAction *actionZoomActualSize() { return mActionZoomActualSize; } QAction *actionZoomActualSize() { return mActionZoomActualSize; }
Expand Down Expand Up @@ -896,12 +894,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void zoomToNext(); void zoomToNext();
//! Zoom to selected features //! Zoom to selected features
void zoomToSelected(); void zoomToSelected();
//! Zoom to selected features from multiple layers
void zoomToAllSelected();
//! Pan map to selected features //! Pan map to selected features
void panToSelected(); void panToSelected();
//! Pan map to selected features from multiple layers
void panToAllSelected();


//! open the properties dialog for the currently selected layer //! open the properties dialog for the currently selected layer
void layerProperties(); void layerProperties();
Expand Down
20 changes: 0 additions & 20 deletions src/ui/qgisapp.ui
Expand Up @@ -138,7 +138,6 @@
<addaction name="mActionNew3DMapCanvas"/> <addaction name="mActionNew3DMapCanvas"/>
<addaction name="mActionPan"/> <addaction name="mActionPan"/>
<addaction name="mActionPanToSelected"/> <addaction name="mActionPanToSelected"/>
<addaction name="mActionPanToAllSelected"/>
<addaction name="mActionZoomIn"/> <addaction name="mActionZoomIn"/>
<addaction name="mActionZoomOut"/> <addaction name="mActionZoomOut"/>
<addaction name="separator"/> <addaction name="separator"/>
Expand All @@ -148,7 +147,6 @@
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="mActionZoomFullExtent"/> <addaction name="mActionZoomFullExtent"/>
<addaction name="mActionZoomToSelected"/> <addaction name="mActionZoomToSelected"/>
<addaction name="mActionZoomToAllSelected"/>
<addaction name="mActionZoomToLayers"/> <addaction name="mActionZoomToLayers"/>
<addaction name="mActionZoomActualSize"/> <addaction name="mActionZoomActualSize"/>
<addaction name="mActionZoomLast"/> <addaction name="mActionZoomLast"/>
Expand Down Expand Up @@ -1394,15 +1392,6 @@
<string>Ctrl+J</string> <string>Ctrl+J</string>
</property> </property>
</action> </action>
<action name="mActionZoomToAllSelected">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToSelected.svg</normaloff>:/images/themes/default/mActionZoomToSelected.svg</iconset>
</property>
<property name="text">
<string>Zoom to Selection from All Layers</string>
</property>
</action>
<action name="mActionZoomLast"> <action name="mActionZoomLast">
<property name="icon"> <property name="icon">
<iconset resource="../../images/images.qrc"> <iconset resource="../../images/images.qrc">
Expand Down Expand Up @@ -2203,15 +2192,6 @@ Acts on all layers.</string>
<string>Pan Map to Selection</string> <string>Pan Map to Selection</string>
</property> </property>
</action> </action>
<action name="mActionPanToAllSelected">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionPanToSelected.svg</normaloff>:/images/themes/default/mActionPanToSelected.svg</iconset>
</property>
<property name="text">
<string>Pan Map to Selection from All Layers</string>
</property>
</action>
<action name="mActionOffsetCurve"> <action name="mActionOffsetCurve">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
Expand Down

0 comments on commit b2af412

Please sign in to comment.