QGIS API Documentation  2.10.1-Pisa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgssymbolslistwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssymbolslistwidget.h
3  ---------------------
4  begin : June 2012
5  copyright : (C) 2012 by Arunmozhi
6  email : aruntheguy at gmail.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 QGSSYMBOLSLISTWIDGET_H
17 #define QGSSYMBOLSLISTWIDGET_H
18 
19 #include "ui_widget_symbolslist.h"
20 
21 #include <QWidget>
22 
23 class QgsSymbolV2;
24 class QgsStyleV2;
25 
26 class QMenu;
27 
28 class GUI_EXPORT QgsSymbolsListWidget : public QWidget, private Ui::SymbolsListWidget
29 {
30  Q_OBJECT
31 
32  public:
33  QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* style, QMenu* menu, QWidget* parent, const QgsVectorLayer * layer = 0 );
34 
35  public slots:
36  void setSymbolFromStyle( const QModelIndex & index );
37  void setSymbolColor( const QColor& color );
38  void setMarkerAngle( double angle );
39  void setMarkerSize( double size );
40  void setLineWidth( double width );
41  void addSymbolToStyle();
42  void symbolAddedToStyle( QString name, QgsSymbolV2* symbol );
43  void on_mSymbolUnitWidget_changed();
44  void on_mTransparencySlider_valueChanged( int value );
45 
46  void on_groupsCombo_currentIndexChanged( int index );
47  void on_groupsCombo_editTextChanged( const QString &text );
48 
49  void openStyleManager();
50  void clipFeaturesToggled( bool checked );
51 
52  void updateDataDefinedMarkerSize();
53  void updateDataDefinedMarkerAngle();
54  void updateDataDefinedLineWidth();
55 
56  signals:
57  void changed();
58 
59  protected:
65 
66  void populateSymbolView();
67  void populateSymbols( QStringList symbols );
68  void updateSymbolColor();
69  void updateSymbolInfo();
70 
71  private:
73  void displayTransparency( double alpha );
75  void populateGroups( QString parent = "", QString prepend = "" );
76 };
77 
78 #endif //QGSSYMBOLSLISTWIDGET_H
79 
80 
81 
static unsigned index
const QgsVectorLayer * mLayer
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Represents a vector layer which manages a vector based data sets.