Skip to content
Permalink
Browse files

[FEATURE] open layer properties from identify results

  • Loading branch information
jef-n committed Oct 6, 2012
1 parent 9da9d6b commit 06d91a55dbbef8bf4b8e549efd68786fdd3c3503
Showing with 17 additions and 0 deletions.
  1. +15 −0 src/app/qgsidentifyresults.cpp
  2. +2 −0 src/app/qgsidentifyresults.h
@@ -456,9 +456,11 @@ void QgsIdentifyResults::contextMenuEvent( QContextMenuEvent* event )
mActionPopup->addAction( tr( "Clear highlights" ), this, SLOT( clearHighlights() ) );
mActionPopup->addAction( tr( "Highlight all" ), this, SLOT( highlightAll() ) );
mActionPopup->addAction( tr( "Highlight layer" ), this, SLOT( highlightLayer() ) );
mActionPopup->addAction( tr( "Layer properties..." ), this, SLOT( layerProperties() ) );
mActionPopup->addSeparator();
mActionPopup->addAction( tr( "Expand all" ), this, SLOT( expandAll() ) );
mActionPopup->addAction( tr( "Collapse all" ), this, SLOT( collapseAll() ) );
mActionPopup->addSeparator();

if ( featItem && vlayer->actions()->size() > 0 )
{
@@ -938,6 +940,19 @@ void QgsIdentifyResults::highlightLayer( QTreeWidgetItem *item )
}
}

void QgsIdentifyResults::layerProperties()
{
layerProperties( lstResults->currentItem() );
}

void QgsIdentifyResults::layerProperties( QTreeWidgetItem *item )
{
QgsVectorLayer *vlayer = vectorLayer( item );
if( !vlayer )
return;

QgisApp::instance()->showLayerProperties( vlayer );
}

void QgsIdentifyResults::expandAll()
{
@@ -94,6 +94,7 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
void copyFeatureAttributes();
void highlightAll();
void highlightLayer();
void layerProperties();
void clearHighlights();
void expandAll();
void collapseAll();
@@ -126,6 +127,7 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
QTreeWidgetItem *layerItem( QObject *layer );

void highlightLayer( QTreeWidgetItem *object );
void layerProperties( QTreeWidgetItem *object );
void disconnectLayer( QObject *object );

void setColumnText( int column, const QString & label );

0 comments on commit 06d91a5

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