15#ifndef QGSSYMBOLBUTTON_H
16#define QGSSYMBOLBUTTON_H
48 Q_PROPERTY( QString dialogTitle READ dialogTitle WRITE setDialogTitle )
59 QSize minimumSizeHint()
const override;
60 QSize sizeHint()
const override;
80 void setDialogTitle(
const QString &title );
86 QString dialogTitle()
const;
104 SymbolType *symbolCastToType =
dynamic_cast<SymbolType *
>( tmpSymbol );
106 if ( symbolCastToType )
108 return symbolCastToType->
clone();
191 bool showNull()
const;
215 void setColor(
const QColor &color );
250 void setShowNull(
bool showNull );
270 void setToDefaultSymbol();
283 void changeEvent( QEvent *e )
override;
284 void showEvent( QShowEvent *e )
override;
285 void resizeEvent( QResizeEvent *event )
override;
288 void mousePressEvent( QMouseEvent *e )
override;
290 void mouseMoveEvent( QMouseEvent *e )
override;
291 void mouseReleaseEvent( QMouseEvent *e )
override;
292 void keyPressEvent( QKeyEvent *e )
override;
294 void dragEnterEvent( QDragEnterEvent *e )
override;
297 void dragLeaveEvent( QDragLeaveEvent *e )
override;
300 void dropEvent( QDropEvent *e )
override;
302 void wheelEvent( QWheelEvent *event )
override;
306 void showSettingsDialog();
307 void updateSymbolFromWidget();
315 void addRecentColor(
const QColor &color );
320 void activatePicker();
326 QString mDialogTitle;
333 QPoint mDragStartPosition;
335 QMenu *mMenu =
nullptr;
337 QPointer< QgsVectorLayer > mLayer;
341 std::unique_ptr< QgsSymbol > mSymbol;
345 bool mPickingColor =
false;
347 bool mShowNull =
false;
349 std::unique_ptr< QgsSymbol > mDefaultSymbol;
355 void updatePreview(
const QColor &color = QColor(),
QgsSymbol *tempSymbol =
nullptr );
366 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
371 QPixmap createColorIcon(
const QColor &color )
const;
379 void stopPicking( QPoint eventPos,
bool samplingColor =
true );
381 void showColorDialog();
383 void updateSizeHint();
Abstract interface for generating an expression context.
Map canvas is a class for displaying all GIS data types on a canvas.
A bar for displaying non-blocking messages to the user.
Abstract base class for all rendered symbols.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
Represents a vector layer which manages a vector based data sets.