QGIS API Documentation  2.5.0-Master
 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 );
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 
51  signals:
52  void changed();
53 
54  protected:
57 
58  void populateSymbolView();
59  void populateSymbols( QStringList symbols );
60  void updateSymbolColor();
61  void updateSymbolInfo();
62 
63  private:
65  void displayTransparency( double alpha );
67  void populateGroups( QString parent = "", QString prepend = "" );
68 };
69 
70 #endif //QGSSYMBOLSLISTWIDGET_H
71 
72 
73 
static unsigned index
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)
double size
Definition: qgssvgcache.cpp:77