mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
This allows symbol widgets to fetch properties from the main map canvas, for instance fetching the current scale from the map.
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
class QgsSymbolV2SelectorDialog : QDialog
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgssymbolv2selectordialog.h>
|
|
%End
|
|
|
|
public:
|
|
QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent /TransferThis/ = 0, bool embedded = false );
|
|
|
|
//! return menu for "advanced" button - create it if doesn't exist and show the advanced button
|
|
QMenu* advancedMenu();
|
|
|
|
/** 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 layer widget.
|
|
* @param context expression context pointer. Ownership is transferred to the dialog.
|
|
* @note added in QGIS 2.12
|
|
* @see expressionContext()
|
|
*/
|
|
void setExpressionContext( QgsExpressionContext* context /Transfer/ );
|
|
|
|
/** Returns the expression context used for the dialog, if set. This expression context is used for
|
|
* evaluating data defined symbol properties and for populating based expression widgets in
|
|
* the dialog.
|
|
* @note added in QGIS 2.12
|
|
* @see setExpressionContext()
|
|
*/
|
|
QgsExpressionContext* expressionContext() const;
|
|
|
|
/** Sets the map canvas associated with the dialog. This allows the widget to retrieve the current
|
|
* map scale and other properties from the canvas.
|
|
* @param canvas map canvas
|
|
* @note added in QGIS 2.12
|
|
*/
|
|
void setMapCanvas( QgsMapCanvas* canvas );
|
|
|
|
protected:
|
|
//! Reimplements dialog keyPress event so we can ignore it
|
|
void keyPressEvent( QKeyEvent * event );
|
|
|
|
void loadSymbol();
|
|
//! @note not available in python bindings
|
|
// void loadSymbol( QgsSymbolV2* symbol, SymbolLayerItem* parent );
|
|
|
|
void updateUi();
|
|
|
|
void updateLockButton();
|
|
|
|
//! @note not available in python bindings
|
|
// SymbolLayerItem* currentLayerItem();
|
|
QgsSymbolLayerV2* currentLayer();
|
|
|
|
void moveLayerByOffset( int offset );
|
|
|
|
void setWidget( QWidget* widget );
|
|
|
|
signals:
|
|
void symbolModified();
|
|
|
|
public slots:
|
|
void moveLayerDown();
|
|
void moveLayerUp();
|
|
|
|
void addLayer();
|
|
void removeLayer();
|
|
|
|
void saveSymbol();
|
|
void lockLayer();
|
|
|
|
void layerChanged();
|
|
|
|
void updateLayerPreview();
|
|
void updatePreview();
|
|
|
|
//! Slot to update tree when a new symbol from style
|
|
void symbolChanged();
|
|
//! alters tree and sets proper widget when Layer Type is changed
|
|
//! @note: The layer is received from the LayerPropertiesWidget
|
|
void changeLayer( QgsSymbolLayerV2* layer );
|
|
|
|
|
|
};
|