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 )
74 QSize minimumSizeHint()
const override;
75 QSize sizeHint()
const override;
90 void setMode( Mode mode );
96 void setDialogTitle(
const QString &title );
102 QString dialogTitle()
const;
144 QFont currentFont()
const;
224 void setToNullFormat();
231 void setCurrentFont(
const QFont &font );
238 void setColor(
const QColor &color );
277 bool event( QEvent *e )
override;
278 void changeEvent( QEvent *e )
override;
279 void showEvent( QShowEvent *e )
override;
280 void resizeEvent( QResizeEvent *event )
override;
283 void mousePressEvent( QMouseEvent *e )
override;
285 void mouseMoveEvent( QMouseEvent *e )
override;
288 void dragEnterEvent( QDragEnterEvent *e )
override;
291 void dragLeaveEvent( QDragLeaveEvent *e )
override;
294 void dropEvent( QDropEvent *e )
override;
296 void wheelEvent( QWheelEvent *event )
override;
300 void showSettingsDialog();
307 void addRecentColor(
const QColor &color );
315 Mode mMode = ModeTextRenderer;
317 QString mDialogTitle;
324 QPoint mDragStartPosition;
326 QMenu *mMenu =
nullptr;
328 QPointer< QgsVectorLayer > mLayer;
334 bool mShowNoFormat =
false;
335 QString mNullFormatString;
336 QPointer< QAction > mNullFormatAction;
337 QPointer< QgsTextFormatPanelWidget > mActivePanel;
346 bool formatFromMimeData(
const QMimeData *mimeData,
QgsTextFormat &resultFormat )
const;
356 bool fontFromMimeData(
const QMimeData *mimeData, QFont &resultFont )
const;
367 bool colorFromMimeData(
const QMimeData *mimeData, QColor &resultColor,
bool &hasAlpha );
372 QPixmap createColorIcon(
const QColor &color )
const;
377 QPixmap createDragIcon( QSize size = QSize( 50, 50 ),
const QgsTextFormat *tempFormat =
nullptr,
const QFont *tempFont =
nullptr )
const;
383 void updatePreview(
const QColor &color = QColor(),
QgsTextFormat *tempFormat =
nullptr, QFont *tempFont =
nullptr );
Abstract interface for generating an expression context.