mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Rationale: - there was a lot of large objects passed by value, so potentially there's a speed bump from this - even for implicitly shared classes like QString/QList there's still a (small) cost for copying the objects when there's no reason to - it's the right thing to do!
61 lines
2.0 KiB
Plaintext
61 lines
2.0 KiB
Plaintext
class QgsSymbolsListWidget : QWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgssymbolslistwidget.h>
|
|
%End
|
|
public:
|
|
QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* style, QMenu* menu, QWidget* parent /TransferThis/ = 0, const QgsVectorLayer * layer = 0 );
|
|
|
|
/** 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;
|
|
|
|
/** 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
|
|
* @see mapCanvas()
|
|
* @note added in QGIS 2.12
|
|
*/
|
|
virtual void setMapCanvas( QgsMapCanvas* canvas );
|
|
|
|
/** Returns the map canvas associated with the widget.
|
|
* @see setMapCanvas
|
|
* @note added in QGIS 2.12
|
|
*/
|
|
const QgsMapCanvas* mapCanvas() const;
|
|
|
|
/** Returns the vector layer associated with the widget.
|
|
* @note added in QGIS 2.12
|
|
*/
|
|
const QgsVectorLayer* layer() const;
|
|
|
|
public slots:
|
|
void setSymbolFromStyle( const QModelIndex & index );
|
|
void setSymbolColor( const QColor& color );
|
|
void setMarkerAngle( double angle );
|
|
void setMarkerSize( double size );
|
|
void setLineWidth( double width );
|
|
void addSymbolToStyle();
|
|
void symbolAddedToStyle( const QString& name, QgsSymbolV2* symbol );
|
|
void on_mSymbolUnitWidget_changed();
|
|
void on_mTransparencySlider_valueChanged( int value );
|
|
|
|
void on_groupsCombo_currentIndexChanged( int index );
|
|
void on_groupsCombo_editTextChanged( const QString &text );
|
|
|
|
void openStyleManager();
|
|
|
|
signals:
|
|
void changed();
|
|
|
|
protected:
|
|
void populateSymbolView();
|
|
void populateSymbols( const QStringList& symbols );
|
|
void updateSymbolColor();
|
|
void updateSymbolInfo();
|
|
};
|