QGIS API Documentation  master-6227475
src/gui/symbology-ng/qgsstylev2managerdialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     qgsstylev2managerdialog.h
00003     ---------------------
00004     begin                : November 2009
00005     copyright            : (C) 2009 by Martin Dobias
00006     email                : wonder dot sk at gmail dot 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 QGSSTYLEV2MANAGERDIALOG_H
00017 #define QGSSTYLEV2MANAGERDIALOG_H
00018 
00019 #include <QDialog>
00020 #include <QStandardItem>
00021 #include <QAction>
00022 #include <QMenu>
00023 
00024 #include "ui_qgsstylev2managerdialogbase.h"
00025 #include "qgscontexthelp.h"
00026 
00027 class QgsStyleV2;
00028 
00029 class GUI_EXPORT QgsStyleV2ManagerDialog : public QDialog, private Ui::QgsStyleV2ManagerDialogBase
00030 {
00031     Q_OBJECT
00032 
00033   public:
00034     QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* parent = NULL );
00035 
00037     static QString addColorRampStatic( QWidget* parent, QgsStyleV2* style,
00038                                        QString RampType = QString() );
00039 
00040   public slots:
00041     void addItem();
00042     void editItem();
00043     void removeItem();
00044     void exportItems();
00045     void importItems();
00046 
00047     void on_tabItemType_currentChanged( int );
00049     void populateList();
00050 
00052     void onFinished();
00053 
00054     void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
00055 
00056     void itemChanged( QStandardItem* item );
00057 
00058     void groupChanged( const QModelIndex& );
00059     void groupRenamed( QStandardItem * );
00060     void addGroup();
00061     void removeGroup();
00062 
00064     void groupSymbolsAction();
00065 
00067     void editSmartgroupAction();
00068 
00070     void regrouped( QStandardItem* );
00071 
00073     void filterSymbols( QString );
00074 
00076     void tagsChanged();
00077 
00079     void symbolSelected( const QModelIndex& );
00080 
00082     void grouptreeContextMenu( const QPoint& );
00083 
00085     void listitemsContextMenu( const QPoint& );
00086 
00087   protected slots:
00088     bool addColorRamp( QAction* action );
00089 
00090   protected:
00091 
00093     void populateTypes();
00094 
00096     void populateGroups();
00098     void buildGroupTree( QStandardItem* &parent );
00100     void setSymbolsChecked( QStringList );
00101 
00103     void populateSymbols( QStringList symbolNames, bool checkable = false );
00104 
00106     void populateColorRamps( QStringList colorRamps, bool check );
00107 
00108     int currentItemType();
00109     QString currentItemName();
00110 
00112     bool addSymbol();
00114     bool addColorRamp();
00115 
00116     bool editSymbol();
00117     bool editColorRamp();
00118 
00119     bool removeSymbol();
00120     bool removeColorRamp();
00121 
00123     void enableSymbolInputs( bool );
00125     void enableGroupInputs( bool );
00127     void enableItemsForGroupingMode( bool );
00128 
00130     bool eventFilter( QObject* , QEvent* );
00131 
00133     void setBold( QStandardItem* );
00134 
00135     QgsStyleV2* mStyle;
00136 
00137     QString mStyleFilename;
00138 
00139     bool mModified;
00140 
00142     bool mGrouppingMode;
00143 
00145     QStringList mTagList;
00146 };
00147 
00148 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines