15 #ifndef QGSSYMBOLBUTTON_H 16 #define QGSSYMBOLBUTTON_H 21 #include <QToolButton> 44 Q_PROPERTY( QString dialogTitle READ dialogTitle WRITE setDialogTitle )
54 QSize minimumSizeHint()
const override;
55 QSize sizeHint()
const override;
75 void setDialogTitle(
const QString &title );
81 QString dialogTitle()
const;
99 SymbolType *symbolCastToType =
dynamic_cast<SymbolType *
>( tmpSymbol );
101 if ( symbolCastToType )
103 return symbolCastToType->
clone();
159 void setColor(
const QColor &color );
198 void changeEvent( QEvent *e )
override;
199 void showEvent( QShowEvent *e )
override;
200 void resizeEvent( QResizeEvent *event )
override;
203 void mousePressEvent( QMouseEvent *e )
override;
205 void mouseMoveEvent( QMouseEvent *e )
override;
207 void dragEnterEvent( QDragEnterEvent *e )
override;
210 void dragLeaveEvent( QDragLeaveEvent *e )
override;
213 void dropEvent( QDropEvent *e )
override;
217 void showSettingsDialog();
218 void updateSymbolFromWidget();
226 void addRecentColor(
const QColor &color );
232 QString mDialogTitle;
238 QPoint mDragStartPosition;
240 QMenu *mMenu =
nullptr;
242 QPointer< QgsVectorLayer > mLayer;
246 std::unique_ptr< QgsSymbol > mSymbol;
254 void updatePreview(
const QColor &color = QColor(),
QgsSymbol *tempSymbol =
nullptr );
265 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
270 QPixmap createColorIcon(
const QColor &color )
const;
274 #endif // QGSSYMBOLBUTTON_H
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
Get a deep copy of this symbol.
Represents a vector layer which manages a vector based data sets.