QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
ImageCropDialog Class Reference

The ImageCropDialog class Self-contained modal dialog wrapping CropAreaWidget with OK/Cancel – the same reasoning as ImageTransparentColorDialog: this needs neither undo-during-drag nor coexistence with other tools, only a rectangle the user drags out against a pixmap already in hand. More...

#include <imagecropdialog.h>

Inherits QDialog.

Collaboration diagram for ImageCropDialog:
Collaboration graph

Public Member Functions

 ImageCropDialog (const QPixmap &pixmap, const QRect &existingCropRect=QRect(), QWidget *parent=nullptr)
 ImageCropDialog::ImageCropDialog.
QRect cropRect () const
 ImageCropDialog::cropRect.

Private Attributes

CropAreaWidgetm_cropArea

Detailed Description

The ImageCropDialog class Self-contained modal dialog wrapping CropAreaWidget with OK/Cancel – the same reasoning as ImageTransparentColorDialog: this needs neither undo-during-drag nor coexistence with other tools, only a rectangle the user drags out against a pixmap already in hand.

Constructor & Destructor Documentation

◆ ImageCropDialog()

ImageCropDialog::ImageCropDialog ( const QPixmap & pixmap,
const QRect & existingCropRect = QRect(),
QWidget * parent = nullptr )
explicit

ImageCropDialog::ImageCropDialog.

Parameters
pixmapthe full, uncropped image to crop from
existingCropRecta crop rectangle remembered from a previous session, shown from the start rather than resetting to the full image every time the dialog is reopened – an empty QRect means there isn't one yet.
pixmapthe image to crop
existingCropRecta crop rectangle remembered from a previous session, or an empty QRect if there isn't one yet
parent
Here is the call graph for this function:

Member Function Documentation

◆ cropRect()

QRect ImageCropDialog::cropRect ( ) const

ImageCropDialog::cropRect.

The chosen crop rectangle, in the original pixmap's own coordinates. Only meaningful after the dialog was accepted.

Returns
the chosen crop rectangle, in the original pixmap's own coordinates
Here is the caller graph for this function:

Member Data Documentation

◆ m_cropArea

CropAreaWidget* ImageCropDialog::m_cropArea
private

The documentation for this class was generated from the following files: