QGIS API Documentation  2.11.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsstylev2managerdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsstylev2managerdialog.h
3  ---------------------
4  begin : November 2009
5  copyright : (C) 2009 by Martin Dobias
6  email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSSTYLEV2MANAGERDIALOG_H
17 #define QGSSTYLEV2MANAGERDIALOG_H
18 
19 #include <QDialog>
20 #include <QStandardItem>
21 #include <QAction>
22 #include <QMenu>
23 
24 #include "ui_qgsstylev2managerdialogbase.h"
25 #include "qgscontexthelp.h"
26 
27 class QgsStyleV2;
28 
29 class GUI_EXPORT QgsStyleV2ManagerDialog : public QDialog, private Ui::QgsStyleV2ManagerDialogBase
30 {
31  Q_OBJECT
32 
33  public:
34  QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* parent = NULL );
35 
37  static QString addColorRampStatic( QWidget* parent, QgsStyleV2* style,
38  QString RampType = QString() );
39 
40  public slots:
41  void addItem();
42  void editItem();
43  void removeItem();
44  void exportItemsSVG();
45  void exportItemsPNG();
46  void exportSelectedItemsImages( QString dir, QString format, QSize size );
47  void exportItems();
48  void importItems();
49 
50  void on_tabItemType_currentChanged( int );
52  void populateList();
53 
55  void onFinished();
56 
58 
59  void itemChanged( QStandardItem* item );
60 
61  void groupChanged( const QModelIndex& );
62  void groupRenamed( QStandardItem * );
63  void addGroup();
64  void removeGroup();
65 
67  void groupSymbolsAction();
68 
70  void editSmartgroupAction();
71 
73  void regrouped( QStandardItem* );
74 
76  void filterSymbols( QString );
77 
79  void tagsChanged();
80 
82  void symbolSelected( const QModelIndex& );
83 
85  void grouptreeContextMenu( const QPoint& );
86 
88  void listitemsContextMenu( const QPoint& );
89 
90  protected slots:
91  bool addColorRamp( QAction* action );
92 
93  protected:
94 
96  void populateTypes();
97 
99  void populateGroups();
101  void buildGroupTree( QStandardItem* &parent );
103  void setSymbolsChecked( QStringList );
104 
106  void populateSymbols( QStringList symbolNames, bool checkable = false );
107 
109  void populateColorRamps( QStringList colorRamps, bool checkable = false );
110 
111  int currentItemType();
112  QString currentItemName();
113 
115  bool addSymbol();
117  bool addColorRamp();
118 
119  bool editSymbol();
120  bool editColorRamp();
121 
122  bool removeSymbol();
123  bool removeColorRamp();
124 
126  void enableSymbolInputs( bool );
128  void enableGroupInputs( bool );
130  void enableItemsForGroupingMode( bool );
131 
133  bool eventFilter( QObject*, QEvent* ) override;
134 
136  void setBold( QStandardItem* );
137 
139 
141 
142  bool mModified;
143 
146 
149 };
150 
151 #endif
const char * className() const
virtual const QMetaObject * metaObject() const
QStringList mTagList
space to store symbol tags
bool mGrouppingMode
Mode to display the symbol list.
virtual bool eventFilter(QObject *o, QEvent *e)
static void run(QString context)