![]() |
QElectroTech 0.200.1-dev
|
The LastUsedStyle class Session-scoped "last used" style for new shapes and free text created on the diagram canvas: whatever pen/brush/font was last applied through the properties editors becomes the starting point for the next new item of that type, the way most drawing tools behave. More...
#include <lastusedstyle.h>

Static Public Member Functions | |
| static bool | hasShapePen () |
| static QPen | shapePen () |
| static void | setShapePen (const QPen &pen) |
| LastUsedStyle::setShapePen Record pen as the last-used shape pen for this session. | |
| static bool | hasShapeBrush () |
| static QBrush | shapeBrush () |
| static void | setShapeBrush (const QBrush &brush) |
| LastUsedStyle::setShapeBrush Record brush as the last-used shape brush for this session. | |
| static bool | hasTextFont () |
| static QFont | textFont () |
| static void | setTextFont (const QFont &font) |
| LastUsedStyle::setTextFont Record font as the last-used free text font for this session. | |
Private Member Functions | |
| LastUsedStyle ()=delete | |
Static Private Attributes | |
| static QPen | m_shape_pen |
| static bool | m_has_shape_pen = false |
| static QBrush | m_shape_brush |
| static bool | m_has_shape_brush = false |
| static QFont | m_text_font |
| static bool | m_has_text_font = false |
The LastUsedStyle class Session-scoped "last used" style for new shapes and free text created on the diagram canvas: whatever pen/brush/font was last applied through the properties editors becomes the starting point for the next new item of that type, the way most drawing tools behave.
Deliberately in-memory only, not QSettings-backed: this is a live "what did I just use" value for the current editing session, not an app-wide default (that's already covered by the Preferences dialog's font setting, read as the fallback when nothing has been set yet).
|
privatedelete |
|
static |

|
static |

|
static |

|
static |
LastUsedStyle::setShapeBrush Record brush as the last-used shape brush for this session.
| brush |

|
static |
LastUsedStyle::setShapePen Record pen as the last-used shape pen for this session.
| pen |

|
static |
LastUsedStyle::setTextFont Record font as the last-used free text font for this session.
| font |

|
static |

|
static |

|
static |

|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |