15 #ifndef QGSSYMBOLBUTTON_H
16 #define QGSSYMBOLBUTTON_H
21 #include <QToolButton>
46 Q_PROPERTY( QString dialogTitle READ dialogTitle WRITE setDialogTitle )
56 QSize minimumSizeHint()
const override;
57 QSize sizeHint()
const override;
77 void setDialogTitle(
const QString &title );
83 QString dialogTitle()
const;
101 SymbolType *symbolCastToType =
dynamic_cast<SymbolType *
>( tmpSymbol );
103 if ( symbolCastToType )
105 return symbolCastToType->
clone();
176 void setColor(
const QColor &color );
215 void changeEvent( QEvent *e )
override;
216 void showEvent( QShowEvent *e )
override;
217 void resizeEvent( QResizeEvent *event )
override;
220 void mousePressEvent( QMouseEvent *e )
override;
222 void mouseMoveEvent( QMouseEvent *e )
override;
223 void mouseReleaseEvent( QMouseEvent *e )
override;
224 void keyPressEvent( QKeyEvent *e )
override;
226 void dragEnterEvent( QDragEnterEvent *e )
override;
229 void dragLeaveEvent( QDragLeaveEvent *e )
override;
232 void dropEvent( QDropEvent *e )
override;
236 void showSettingsDialog();
237 void updateSymbolFromWidget();
245 void addRecentColor(
const QColor &color );
250 void activatePicker();
256 QString mDialogTitle;
263 QPoint mDragStartPosition;
265 QMenu *mMenu =
nullptr;
267 QPointer< QgsVectorLayer > mLayer;
271 std::unique_ptr< QgsSymbol > mSymbol;
275 bool mPickingColor =
false;
281 void updatePreview(
const QColor &color = QColor(),
QgsSymbol *tempSymbol =
nullptr );
292 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
297 QPixmap createColorIcon(
const QColor &color )
const;
305 void stopPicking( QPoint eventPos,
bool samplingColor =
true );
307 void showColorDialog();
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.
SymbolType
Type of the symbol.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
Represents a vector layer which manages a vector based data sets.