src/app/qgsgraduatedsymboldialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                          qgsgraduatedsymboldialog.h  -  description
00003                              -------------------
00004     begin                : Oct 2003
00005     copyright            : (C) 2003 by Marco Hugentobler
00006     email                : mhugent@geo.unizh.ch
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 /* $Id: qgsgraduatedsymboldialog.h 9138 2008-08-23 21:37:31Z jef $ */
00018 
00019 #ifndef QGSGRADUATEDSYMBOLDIALOG_H
00020 #define QGSGRADUATEDSYMBOLDIALOG_H
00021 
00022 #include "ui_qgsgraduatedsymboldialogbase.h"
00023 #include "qgssinglesymboldialog.h"
00024 #include <map>
00025 
00026 class QgsVectorLayer;
00027 
00028 
00029 class QgsGraduatedSymbolDialog: public QDialog, private Ui::QgsGraduatedSymbolDialogBase
00030 {
00031     Q_OBJECT
00032   public:
00034     enum mode {EMPTY, EQUAL_INTERVAL, QUANTILES};
00035     QgsGraduatedSymbolDialog( QgsVectorLayer* layer );
00036     ~QgsGraduatedSymbolDialog();
00037   public slots:
00038     void apply();
00039   protected slots:
00041     void adjustNumberOfClasses();
00043     void adjustClassification();
00045     void changeCurrentValue();
00047     void applySymbologyChanges();
00049     void modifyClass( QListWidgetItem* item );
00050   protected:
00052     QgsVectorLayer* mVectorLayer;
00054     std::map<QString, int> mFieldMap;
00056     std::map<QString, QgsSymbol*> mEntries;
00058     QgsSingleSymbolDialog sydialog;
00059     int mClassificationField;
00060 
00063     int quantilesFromVectorLayer( std::list<double>& result, int attributeIndex, int numQuantiles ) const;
00069     int calculateQuantiles( std::list<double>& result, const std::vector<double>& values, int numQuantiles ) const;
00071     QColor getColorFromRamp( QString ramp, int step, int totalSteps );
00072 
00073   protected slots:
00075     void deleteCurrentClass();
00076 
00077   private:
00082     void updateEntryIcon( QgsSymbol * thepSymbol, QListWidgetItem * thepItem );
00084     QgsGraduatedSymbolDialog();
00085 };
00086 
00087 #endif

Generated on Tue Oct 28 16:51:26 2008 for Quantum GIS API Documentation by  doxygen 1.5.1