A full-featured image editor widget with drawing tools, undo/redo, and image manipulation.
More...
|
| | QTImageEditor (QWidget *parent=nullptr) |
| | Constructs a QTImageEditor widget.
|
|
virtual | ~QTImageEditor () |
| | Destroys this QTImageEditor widget.
|
|
void | editedSignal () |
| | Emitted when the image has been edited.
|
| const StringView | imageID () const |
| | Returns the resource identifier of the currently loaded image.
|
| QTImageEditorView * | imageView () const |
| | Returns the underlying image editor view widget.
|
| bool | isEditing () const |
| | Returns whether a drawing or text editing operation is currently in progress.
|
| virtual void | keyReleaseEvent (QKeyEvent *event) override |
| | Handles key release events for shortcuts such as undo and redo.
|
| QSize | minimumSizeHint () const override |
| | Returns the minimum recommended size for this widget.
|
| void | mousePressLocation (const Vector< 2, fltp08 > &end_point) |
| | Handles a mouse press at the given normalized location.
|
| void | mouseReleaseLocation (const Vector< 2, fltp08 > &end_point) |
| | Handles a mouse release at the given normalized location.
|
|
void | pushUpdate () |
| | Pushes the current image state as a saved update to the resource system.
|
| void | refreshToImage (const StringView &image) |
| | Reloads the image from the given resource identifier, discarding unsaved changes.
|
| void | setEditMode (QTImageEditorView::EditMode mode) |
| | Sets the active editing mode for the image editor view.
|
| void | setImage (const TranslatedString title, const StringView &image) |
| | Sets the image to edit from a resource identifier.
|
|
void | setOptimalScale () |
| | Calculates and applies the optimal scale to fit the image in the view.
|
| void | setVertical (bool vertical) |
| | Sets the layout orientation of the editor toolbar.
|
| void | showEvent (QShowEvent *event) override |
| | Handles the show event to initialize the editor view.
|
| QSize | sizeHint () const override |
| | Returns the recommended size for this widget.
|
| void | updateCursorLocation (const Vector< 2, fltp08 > &end_point) |
| | Updates the cursor position during a drag operation.
|
|
|
void | colorsEdited () |
| | Slot called when pen or fill colors have been changed by the user.
|
|
void | editedSlot () |
| | Slot called when the image has been edited, to update undo state.
|
|
void | sizeChangedSlot () |
| | Slot called when the image size has changed.
|
A full-featured image editor widget with drawing tools, undo/redo, and image manipulation.
Definition at line 243 of file QTImageEditor.h.
◆ QTImageEditor()
| QTImageEditor::QTImageEditor |
( |
QWidget * | parent = nullptr | ) |
|
Constructs a QTImageEditor widget.
- Parameters
-
| [in] | parent | The parent widget. |
◆ imageID()
Returns the resource identifier of the currently loaded image.
- Returns
- The image resource identifier.
Definition at line 320 of file QTImageEditor.h.
◆ imageView()
Returns the underlying image editor view widget.
- Returns
- The image editor view.
◆ isEditing()
| bool QTImageEditor::isEditing |
( |
| ) |
const |
Returns whether a drawing or text editing operation is currently in progress.
- Returns
- True if editing is active.
◆ keyReleaseEvent()
| virtual void QTImageEditor::keyReleaseEvent |
( |
QKeyEvent * | event | ) |
|
|
overridevirtual |
Handles key release events for shortcuts such as undo and redo.
- Parameters
-
◆ minimumSizeHint()
| QSize QTImageEditor::minimumSizeHint |
( |
| ) |
const |
|
override |
Returns the minimum recommended size for this widget.
- Returns
- The minimum size hint.
◆ mousePressLocation()
| void QTImageEditor::mousePressLocation |
( |
const Vector< 2, fltp08 > & | end_point | ) |
|
Handles a mouse press at the given normalized location.
- Parameters
-
| [in] | end_point | The press location in normalized coordinates. |
◆ mouseReleaseLocation()
| void QTImageEditor::mouseReleaseLocation |
( |
const Vector< 2, fltp08 > & | end_point | ) |
|
Handles a mouse release at the given normalized location.
- Parameters
-
| [in] | end_point | The release location in normalized coordinates. |
◆ refreshToImage()
| void QTImageEditor::refreshToImage |
( |
const StringView & | image | ) |
|
Reloads the image from the given resource identifier, discarding unsaved changes.
- Parameters
-
| [in] | image | The resource identifier of the image to reload. |
◆ setEditMode()
Sets the active editing mode for the image editor view.
- Parameters
-
| [in] | mode | The edit mode to activate. |
◆ setImage()
Sets the image to edit from a resource identifier.
- Parameters
-
| [in] | title | The display title for the editor. |
| [in] | image | The resource identifier of the image to load. |
◆ setVertical()
| void QTImageEditor::setVertical |
( |
bool | vertical | ) |
|
Sets the layout orientation of the editor toolbar.
- Parameters
-
| [in] | vertical | Whether to use a vertical toolbar layout. |
◆ showEvent()
| void QTImageEditor::showEvent |
( |
QShowEvent * | event | ) |
|
|
override |
Handles the show event to initialize the editor view.
- Parameters
-
◆ sizeHint()
| QSize QTImageEditor::sizeHint |
( |
| ) |
const |
|
override |
Returns the recommended size for this widget.
- Returns
- The size hint.
◆ updateCursorLocation()
| void QTImageEditor::updateCursorLocation |
( |
const Vector< 2, fltp08 > & | end_point | ) |
|
Updates the cursor position during a drag operation.
- Parameters
-
| [in] | end_point | The current cursor location in normalized coordinates. |
The documentation for this class was generated from the following file: