Skip to content
Permalink
Browse files

also add Pan to Selected button to the attribute table dialog

  • Loading branch information
alexbruy committed Jan 25, 2012
1 parent dd5f934 commit 318a827b2212a6c9b3cb36df53109098aad77f5f
Showing with 36 additions and 0 deletions.
  1. +6 −0 src/app/qgsattributetabledialog.cpp
  2. +4 −0 src/app/qgsattributetabledialog.h
  3. +26 −0 src/ui/qgsattributetabledialog.ui
@@ -90,6 +90,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
mSelectedToTopButton->setIcon( QgisApp::getThemeIcon( "/mActionSelectedToTop.png" ) );
mCopySelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionCopySelected.png" ) );
mZoomMapToSelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionZoomToSelected.png" ) );
mPanMapToSelectedRowsButton->setIcon( QgisApp::getThemeIcon( "/mActionPanToSelected.png" ) );
mInvertSelectionButton->setIcon( QgisApp::getThemeIcon( "/mActionInvertSelection.png" ) );
mToggleEditingButton->setIcon( QgisApp::getThemeIcon( "/mActionToggleEditing.png" ) );
mSaveEditsButton->setIcon( QgisApp::getThemeIcon( "/mActionSaveEdits.png" ) );
@@ -228,6 +229,11 @@ void QgsAttributeTableDialog::on_mZoomMapToSelectedRowsButton_clicked()
QgisApp::instance()->mapCanvas()->zoomToSelected( mLayer );
}

void QgsAttributeTableDialog::on_mPanMapToSelectedRowsButton_clicked()
{
QgisApp::instance()->mapCanvas()->panToSelected( mLayer );
}

void QgsAttributeTableDialog::on_mInvertSelectionButton_clicked()
{
mLayer->invertSelection();
@@ -136,6 +136,10 @@ class QgsAttributeTableDialog : public QDialog, private Ui::QgsAttributeTableDia
* Zooms to selected features
*/
void on_mZoomMapToSelectedRowsButton_clicked();
/**
* Pans to selected features
*/
void on_mPanMapToSelectedRowsButton_clicked();
/**
* Moves selected lines to the top
*/
@@ -229,6 +229,32 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mPanMapToSelectedRowsButton">
<property name="toolTip">
<string>Zoom map to the selected rows (Ctrl+J)</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>../../images/themes/default/mActionPanToSelected.png</normaloff>../../images/themes/default/mActionPanToSelected.png</iconset>
</property>
<property name="iconSize">
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="shortcut">
<string>Ctrl+J</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mToggleEditingButton">
<property name="toolTip">

0 comments on commit 318a827

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