52 Q_PROPERTY(
Mode mode READ mode WRITE setMode )
53 Q_PROPERTY( QString dialogTitle READ dialogTitle WRITE setDialogTitle )
54 Q_PROPERTY( QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY changed )
55 Q_PROPERTY(
QgsTextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY changed )
75 QSize minimumSizeHint()
const override;
76 QSize sizeHint()
const override;
91 void setMode( Mode mode );
97 void setDialogTitle(
const QString &title );
103 QString dialogTitle()
const;
145 QFont currentFont()
const;
225 void setToNullFormat();
232 void setCurrentFont(
const QFont &font );
239 void setColor(
const QColor &color );
278 bool event( QEvent *e )
override;
279 void changeEvent( QEvent *e )
override;
280 void showEvent( QShowEvent *e )
override;
281 void resizeEvent( QResizeEvent *event )
override;
284 void mousePressEvent( QMouseEvent *e )
override;
286 void mouseMoveEvent( QMouseEvent *e )
override;
289 void dragEnterEvent( QDragEnterEvent *e )
override;
292 void dragLeaveEvent( QDragLeaveEvent *e )
override;
295 void dropEvent( QDropEvent *e )
override;
297 void wheelEvent( QWheelEvent *event )
override;
301 void showSettingsDialog();
308 void addRecentColor(
const QColor &color );
316 Mode mMode = ModeTextRenderer;
318 QString mDialogTitle;
325 QPoint mDragStartPosition;
327 QMenu *mMenu =
nullptr;
329 QPointer< QgsVectorLayer > mLayer;
335 bool mShowNoFormat =
false;
336 QString mNullFormatString;
337 QPointer< QAction > mNullFormatAction;
338 QPointer< QgsTextFormatPanelWidget > mActivePanel;
347 bool formatFromMimeData(
const QMimeData *mimeData,
QgsTextFormat &resultFormat )
const;
357 bool fontFromMimeData(
const QMimeData *mimeData, QFont &resultFont )
const;
368 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
373 QPixmap createColorIcon(
const QColor &color )
const;
378 QPixmap createDragIcon( QSize size = QSize( 50, 50 ),
const QgsTextFormat *tempFormat =
nullptr,
const QFont *tempFont =
nullptr )
const;
384 void updatePreview(
const QColor &color = QColor(),
QgsTextFormat *tempFormat =
nullptr, QFont *tempFont =
nullptr );
Abstract interface for generating an expression context.