QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsvectorgradientcolorrampv2dialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectorgradientcolorrampv2dialog.h
3  ---------------------
4  begin : December 2009
5  copyright : (C) 2009 by Martin Dobias
6  email : wonder dot sk at gmail dot 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 QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H
17 #define QGSVECTORGRADIENTCOLORRAMPV2DIALOG_H
18 
19 #include <QDialog>
20 
21 #include "ui_qgsvectorgradientcolorrampv2dialogbase.h"
22 
24 
25 class GUI_EXPORT QgsVectorGradientColorRampV2Dialog : public QDialog, private Ui::QgsVectorGradientColorRampV2DialogBase
26 {
27  Q_OBJECT
28 
29  public:
31 
32  public slots:
33  void setColor1( const QColor& color );
34  void setColor2( const QColor& color );
35 
36  void toggledStops( bool on );
37  void addStop();
38  void removeStop();
39 
40  void stopDoubleClicked( QTreeWidgetItem* item, int column );
41  void setItemStopColor( const QColor& newColor );
42 
43  protected slots:
44  void on_cboType_currentIndexChanged( int index );
45  void on_btnInformation_pressed();
46 
47  protected:
48 
49  void updateStops();
50  void updatePreview();
51  void setStopColor( QTreeWidgetItem* item, QColor color );
52 
54 
55  static const int StopColorRole = Qt::UserRole + 1;
56  static const int StopOffsetRole = Qt::UserRole + 2;
57 
58  QTreeWidgetItem* mCurrentItem;
59 };
60 
61 #endif