Skip to content

Commit feab3ad

Browse files
committedOct 28, 2015
Merge pull request #2405 from elpaso/symbol-export-select-by-group
Interactive selection by group of exported symbols
2 parents 6a4544f + a141ffb commit feab3ad

9 files changed

+537
-0
lines changed
 

‎python/gui/gui.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
%Include symbology-ng/qgssinglesymbolrendererv2widget.sip
189189
%Include symbology-ng/qgssmartgroupeditordialog.sip
190190
%Include symbology-ng/qgsstylev2managerdialog.sip
191+
%Include symbology-ng/qgsstylev2groupselectiondialog.sip
191192
%Include symbology-ng/qgssymbollayerv2widget.sip
192193
%Include symbology-ng/qgssymbollevelsv2dialog.sip
193194
%Include symbology-ng/qgssymbolslistwidget.sip

‎python/gui/symbology-ng/qgsstylev2exportimportdialog.sip

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,51 @@ class QgsStyleV2ExportImportDialog : QDialog
1515
QgsStyleV2ExportImportDialog( QgsStyleV2* style, QWidget *parent /TransferThis/ = NULL, Mode mode = Export );
1616
~QgsStyleV2ExportImportDialog();
1717

18+
/**
19+
* @brief selectSymbols select symbols by name
20+
* @param symbolNames list of symbol names
21+
*/
22+
void selectSymbols(const QStringList symbolNames);
23+
/**
24+
* @brief deselectSymbols deselect symbols by name
25+
* @param symbolNames list of symbol names
26+
*/
27+
void deselectSymbols(const QStringList symbolNames);
28+
1829
public slots:
1930
void doExportImport();
31+
/**
32+
* @brief selectByGroup open select by group dialog
33+
*/
34+
void selectByGroup();
35+
/**
36+
* @brief selectAll selects all symbols
37+
*/
2038
void selectAll();
39+
/**
40+
* @brief clearSelection deselects all symbols
41+
*/
2142
void clearSelection();
43+
/**
44+
* Select the symbols belonging to the given group
45+
* @param groupName the name of the group to be selected
46+
*/
47+
void selectGroup( const QString groupName );
48+
/**
49+
* Unselect the symbols belonging to the given group
50+
* @param groupName the name of the group to be deselected
51+
*/
52+
void deselectGroup(const QString groupName);
53+
/**
54+
* @brief selectSmartgroup selects all symbols from a smart group
55+
* @param groupName
56+
*/
57+
void selectSmartgroup(const QString groupName);
58+
/**
59+
* @brief deselectSmartgroup deselects all symbols from a smart group
60+
* @param groupName
61+
*/
62+
void deselectSmartgroup(const QString groupName);
2263

2364
void importTypeChanged( int );
2465
void browse();
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/***************************************************************************
2+
qgsstylev2groupselectiondialog.h
3+
---------------------
4+
begin : Oct 2015
5+
copyright : (C) 2015 by Alessandro Pasotti
6+
email : elpaso at itopen dot it
7+
8+
***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
18+
class QgsStyleV2GroupSelectionDialog : public QDialog, private Ui::SymbolsV2GroupSelectionDialogBase
19+
{
20+
%TypeHeaderCode
21+
#include <qgsstylev2groupselectiondialog.h>
22+
%End
23+
24+
public:
25+
QgsStyleV2GroupSelectionDialog(QgsStyleV2* style, QWidget *parent = 0);
26+
~QgsStyleV2GroupSelectionDialog();
27+
//! Set bold font for item
28+
void setBold(QStandardItem *item);
29+
30+
signals:
31+
//! group with groupName has been selected
32+
void groupSelected( const QString groupName );
33+
//! group with groupName has been deselected
34+
void groupDeselected( const QString groupName );
35+
//! smartgroup with groupName has been selected
36+
void smartgroupSelected( const QString groupName);
37+
//! smart group with groupName has been deselected
38+
void smartgroupDeselected( const QString groupName );
39+
//! all deselected
40+
void allDeselected( );
41+
//! all selected
42+
void allSelected( );
43+
44+
};
45+
46+
47+

‎src/gui/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SET(QGIS_GUI_SRCS
2424
symbology-ng/qgsinvertedpolygonrendererwidget.cpp
2525
symbology-ng/qgsrendererv2propertiesdialog.cpp
2626
symbology-ng/qgsstylev2managerdialog.cpp
27+
symbology-ng/qgsstylev2groupselectiondialog.cpp
2728
symbology-ng/qgssymbollevelsv2dialog.cpp
2829
symbology-ng/qgssymbolv2selectordialog.cpp
2930
symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
@@ -419,6 +420,7 @@ SET(QGIS_GUI_MOC_HDRS
419420
symbology-ng/qgssinglesymbolrendererv2widget.h
420421
symbology-ng/qgssmartgroupeditordialog.h
421422
symbology-ng/qgsstylev2exportimportdialog.h
423+
symbology-ng/qgsstylev2groupselectiondialog.h
422424
symbology-ng/qgsstylev2managerdialog.h
423425
symbology-ng/qgssvgselectorwidget.h
424426
symbology-ng/qgssymbollayerv2widget.h

‎src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
* (at your option) any later version. *
1414
* *
1515
***************************************************************************/
16+
1617
#include "qgsstylev2exportimportdialog.h"
18+
#include "ui_qgsstylev2exportimportdialogbase.h"
1719

1820
#include "qgsstylev2.h"
1921
#include "qgssymbolv2.h"
@@ -28,6 +30,7 @@
2830
#include <QPushButton>
2931
#include <QStandardItemModel>
3032

33+
3134
QgsStyleV2ExportImportDialog::QgsStyleV2ExportImportDialog( QgsStyleV2* style, QWidget *parent, Mode mode )
3235
: QDialog( parent )
3336
, mDialogMode( mode )
@@ -46,12 +49,14 @@ QgsStyleV2ExportImportDialog::QgsStyleV2ExportImportDialog( QgsStyleV2* style, Q
4649
connect( pb, SIGNAL( clicked() ), this, SLOT( clearSelection() ) );
4750

4851
QStandardItemModel* model = new QStandardItemModel( listItems );
52+
4953
listItems->setModel( model );
5054

5155
mTempStyle = new QgsStyleV2();
5256
// TODO validate
5357
mFileName = "";
5458
mProgressDlg = NULL;
59+
mGroupSelectionDlg = NULL;
5560
mTempFile = NULL;
5661
mNetManager = new QNetworkAccessManager( this );
5762
mNetReply = NULL;
@@ -87,6 +92,10 @@ QgsStyleV2ExportImportDialog::QgsStyleV2ExportImportDialog( QgsStyleV2* style, Q
8792
importTypeCombo->setHidden( true );
8893
locationLabel->setHidden( true );
8994
locationLineEdit->setHidden( true );
95+
96+
pb = new QPushButton( tr( "Select by group" ) );
97+
buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
98+
connect( pb, SIGNAL( clicked() ), this, SLOT( selectByGroup() ) );
9099
groupLabel->setHidden( true );
91100
groupCombo->setHidden( true );
92101

@@ -95,6 +104,7 @@ QgsStyleV2ExportImportDialog::QgsStyleV2ExportImportDialog( QgsStyleV2* style, Q
95104
{
96105
QApplication::postEvent( this, new QCloseEvent() );
97106
}
107+
98108
}
99109

100110
// use Ok button for starting import and export operations
@@ -370,6 +380,7 @@ QgsStyleV2ExportImportDialog::~QgsStyleV2ExportImportDialog()
370380
{
371381
delete mTempFile;
372382
delete mTempStyle;
383+
delete mGroupSelectionDlg;
373384
}
374385

375386
void QgsStyleV2ExportImportDialog::selectAll()
@@ -382,6 +393,80 @@ void QgsStyleV2ExportImportDialog::clearSelection()
382393
listItems->clearSelection();
383394
}
384395

396+
397+
void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames )
398+
{
399+
foreach ( QString symbolName, symbolNames )
400+
{
401+
QModelIndexList indexes = listItems->model()->match( listItems->model()->index( 0, 0 ), Qt::DisplayRole, symbolName , 1, Qt::MatchFixedString | Qt::MatchCaseSensitive );
402+
foreach ( QModelIndex index, indexes )
403+
{
404+
listItems->selectionModel()->select( index, QItemSelectionModel::Select );
405+
}
406+
}
407+
}
408+
409+
410+
void QgsStyleV2ExportImportDialog::deselectSymbols( const QStringList symbolNames )
411+
{
412+
foreach ( QString symbolName, symbolNames )
413+
{
414+
QModelIndexList indexes = listItems->model()->match( listItems->model()->index( 0, 0 ), Qt::DisplayRole, symbolName , 1, Qt::MatchFixedString | Qt::MatchCaseSensitive );
415+
foreach ( QModelIndex index, indexes )
416+
{
417+
QItemSelection deselection( index, index );
418+
listItems->selectionModel()->select( deselection, QItemSelectionModel::Deselect );
419+
}
420+
}
421+
}
422+
423+
void QgsStyleV2ExportImportDialog::selectGroup( const QString groupName )
424+
{
425+
QStringList symbolNames = mQgisStyle->symbolsOfGroup( QgsStyleV2::StyleEntity::SymbolEntity, mQgisStyle->groupId( groupName ) );
426+
selectSymbols( symbolNames );
427+
}
428+
429+
430+
void QgsStyleV2ExportImportDialog::deselectGroup( const QString groupName )
431+
{
432+
QStringList symbolNames = mQgisStyle->symbolsOfGroup( QgsStyleV2::StyleEntity::SymbolEntity, mQgisStyle->groupId( groupName ) );
433+
deselectSymbols( symbolNames );
434+
}
435+
436+
437+
void QgsStyleV2ExportImportDialog::selectSmartgroup( const QString groupName )
438+
{
439+
QStringList symbolNames = mQgisStyle->symbolsOfSmartgroup( QgsStyleV2::StyleEntity::SymbolEntity, mQgisStyle->smartgroupId( groupName ) );
440+
selectSymbols( symbolNames );
441+
}
442+
443+
444+
void QgsStyleV2ExportImportDialog::deselectSmartgroup( const QString groupName )
445+
{
446+
QStringList symbolNames = mQgisStyle->symbolsOfSmartgroup( QgsStyleV2::StyleEntity::SymbolEntity, mQgisStyle->smartgroupId( groupName ) );
447+
deselectSymbols( symbolNames );
448+
}
449+
450+
451+
void QgsStyleV2ExportImportDialog::selectByGroup( )
452+
{
453+
if ( ! mGroupSelectionDlg )
454+
{
455+
mGroupSelectionDlg = new QgsStyleV2GroupSelectionDialog( mQgisStyle, this );
456+
mGroupSelectionDlg->setWindowTitle( tr( "Select symbols by group" ) );
457+
connect( mGroupSelectionDlg, SIGNAL( groupSelected( const QString ) ), this, SLOT( selectGroup( const QString ) ) );
458+
connect( mGroupSelectionDlg, SIGNAL( groupDeselected( const QString ) ), this, SLOT( deselectGroup( const QString ) ) );
459+
connect( mGroupSelectionDlg, SIGNAL( allSelected( ) ), this, SLOT( selectAll( ) ) );
460+
connect( mGroupSelectionDlg, SIGNAL( allDeselected( ) ), this, SLOT( clearSelection( ) ) );
461+
connect( mGroupSelectionDlg, SIGNAL( smartgroupSelected( const QString ) ), this, SLOT( selectSmartgroup( const QString ) ) );
462+
connect( mGroupSelectionDlg, SIGNAL( smartgroupDeselected( const QString ) ), this, SLOT( deselectSmartgroup( const QString ) ) );
463+
}
464+
mGroupSelectionDlg->show();
465+
mGroupSelectionDlg->raise();
466+
mGroupSelectionDlg->activateWindow();
467+
}
468+
469+
385470
void QgsStyleV2ExportImportDialog::importTypeChanged( int index )
386471
{
387472
QString type = importTypeCombo->itemData( index ).toString();

‎src/gui/symbology-ng/qgsstylev2exportimportdialog.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <QTemporaryFile>
2424
#include <QNetworkAccessManager>
2525
#include <QNetworkReply>
26+
#include <QStandardItem>
27+
28+
#include "qgsstylev2groupselectiondialog.h"
2629

2730
#include "ui_qgsstylev2exportimportdialogbase.h"
2831

@@ -43,11 +46,51 @@ class GUI_EXPORT QgsStyleV2ExportImportDialog : public QDialog, private Ui::QgsS
4346
// mode argument must be 0 for saving and 1 for loading
4447
QgsStyleV2ExportImportDialog( QgsStyleV2* style, QWidget *parent = NULL, Mode mode = Export );
4548
~QgsStyleV2ExportImportDialog();
49+
/**
50+
* @brief selectSymbols select symbols by name
51+
* @param symbolNames list of symbol names
52+
*/
53+
void selectSymbols( const QStringList symbolNames );
54+
/**
55+
* @brief deselectSymbols deselect symbols by name
56+
* @param symbolNames list of symbol names
57+
*/
58+
void deselectSymbols( const QStringList symbolNames );
4659

4760
public slots:
4861
void doExportImport();
62+
/**
63+
* @brief selectByGroup open select by group dialog
64+
*/
65+
void selectByGroup();
66+
/**
67+
* @brief selectAll selects all symbols
68+
*/
4969
void selectAll();
70+
/**
71+
* @brief clearSelection deselects all symbols
72+
*/
5073
void clearSelection();
74+
/**
75+
* Select the symbols belonging to the given group
76+
* @param groupName the name of the group to be selected
77+
*/
78+
void selectGroup( const QString groupName );
79+
/**
80+
* Unselect the symbols belonging to the given group
81+
* @param groupName the name of the group to be deselected
82+
*/
83+
void deselectGroup( const QString groupName );
84+
/**
85+
* @brief selectSmartgroup selects all symbols from a smart group
86+
* @param groupName
87+
*/
88+
void selectSmartgroup( const QString groupName );
89+
/**
90+
* @brief deselectSmartgroup deselects all symbols from a smart group
91+
* @param groupName
92+
*/
93+
void deselectSmartgroup( const QString groupName );
5194

5295
void importTypeChanged( int );
5396
void browse();
@@ -64,6 +107,7 @@ class GUI_EXPORT QgsStyleV2ExportImportDialog : public QDialog, private Ui::QgsS
64107
void moveStyles( QModelIndexList* selection, QgsStyleV2* src, QgsStyleV2* dst );
65108

66109
QProgressDialog *mProgressDlg;
110+
QgsStyleV2GroupSelectionDialog *mGroupSelectionDlg;
67111
QTemporaryFile *mTempFile;
68112
QNetworkAccessManager *mNetManager;
69113
QNetworkReply *mNetReply;
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
/***************************************************************************
2+
qgsstylev2groupselectiondialog.h
3+
---------------------
4+
begin : Oct 2015
5+
copyright : (C) 2015 by Alessandro Pasotti
6+
email : elpaso at itopen dot it
7+
8+
***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
18+
#include "qgsstylev2groupselectiondialog.h"
19+
#include "qgsstylev2.h"
20+
21+
#include <QStandardItemModel>
22+
#include <QStandardItem>
23+
24+
25+
QgsStyleV2GroupSelectionDialog::QgsStyleV2GroupSelectionDialog( QgsStyleV2 *style, QWidget *parent ) :
26+
QDialog( parent )
27+
, mStyle( style )
28+
{
29+
setupUi( this );
30+
31+
QStandardItemModel* model = new QStandardItemModel( groupTree );
32+
groupTree->setModel( model );
33+
34+
QStandardItem *allSymbols = new QStandardItem( tr( "All Symbols" ) );
35+
allSymbols->setData( "all", Qt::UserRole + 2 );
36+
allSymbols->setEditable( false );
37+
setBold( allSymbols );
38+
model->appendRow( allSymbols );
39+
40+
QStandardItem *group = new QStandardItem( "" ); //require empty name to get first order groups
41+
group->setData( "groupsheader", Qt::UserRole + 2 );
42+
group->setEditable( false );
43+
group->setFlags( group->flags() & ~Qt::ItemIsSelectable );
44+
buildGroupTree( group );
45+
group->setText( tr( "Groups" ) );//set title later
46+
QStandardItem *ungrouped = new QStandardItem( tr( "Ungrouped" ) );
47+
ungrouped->setData( 0 );
48+
ungrouped->setData( "group", Qt::UserRole + 2 );
49+
setBold( ungrouped );
50+
setBold( group );
51+
group->appendRow( ungrouped );
52+
model->appendRow( group );
53+
54+
QStandardItem *tag = new QStandardItem( tr( "Smart Groups" ) );
55+
tag->setData( "smartgroupsheader" , Qt::UserRole + 2 );
56+
tag->setEditable( false );
57+
tag->setFlags( group->flags() & ~Qt::ItemIsSelectable );
58+
setBold( tag );
59+
QgsSymbolGroupMap sgMap = mStyle->smartgroupsListMap();
60+
QgsSymbolGroupMap::const_iterator i = sgMap.constBegin();
61+
while ( i != sgMap.constEnd() )
62+
{
63+
QStandardItem *item = new QStandardItem( i.value() );
64+
item->setEditable( false );
65+
item->setData( i.key() );
66+
item->setData( "smartgroup" , Qt::UserRole + 2 );
67+
tag->appendRow( item );
68+
++i;
69+
}
70+
model->appendRow( tag );
71+
72+
// expand things in the group tree
73+
int rows = model->rowCount( model->indexFromItem( model->invisibleRootItem() ) );
74+
for ( int i = 0; i < rows; i++ )
75+
{
76+
groupTree->setExpanded( model->indexFromItem( model->item( i ) ), true );
77+
}
78+
connect( groupTree->selectionModel(), SIGNAL( selectionChanged( const QItemSelection&, const QItemSelection& ) ), this, SLOT( groupTreeSelectionChanged( const QItemSelection&, const QItemSelection& ) ) );
79+
}
80+
81+
82+
QgsStyleV2GroupSelectionDialog::~QgsStyleV2GroupSelectionDialog()
83+
{
84+
}
85+
86+
87+
void QgsStyleV2GroupSelectionDialog::setBold( QStandardItem* item )
88+
{
89+
QFont font = item->font();
90+
font.setBold( true );
91+
item->setFont( font );
92+
}
93+
94+
95+
void QgsStyleV2GroupSelectionDialog::groupTreeSelectionChanged( const QItemSelection &selected, const QItemSelection &deselected )
96+
{
97+
QModelIndex index;
98+
QModelIndexList selectedItems = selected.indexes();
99+
QModelIndexList deselectedItems = deselected.indexes();
100+
101+
foreach ( index, deselectedItems )
102+
{
103+
if ( index.data( Qt::UserRole + 2 ).toString() == "groupsheader" )
104+
{
105+
// Ignore: it's the group header
106+
}
107+
else if ( index.data( Qt::UserRole + 2 ).toString() == "all" )
108+
{
109+
emit allDeselected( );
110+
}
111+
else if ( index.data( Qt::UserRole + 2 ).toString() == "smartgroupsheader" )
112+
{
113+
// Ignore: it's the smartgroups header
114+
}
115+
else if ( index.data( Qt::UserRole + 2 ).toString() == "smartgroup" )
116+
{
117+
emit smartgroupDeselected( index.data( ).toString() );
118+
}
119+
else if ( index.data( Qt::UserRole + 2 ).toString() == "group" )
120+
{ // It's a group
121+
emit groupDeselected( index.data( ).toString() );
122+
}
123+
}
124+
foreach ( index, selectedItems )
125+
{
126+
if ( index.data( Qt::UserRole + 2 ).toString( ) == "groupsheader" )
127+
{
128+
// Ignore: it's the group header
129+
}
130+
else if ( index.data( Qt::UserRole + 2 ).toString() == "all" )
131+
{
132+
emit allSelected( );
133+
}
134+
else if ( index.data( Qt::UserRole + 2 ).toString() == "smartgroupsheader" )
135+
{
136+
// Ignore: it's the smartgroups header
137+
}
138+
else if ( index.data( Qt::UserRole + 2 ).toString() == "smartgroup" )
139+
{
140+
emit smartgroupSelected( index.data( ).toString() );
141+
}
142+
else if ( index.data( Qt::UserRole + 2 ).toString() == "group" )
143+
{ // It's a group
144+
emit groupSelected( index.data( ).toString() );
145+
}
146+
}
147+
}
148+
149+
150+
void QgsStyleV2GroupSelectionDialog::buildGroupTree( QStandardItem* &parent )
151+
{
152+
QgsSymbolGroupMap groups = mStyle->childGroupNames( parent->text() );
153+
QgsSymbolGroupMap::const_iterator i = groups.constBegin();
154+
while ( i != groups.constEnd() )
155+
{
156+
QStandardItem *item = new QStandardItem( i.value() );
157+
item->setData( i.key() );
158+
item->setData( "group" , Qt::UserRole + 2 );
159+
item->setEditable( false );
160+
parent->appendRow( item );
161+
buildGroupTree( item );
162+
++i;
163+
}
164+
}
165+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/***************************************************************************
2+
qgsstylev2groupselectiondialog.h
3+
---------------------
4+
begin : Oct 2015
5+
copyright : (C) 2015 by Alessandro Pasotti
6+
email : elpaso at itopen dot it
7+
8+
***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#ifndef QGSSTYLEV2GROUPSELECTIONDIALOG_H
18+
#define QGSSTYLEV2GROUPSELECTIONDIALOG_H
19+
20+
#include <QDialog>
21+
#include <QStandardItem>
22+
#include "ui_qgsstylev2groupselectiondialogbase.h"
23+
24+
25+
class QgsStyleV2;
26+
27+
class GUI_EXPORT QgsStyleV2GroupSelectionDialog : public QDialog, private Ui::SymbolsV2GroupSelectionDialogBase
28+
{
29+
Q_OBJECT
30+
31+
public:
32+
QgsStyleV2GroupSelectionDialog( QgsStyleV2* style, QWidget *parent = 0 );
33+
~QgsStyleV2GroupSelectionDialog();
34+
//! Set bold font for item
35+
void setBold( QStandardItem *item );
36+
37+
signals:
38+
//! group with groupName has been selected
39+
void groupSelected( const QString groupName );
40+
//! group with groupName has been deselected
41+
void groupDeselected( const QString groupName );
42+
//! smartgroup with groupName has been selected
43+
void smartgroupSelected( const QString groupName );
44+
//! smart group with groupName has been deselected
45+
void smartgroupDeselected( const QString groupName );
46+
//! all deselected
47+
void allDeselected( );
48+
//! all selected
49+
void allSelected( );
50+
51+
private slots:
52+
void groupTreeSelectionChanged( const QItemSelection&selected, const QItemSelection& deselected );
53+
54+
private:
55+
/**
56+
* @brief build group tree
57+
* @param parent
58+
*/
59+
void buildGroupTree( QStandardItem *&parent );
60+
QgsStyleV2* mStyle;
61+
62+
};
63+
64+
#endif // QGSSTYLEV2GROUPSELECTIONDIALOG_H
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>SymbolsV2GroupSelectionDialogBase</class>
4+
<widget class="QDialog" name="SymbolsV2GroupSelectionDialogBase">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>287</width>
10+
<height>348</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>Group Selection Dialog</string>
15+
</property>
16+
<layout class="QVBoxLayout" name="verticalLayout">
17+
<item>
18+
<widget class="QTreeView" name="groupTree">
19+
<property name="selectionMode">
20+
<enum>QAbstractItemView::ExtendedSelection</enum>
21+
</property>
22+
<property name="headerHidden">
23+
<bool>true</bool>
24+
</property>
25+
</widget>
26+
</item>
27+
<item>
28+
<layout class="QHBoxLayout" name="horizontalLayout">
29+
<item>
30+
<spacer name="horizontalSpacer">
31+
<property name="orientation">
32+
<enum>Qt::Horizontal</enum>
33+
</property>
34+
<property name="sizeHint" stdset="0">
35+
<size>
36+
<width>40</width>
37+
<height>20</height>
38+
</size>
39+
</property>
40+
</spacer>
41+
</item>
42+
<item>
43+
<widget class="QPushButton" name="okButton">
44+
<property name="text">
45+
<string>Close</string>
46+
</property>
47+
</widget>
48+
</item>
49+
</layout>
50+
</item>
51+
</layout>
52+
</widget>
53+
<resources/>
54+
<connections>
55+
<connection>
56+
<sender>okButton</sender>
57+
<signal>clicked()</signal>
58+
<receiver>SymbolsV2GroupSelectionDialogBase</receiver>
59+
<slot>accept()</slot>
60+
<hints>
61+
<hint type="sourcelabel">
62+
<x>391</x>
63+
<y>322</y>
64+
</hint>
65+
<hint type="destinationlabel">
66+
<x>226</x>
67+
<y>173</y>
68+
</hint>
69+
</hints>
70+
</connection>
71+
<connection>
72+
<sender>SymbolsV2GroupSelectionDialogBase</sender>
73+
<signal>destroyed()</signal>
74+
<receiver>SymbolsV2GroupSelectionDialogBase</receiver>
75+
<slot>accept()</slot>
76+
<hints>
77+
<hint type="sourcelabel">
78+
<x>226</x>
79+
<y>173</y>
80+
</hint>
81+
<hint type="destinationlabel">
82+
<x>226</x>
83+
<y>173</y>
84+
</hint>
85+
</hints>
86+
</connection>
87+
</connections>
88+
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.