|
QGIS API Documentation
master-3f58142
|
00001 /*************************************************************************** 00002 qgssymbolv2selectordialog.h 00003 --------------------- 00004 begin : November 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 QGSSYMBOLV2SELECTORDIALOG_H 00017 #define QGSSYMBOLV2SELECTORDIALOG_H 00018 00019 #include <QDialog> 00020 00021 #include "ui_qgssymbolv2selectordialogbase.h" 00022 00023 #include <QStandardItemModel> 00024 00025 class QgsStyleV2; 00026 class QgsSymbolV2; 00027 class QgsSymbolLayerV2; 00028 class QgsVectorLayer; 00029 00030 class QMenu; 00031 class QWidget; 00032 00033 class SymbolLayerItem; 00034 00035 class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymbolV2SelectorDialogBase 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent = 0, bool embedded = false ); 00041 00043 QMenu* advancedMenu(); 00044 00045 protected: 00047 void keyPressEvent( QKeyEvent * event ); 00048 00049 void loadSymbol(); 00051 void loadSymbol( QgsSymbolV2* symbol, SymbolLayerItem* parent ); 00052 00053 void updateUi(); 00054 00055 void updateLockButton(); 00056 00058 SymbolLayerItem* currentLayerItem(); 00059 QgsSymbolLayerV2* currentLayer(); 00060 00061 void moveLayerByOffset( int offset ); 00062 00063 void setWidget( QWidget* widget ); 00064 00065 signals: 00066 void symbolModified(); 00067 00068 public slots: 00069 void moveLayerDown(); 00070 void moveLayerUp(); 00071 00072 void addLayer(); 00073 void removeLayer(); 00074 00075 void lockLayer(); 00076 00077 void layerChanged(); 00078 00079 void updateLayerPreview(); 00080 void updatePreview(); 00081 00083 void symbolChanged(); 00086 void changeLayer( QgsSymbolLayerV2* layer ); 00087 00088 00089 protected: // data 00090 QgsStyleV2* mStyle; 00091 QgsSymbolV2* mSymbol; 00092 QMenu* mAdvancedMenu; 00093 const QgsVectorLayer* mVectorLayer; 00094 00095 QStandardItemModel* model; 00096 QWidget *mPresentWidget; 00097 }; 00098 00099 #endif