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();
179 void setColor(
const QColor &color );
214 void setShowNull(
bool showNull );
222 bool showNull()
const;
251 void changeEvent( QEvent *e )
override;
252 void showEvent( QShowEvent *e )
override;
253 void resizeEvent( QResizeEvent *event )
override;
256 void mousePressEvent( QMouseEvent *e )
override;
258 void mouseMoveEvent( QMouseEvent *e )
override;
259 void mouseReleaseEvent( QMouseEvent *e )
override;
260 void keyPressEvent( QKeyEvent *e )
override;
262 void dragEnterEvent( QDragEnterEvent *e )
override;
265 void dragLeaveEvent( QDragLeaveEvent *e )
override;
268 void dropEvent( QDropEvent *e )
override;
270 void wheelEvent( QWheelEvent *event )
override;
274 void showSettingsDialog();
275 void updateSymbolFromWidget();
283 void addRecentColor(
const QColor &color );
288 void activatePicker();
294 QString mDialogTitle;
301 QPoint mDragStartPosition;
303 QMenu *mMenu =
nullptr;
305 QPointer< QgsVectorLayer > mLayer;
309 std::unique_ptr< QgsSymbol > mSymbol;
313 bool mPickingColor =
false;
315 bool mShowNull =
false;
321 void updatePreview(
const QColor &color = QColor(),
QgsSymbol *tempSymbol =
nullptr );
332 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
337 QPixmap createColorIcon(
const QColor &color )
const;
345 void stopPicking( QPoint eventPos,
bool samplingColor =
true );
347 void showColorDialog();
349 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.