mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
[FEATURE] open layer properties from identify results
This commit is contained in:
parent
9da9d6bef8
commit
06d91a55db
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user