15 #ifndef QGSSYMBOLBUTTON_H 16 #define QGSSYMBOLBUTTON_H 21 #include <QToolButton> 45 Q_PROPERTY( QString dialogTitle READ dialogTitle WRITE setDialogTitle )
55 QSize minimumSizeHint()
const override;
56 QSize sizeHint()
const override;
76 void setDialogTitle(
const QString &title );
82 QString dialogTitle()
const;
100 SymbolType *symbolCastToType =
dynamic_cast<SymbolType *
>( tmpSymbol );
102 if ( symbolCastToType )
104 return symbolCastToType->
clone();
175 void setColor(
const QColor &color );
214 void changeEvent( QEvent *e )
override;
215 void showEvent( QShowEvent *e )
override;
216 void resizeEvent( QResizeEvent *event )
override;
219 void mousePressEvent( QMouseEvent *e )
override;
221 void mouseMoveEvent( QMouseEvent *e )
override;
223 void dragEnterEvent( QDragEnterEvent *e )
override;
226 void dragLeaveEvent( QDragLeaveEvent *e )
override;
229 void dropEvent( QDropEvent *e )
override;
233 void showSettingsDialog();
234 void updateSymbolFromWidget();
242 void addRecentColor(
const QColor &color );
248 QString mDialogTitle;
255 QPoint mDragStartPosition;
257 QMenu *mMenu =
nullptr;
259 QPointer< QgsVectorLayer > mLayer;
263 std::unique_ptr< QgsSymbol > mSymbol;
271 void updatePreview(
const QColor &color = QColor(),
QgsSymbol *tempSymbol =
nullptr );
282 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
287 QPixmap createColorIcon(
const QColor &color )
const;
291 #endif // QGSSYMBOLBUTTON_H
Abstract base class for all rendered symbols.
A bar for displaying non-blocking messages to the user.
Map canvas is a class for displaying all GIS data types on a canvas.
SymbolType
Type of the symbol.
Abstract interface for generating an expression context.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
Represents a vector layer which manages a vector based data sets.