00001 /*************************************************************************** 00002 qgssinglesymboldialog.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: qgssinglesymboldialog.h 9138 2008-08-23 21:37:31Z jef $ */ 00018 00019 #ifndef QGSSINGLESYMBOLDIALOG_H 00020 #define QGSSINGLESYMBOLDIALOG_H 00021 00022 #include "ui_qgssinglesymboldialogbase.h" 00023 #include <vector> 00024 00025 class QgsSymbol; 00026 class QgsVectorLayer; 00027 00028 00030 class QgsSingleSymbolDialog: public QDialog, private Ui::QgsSingleSymbolDialogBase 00031 { 00032 Q_OBJECT 00033 public: 00034 QgsSingleSymbolDialog( QgsVectorLayer* layer, bool disabled = false ); 00035 ~QgsSingleSymbolDialog(); 00036 QColor getOutlineColor(); 00037 Qt::PenStyle getOutlineStyle(); 00038 double getOutlineWidth(); 00039 QColor getFillColor(); 00040 Qt::BrushStyle getFillStyle(); 00041 void setOutlineColor( QColor& c ); 00042 void setOutlineStyle( Qt::PenStyle pstyle ); 00043 void setOutlineWidth( double width ); 00044 void setFillColor( QColor& c ); 00045 void setFillStyle( Qt::BrushStyle fstyle ); 00046 void setLabel( QString label ); 00047 QString label(); 00048 00049 protected: 00050 QgsVectorLayer* mVectorLayer; 00051 00052 public slots: 00053 /* arrange the widgets on this dialog to reflect the current state of QgsSymbol */ 00054 void unset(); 00055 void set( const QgsSymbol *sy ); 00056 void updateSet( const QgsSymbol *sy ); 00058 void apply(); 00060 void apply( QgsSymbol *sy ); 00062 void resendSettingsChanged(); 00066 void fillStyleChanged( int theIndex ); 00067 00068 protected slots: 00069 void selectOutlineColor(); 00070 void selectFillColor(); 00071 void selectTextureImage(); 00072 void symbolChanged( QListWidgetItem * current, QListWidgetItem * previous ); 00073 private: 00075 QgsSingleSymbolDialog(); 00076 QString mTexturePath; 00077 00078 signals: 00079 void settingsChanged(); 00080 }; 00081 00082 #endif
1.5.1