QGIS API Documentation  master-3f58142
src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     qgsvectorgradientcolorrampv2dialog.h
00003     ---------------------
00004     begin                : December 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 QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H
00017 #define QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H
00018 
00019 #include <QDialog>
00020 
00021 #include "ui_qgsvectorgradientcolorrampv2dialogbase.h"
00022 
00023 class QgsVectorGradientColorRampV2;
00024 
00025 class GUI_EXPORT QgsVectorGradientColorRampV2Dialog : public QDialog, private Ui::QgsVectorGradientColorRampV2DialogBase
00026 {
00027     Q_OBJECT
00028 
00029   public:
00030     QgsVectorGradientColorRampV2Dialog( QgsVectorGradientColorRampV2* ramp, QWidget* parent = NULL );
00031 
00032   public slots:
00033     void setColor1( const QColor& color );
00034     void setColor2( const QColor& color );
00035 
00036     void toggledStops( bool on );
00037     void addStop();
00038     void removeStop();
00039 
00040     void stopDoubleClicked( QTreeWidgetItem* item, int column );
00041     void setItemStopColor( const QColor& newColor );
00042 
00043   protected slots:
00044     void on_cboType_currentIndexChanged( int index );
00045     void on_btnInformation_pressed();
00046 
00047   protected:
00048 
00049     void updateStops();
00050     void updatePreview();
00051     void setStopColor( QTreeWidgetItem* item, QColor color );
00052 
00053     QgsVectorGradientColorRampV2* mRamp;
00054 
00055     static const int StopColorRole = Qt::UserRole + 1;
00056     static const int StopOffsetRole = Qt::UserRole + 2;
00057 
00058     QTreeWidgetItem* mCurrentItem;
00059 };
00060 
00061 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines