51 Q_PROPERTY(
Mode mode READ mode WRITE setMode )
52 Q_PROPERTY( QString dialogTitle READ dialogTitle WRITE setDialogTitle )
53 Q_PROPERTY( QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY changed )
54 Q_PROPERTY(
QgsTextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY changed )
73 QSize minimumSizeHint()
const override;
74 QSize sizeHint()
const override;
89 void setMode( Mode mode );
95 void setDialogTitle(
const QString &title );
101 QString dialogTitle()
const;
143 QFont currentFont()
const;
223 void setToNullFormat();
230 void setCurrentFont(
const QFont &font );
237 void setColor(
const QColor &color );
275 bool event( QEvent *e )
override;
276 void changeEvent( QEvent *e )
override;
277 void showEvent( QShowEvent *e )
override;
278 void resizeEvent( QResizeEvent *event )
override;
281 void mousePressEvent( QMouseEvent *e )
override;
283 void mouseMoveEvent( QMouseEvent *e )
override;
286 void dragEnterEvent( QDragEnterEvent *e )
override;
289 void dragLeaveEvent( QDragLeaveEvent *e )
override;
292 void dropEvent( QDropEvent *e )
override;
294 void wheelEvent( QWheelEvent *event )
override;
298 void showSettingsDialog();
305 void addRecentColor(
const QColor &color );
312 Mode mMode = ModeTextRenderer;
314 QString mDialogTitle;
321 QPoint mDragStartPosition;
323 QMenu *mMenu =
nullptr;
325 QPointer<QgsVectorLayer> mLayer;
331 bool mShowNoFormat =
false;
332 QString mNullFormatString;
333 QPointer<QAction> mNullFormatAction;
334 QPointer<QgsTextFormatPanelWidget> mActivePanel;
343 bool formatFromMimeData(
const QMimeData *mimeData,
QgsTextFormat &resultFormat )
const;
353 bool fontFromMimeData(
const QMimeData *mimeData, QFont &resultFont )
const;
364 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
369 QPixmap createColorIcon(
const QColor &color )
const;
374 QPixmap createDragIcon( QSize size = QSize( 50, 50 ),
const QgsTextFormat *tempFormat =
nullptr,
const QFont *tempFont =
nullptr )
const;
380 void updatePreview(
const QColor &color = QColor(),
QgsTextFormat *tempFormat =
nullptr, QFont *tempFont =
nullptr );
Abstract interface for generating an expression context.