QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgssymbolv2selectordialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssymbolv2selectordialog.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 QGSSYMBOLV2SELECTORDIALOG_H
17 #define QGSSYMBOLV2SELECTORDIALOG_H
18 
19 #include <QDialog>
20 
21 #include "ui_qgssymbolv2selectordialogbase.h"
22 
23 #include <QStandardItemModel>
24 
25 class QgsStyleV2;
26 class QgsSymbolV2;
27 class QgsSymbolLayerV2;
28 class QgsVectorLayer;
29 
30 class QMenu;
31 class QWidget;
32 
33 class SymbolLayerItem;
34 
35 class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymbolV2SelectorDialogBase
36 {
37  Q_OBJECT
38 
39  public:
40  QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent = 0, bool embedded = false );
41 
43  QMenu* advancedMenu();
44 
45  protected:
47  void keyPressEvent( QKeyEvent * event );
48 
49  void loadSymbol();
51  void loadSymbol( QgsSymbolV2* symbol, SymbolLayerItem* parent );
52 
53  void updateUi();
54 
55  void updateLockButton();
56 
58  SymbolLayerItem* currentLayerItem();
59  QgsSymbolLayerV2* currentLayer();
60 
61  void moveLayerByOffset( int offset );
62 
63  void setWidget( QWidget* widget );
64 
65  signals:
66  void symbolModified();
67 
68  public slots:
69  void moveLayerDown();
70  void moveLayerUp();
71 
72  void addLayer();
73  void removeLayer();
74 
75  void saveSymbol();
76  void lockLayer();
77 
78  void layerChanged();
79 
80  void updateLayerPreview();
81  void updatePreview();
82 
84  void symbolChanged();
87  void changeLayer( QgsSymbolLayerV2* layer );
88 
89 
90  protected: // data
93  QMenu* mAdvancedMenu;
95 
96  QStandardItemModel* model;
97  QWidget *mPresentWidget;
98 };
99 
100 #endif
Definition: qgssymbolv2selectordialog.h:35
QStandardItemModel * model
Definition: qgssymbolv2selectordialog.h:96
Definition: qgssymbollayerv2.h:45
const QgsVectorLayer * mVectorLayer
Definition: qgssymbolv2selectordialog.h:94
QMenu * mAdvancedMenu
Definition: qgssymbolv2selectordialog.h:93
Definition: qgssymbolv2.h:43
Definition: qgsstylev2.h:66
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:468
Definition: qgssymbolv2selectordialog.cpp:50
QgsSymbolV2 * mSymbol
Definition: qgssymbolv2selectordialog.h:92
QWidget * mPresentWidget
Definition: qgssymbolv2selectordialog.h:97
QgsStyleV2 * mStyle
Definition: qgssymbolv2selectordialog.h:91