37 connect( a, SIGNAL( triggered() ),
this, SLOT(
addGroup() ) );
54 QAction* a =
new QAction(
tr(
"&Show in overview" ), parent );
55 connect( a, SIGNAL( triggered() ),
this, SLOT(
showInOverview() ) );
56 a->setCheckable(
true );
63 QAction* a =
new QAction(
tr(
"Re&name" ), parent );
74 QAction* a =
new QAction(
tr(
"Show Feature Count" ), parent );
76 a->setCheckable(
true );
77 a->setChecked( node->
customProperty(
"showFeatureCount", 0 ).toInt() );
84 tr(
"&Zoom to Layer" ), parent );
85 a->setData( QVariant::fromValue( reinterpret_cast<void*>( canvas ) ) );
86 connect( a, SIGNAL( triggered() ),
this, SLOT(
zoomToLayer() ) );
93 tr(
"&Zoom to Group" ), parent );
94 a->setData( QVariant::fromValue( reinterpret_cast<void*>( canvas ) ) );
95 connect( a, SIGNAL( triggered() ),
this, SLOT(
zoomToGroup() ) );
101 QAction* a =
new QAction(
tr(
"&Move to Top-level" ), parent );
102 connect( a, SIGNAL( triggered() ),
this, SLOT(
makeTopLevel() ) );
108 QAction* a =
new QAction(
tr(
"&Group Selected" ), parent );
109 connect( a, SIGNAL( triggered() ),
this, SLOT(
groupSelected() ) );
163 QList<QgsMapLayer*> layers;
174 QList<QgsMapLayer*> layers;
183 QAction* s = qobject_cast<QAction*>( sender() );
190 QAction* s = qobject_cast<QAction*>( sender() );
201 for (
int i = 0; i < layers.size(); ++i )
215 layerExtent = vLayer->
extent();
219 if ( layerExtent.
isNull() )
233 extent.
scale( 1.05 );
244 QString newName = prefix +
"1";
245 for (
int i = 2; parentGroup->
findGroup( newName ); ++i )
246 newName = prefix + QString::number( i );
259 if ( !parentGroup || parentGroup == rootGroup )
275 int insertIdx = parentGroup->
children().indexOf( nodes[0] );