|
Quantum GIS API Documentation
master-693a1fe
|
00001 /*************************************************************************** 00002 qgscolorrampcombobox.h 00003 --------------------- 00004 begin : October 2010 00005 copyright : (C) 2010 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 #ifndef QGSCOLORRAMPCOMBOBOX_H 00016 #define QGSCOLORRAMPCOMBOBOX_H 00017 00018 #include <QComboBox> 00019 00020 class QgsStyleV2; 00021 class QgsVectorColorRampV2; 00022 00023 class QgsColorRampComboBox : public QComboBox 00024 { 00025 Q_OBJECT 00026 public: 00027 explicit QgsColorRampComboBox( QWidget *parent = 0 ); 00028 00029 ~QgsColorRampComboBox(); 00030 00032 void populate( QgsStyleV2* style ); 00033 00035 void setSourceColorRamp( QgsVectorColorRampV2* sourceRamp ); 00036 00038 QgsVectorColorRampV2* currentColorRamp(); 00039 00040 static QSize rampIconSize; 00041 00042 signals: 00043 00044 public slots: 00045 00046 void colorRampChanged( int index ); 00047 00048 protected: 00049 QgsStyleV2* mStyle; 00050 QgsVectorColorRampV2* mSourceColorRamp; // owns the copy 00051 }; 00052 00053 #endif // QGSCOLORRAMPCOMBOBOX_H