Skip to content
Permalink
Browse files

Merge pull request #2749 from pvalsecc/add_selectall

Add select all button to the attribute table dialog
  • Loading branch information
nyalldawson committed Feb 1, 2016
2 parents 2797ed7 + f8a50b5 commit ad39ddfdd45722c2744063aad60cead03c9a393e
Showing with 37 additions and 0 deletions.
  1. +6 −0 src/app/qgsattributetabledialog.cpp
  2. +4 −0 src/app/qgsattributetabledialog.h
  3. +27 −0 src/ui/qgsattributetabledialog.ui
@@ -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 );
@@ -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
*/
@@ -232,6 +232,32 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mSelectAllButton">
<property name="toolTip">
<string>Select all (Ctrl+A)</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionSelectAll.png</normaloff>:/images/themes/default/mActionSelectAll.png</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="shortcut">
<string>Ctrl+A</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mSelectedToTopButton">
<property name="toolTip">
@@ -814,6 +840,7 @@
</customwidgets>
<tabstops>
<tabstop>mRemoveSelectionButton</tabstop>
<tabstop>mSelectAllButton</tabstop>
<tabstop>mSelectedToTopButton</tabstop>
<tabstop>mInvertSelectionButton</tabstop>
<tabstop>mCopySelectedRowsButton</tabstop>

0 comments on commit ad39ddf

Please sign in to comment.
You can’t perform that action at this time.