2012-09-24 02:28:15 +02:00
|
|
|
class QgsSymbolsListWidget : QWidget
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgssymbolslistwidget.h>
|
|
|
|
%End
|
|
|
|
public:
|
2015-05-08 16:37:15 +10:00
|
|
|
QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* style, QMenu* menu, QWidget* parent /TransferThis/ = 0, const QgsVectorLayer * layer = 0 );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2015-09-03 22:46:37 +10:00
|
|
|
/** Returns the expression context used for the widget, if set. This expression context is used for
|
|
|
|
* evaluating data defined symbol properties and for populating based expression widgets in
|
|
|
|
* the list widget.
|
|
|
|
* @note added in QGIS 2.12
|
|
|
|
* @see setExpressionContext()
|
|
|
|
*/
|
|
|
|
QgsExpressionContext* expressionContext() const;
|
|
|
|
|
2015-09-16 21:55:32 +10:00
|
|
|
/** Sets the map canvas associated with the widget. This allows the widget to retrieve the current
|
|
|
|
* map scale and other properties from the canvas.
|
|
|
|
* @param canvas map canvas
|
2015-09-17 20:34:51 +10:00
|
|
|
* @see mapCanvas()
|
2015-09-16 21:55:32 +10:00
|
|
|
* @note added in QGIS 2.12
|
|
|
|
*/
|
|
|
|
virtual void setMapCanvas( QgsMapCanvas* canvas );
|
|
|
|
|
2015-09-17 20:34:51 +10:00
|
|
|
/** Returns the map canvas associated with the widget.
|
|
|
|
* @see setMapCanvas
|
|
|
|
* @note added in QGIS 2.12
|
|
|
|
*/
|
|
|
|
const QgsMapCanvas* mapCanvas() const;
|
|
|
|
|
2015-09-03 22:46:37 +10:00
|
|
|
/** Returns the vector layer associated with the widget.
|
|
|
|
* @note added in QGIS 2.12
|
|
|
|
*/
|
|
|
|
const QgsVectorLayer* layer() const;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
public slots:
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
/** Sets the optional expression context used for the widget. This expression context is used for
|
|
|
|
* evaluating data defined symbol properties and for populating based expression widgets in
|
|
|
|
* the properties widget.
|
|
|
|
* @param context expression context pointer. Ownership is not transferred and the object must
|
|
|
|
* be kept alive for the lifetime of the properties widget.
|
|
|
|
* @note added in QGIS 2.12
|
|
|
|
* @see expressionContext()
|
|
|
|
*/
|
|
|
|
void setExpressionContext( QgsExpressionContext* context );
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
void setSymbolFromStyle( const QModelIndex & index );
|
2013-01-08 14:22:27 -07:00
|
|
|
void setSymbolColor( const QColor& color );
|
2012-09-24 02:28:15 +02:00
|
|
|
void setMarkerAngle( double angle );
|
|
|
|
void setMarkerSize( double size );
|
|
|
|
void setLineWidth( double width );
|
2014-05-07 08:37:12 +10:00
|
|
|
void addSymbolToStyle();
|
2016-01-07 11:21:32 +07:00
|
|
|
void saveSymbol();
|
2015-10-07 11:55:34 +11:00
|
|
|
void symbolAddedToStyle( const QString& name, QgsSymbolV2* symbol );
|
2014-10-20 22:50:15 +02:00
|
|
|
void on_mSymbolUnitWidget_changed();
|
2012-09-24 02:28:15 +02:00
|
|
|
void on_mTransparencySlider_valueChanged( int value );
|
|
|
|
|
|
|
|
void on_groupsCombo_currentIndexChanged( int index );
|
|
|
|
void on_groupsCombo_editTextChanged( const QString &text );
|
|
|
|
|
|
|
|
void openStyleManager();
|
2016-01-04 22:51:18 +11:00
|
|
|
void clipFeaturesToggled( bool checked );
|
|
|
|
|
|
|
|
void updateDataDefinedMarkerSize();
|
|
|
|
void updateDataDefinedMarkerAngle();
|
|
|
|
void updateDataDefinedLineWidth();
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void changed();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void populateSymbolView();
|
2015-10-07 11:55:34 +11:00
|
|
|
void populateSymbols( const QStringList& symbols );
|
2012-09-24 02:28:15 +02:00
|
|
|
void updateSymbolColor();
|
|
|
|
void updateSymbolInfo();
|
|
|
|
};
|