mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
This allows symbol widgets to fetch properties from the main map canvas, for instance fetching the current scale from the map.
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
class QgsRendererV2Widget : QWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsrendererv2widget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style );
|
|
|
|
virtual ~QgsRendererV2Widget();
|
|
|
|
//! return pointer to the renderer (no transfer of ownership)
|
|
virtual QgsFeatureRendererV2* renderer() = 0;
|
|
|
|
//! show a dialog with renderer's symbol level settings
|
|
void showSymbolLevelsDialog( QgsFeatureRendererV2* r );
|
|
|
|
/** 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
|
|
* @note added in QGIS 2.12
|
|
*/
|
|
virtual void setMapCanvas( QgsMapCanvas* canvas );
|
|
|
|
protected:
|
|
/** Subclasses may provide the capability of changing multiple symbols at once by implementing the following two methods
|
|
and by connecting the slot contextMenuViewCategories(const QPoint&)*/
|
|
virtual QList<QgsSymbolV2*> selectedSymbols();
|
|
virtual void refreshSymbolView();
|
|
|
|
protected slots:
|
|
void contextMenuViewCategories( const QPoint& p );
|
|
/** Change color of selected symbols*/
|
|
void changeSymbolColor();
|
|
/** Change opacity of selected symbols*/
|
|
void changeSymbolTransparency();
|
|
/** Change units mm/map units of selected symbols*/
|
|
void changeSymbolUnit();
|
|
/** Change line widths of selected symbols*/
|
|
void changeSymbolWidth();
|
|
/** Change marker sizes of selected symbols*/
|
|
void changeSymbolSize();
|
|
|
|
virtual void copy();
|
|
virtual void paste();
|
|
|
|
};
|