QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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 exportItems();
45  void importItems();
46 
47  void on_tabItemType_currentChanged( int );
49  void populateList();
50 
52  void onFinished();
53 
54  void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
55 
56  void itemChanged( QStandardItem* item );
57 
58  void groupChanged( const QModelIndex& );
59  void groupRenamed( QStandardItem * );
60  void addGroup();
61  void removeGroup();
62 
64  void groupSymbolsAction();
65 
67  void editSmartgroupAction();
68 
70  void regrouped( QStandardItem* );
71 
73  void filterSymbols( QString );
74 
76  void tagsChanged();
77 
79  void symbolSelected( const QModelIndex& );
80 
82  void grouptreeContextMenu( const QPoint& );
83 
85  void listitemsContextMenu( const QPoint& );
86 
87  protected slots:
88  bool addColorRamp( QAction* action );
89 
90  protected:
91 
93  void populateTypes();
94 
96  void populateGroups();
98  void buildGroupTree( QStandardItem* &parent );
100  void setSymbolsChecked( QStringList );
101 
103  void populateSymbols( QStringList symbolNames, bool checkable = false );
104 
106  void populateColorRamps( QStringList colorRamps, bool checkable = false );
107 
108  int currentItemType();
109  QString currentItemName();
110 
112  bool addSymbol();
114  bool addColorRamp();
115 
116  bool editSymbol();
117  bool editColorRamp();
118 
119  bool removeSymbol();
120  bool removeColorRamp();
121 
123  void enableSymbolInputs( bool );
125  void enableGroupInputs( bool );
127  void enableItemsForGroupingMode( bool );
128 
130  bool eventFilter( QObject* , QEvent* );
131 
133  void setBold( QStandardItem* );
134 
136 
137  QString mStyleFilename;
138 
139  bool mModified;
140 
143 
145  QStringList mTagList;
146 };
147 
148 #endif
QStringList mTagList
space to store symbol tags
bool mGrouppingMode
Mode to display the symbol list.
static void run(QString context)