diff --git a/src/app/qgsattributetabledialog.cpp b/src/app/qgsattributetabledialog.cpp index 783b1d019d4..e8262375c9f 100644 --- a/src/app/qgsattributetabledialog.cpp +++ b/src/app/qgsattributetabledialog.cpp @@ -166,6 +166,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid updateTitle(); mRemoveSelectionButton->setIcon( QgsApplication::getThemeIcon( "/mActionUnselectAttributes.png" ) ); + mSelectAllButton->setIcon( QgsApplication::getThemeIcon( "/mActionSelectAll.png" ) ); mSelectedToTopButton->setIcon( QgsApplication::getThemeIcon( "/mActionSelectedToTop.png" ) ); mCopySelectedRowsButton->setIcon( QgsApplication::getThemeIcon( "/mActionCopySelected.png" ) ); mZoomMapToSelectedRowsButton->setIcon( QgsApplication::getThemeIcon( "/mActionZoomToSelected.svg" ) ); @@ -626,6 +627,11 @@ void QgsAttributeTableDialog::on_mRemoveSelectionButton_clicked() mLayer->removeSelection(); } +void QgsAttributeTableDialog::on_mSelectAllButton_clicked() +{ + mLayer->selectAll(); +} + void QgsAttributeTableDialog::on_mDeleteSelectedButton_clicked() { QgisApp::instance()->deleteSelected( mLayer, this ); diff --git a/src/app/qgsattributetabledialog.h b/src/app/qgsattributetabledialog.h index b33c3ebdbc5..a4794ac98df 100644 --- a/src/app/qgsattributetabledialog.h +++ b/src/app/qgsattributetabledialog.h @@ -98,6 +98,10 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib * Clears selection */ void on_mRemoveSelectionButton_clicked(); + /** + * Select all + */ + void on_mSelectAllButton_clicked(); /** * Zooms to selected features */ diff --git a/src/ui/qgsattributetabledialog.ui b/src/ui/qgsattributetabledialog.ui index d0da0d460c1..74674a2c938 100644 --- a/src/ui/qgsattributetabledialog.ui +++ b/src/ui/qgsattributetabledialog.ui @@ -232,6 +232,32 @@ + + + + Select all (Ctrl+A) + + + + + + + :/images/themes/default/mActionSelectAll.png:/images/themes/default/mActionSelectAll.png + + + + 18 + 18 + + + + Ctrl+A + + + true + + + @@ -814,6 +840,7 @@ mRemoveSelectionButton + mSelectAllButton mSelectedToTopButton mInvertSelectionButton mCopySelectedRowsButton