QGIS API Documentation  master-59fd5e0
src/gui/symbology-ng/qgssymbolslistwidget.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     qgssymbolslistwidget.h
00003     ---------------------
00004     begin                : June 2012
00005     copyright            : (C) 2012 by Arunmozhi
00006     email                : aruntheguy at gmail.com
00007  ***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 #ifndef QGSSYMBOLSLISTWIDGET_H
00017 #define QGSSYMBOLSLISTWIDGET_H
00018 
00019 #include "ui_widget_symbolslist.h"
00020 
00021 #include <QWidget>
00022 
00023 class QgsSymbolV2;
00024 class QgsStyleV2;
00025 
00026 class QMenu;
00027 
00028 class GUI_EXPORT QgsSymbolsListWidget : public QWidget, private Ui::SymbolsListWidget
00029 {
00030     Q_OBJECT
00031 
00032   public:
00033     QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* style, QMenu* menu, QWidget* parent );
00034 
00035   public slots:
00036     void setSymbolFromStyle( const QModelIndex & index );
00037     void setSymbolColor( const QColor& color );
00038     void setMarkerAngle( double angle );
00039     void setMarkerSize( double size );
00040     void setLineWidth( double width );
00041     void addSymbolToStyle();
00042     void on_mSymbolUnitComboBox_currentIndexChanged( const QString & text );
00043     void on_mTransparencySlider_valueChanged( int value );
00044 
00045     void on_groupsCombo_currentIndexChanged( int index );
00046     void on_groupsCombo_editTextChanged( const QString &text );
00047 
00048     void openStyleManager();
00049 
00050   signals:
00051     void changed();
00052 
00053   protected:
00054     QgsSymbolV2* mSymbol;
00055     QgsStyleV2* mStyle;
00056 
00057     void populateSymbolView();
00058     void populateSymbols( QStringList symbols );
00059     void updateSymbolColor();
00060     void updateSymbolInfo();
00061 
00062   private:
00064     void displayTransparency( double alpha );
00066     void populateGroups( QString parent = "", QString prepend = "" );
00067 };
00068 
00069 #endif //QGSSYMBOLSLISTWIDGET_H
00070 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines