KWidgetsAddons
kpixmapregionselectordialog.cpp
46 pixmapSelectorWidget->setMaximumWidgetSize((int)(screenGeometry.width() * 4.0 / 5), (int)(screenGeometry.height() * 4.0 / 5));
105QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent)
110 dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth, aspectRatioHeight);
142QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent)
147 dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth, aspectRatioHeight);
A dialog that uses a KPixmapRegionSelectorWidget to allow the user to select a region of an image.
Definition kpixmapregionselectordialog.h:38
void adjustRegionSelectorWidgetSizeToFitScreen()
Definition kpixmapregionselectordialog.cpp:82
KPixmapRegionSelectorDialog(QWidget *parent=nullptr)
The constructor of an empty KPixmapRegionSelectorDialog, you have to call later the setPixmap method ...
Definition kpixmapregionselectordialog.cpp:52
static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent=nullptr)
Creates a modal dialog, lets the user to select a region of the pixmap and returns when the dialog is...
Definition kpixmapregionselectordialog.cpp:124
~KPixmapRegionSelectorDialog() override
The destructor of the dialog.
static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent=nullptr)
Creates a modal dialog, lets the user to select a region of the pixmap and returns when the dialog is...
Definition kpixmapregionselectordialog.cpp:87
KPixmapRegionSelectorWidget * pixmapRegionSelectorWidget() const
Definition kpixmapregionselectordialog.cpp:77
KPixmapRegionSelectorWidget is a widget that shows a picture and provides the user with a friendly wa...
Definition kpixmapregionselectorwidget.h:30
QRect unzoomedSelectedRegion() const
Returns the selected region ( in unzoomed, original pixmap coordinates )
Definition kpixmapregionselectorwidget.cpp:434
void setPixmap(const QPixmap &pixmap)
Sets the pixmap which will be shown for the user to select a region from.
Definition kpixmapregionselectorwidget.cpp:92
void setSelectionAspectRatio(int width, int height)
Sets the aspect ration that the selected subimage should have.
Definition kpixmapregionselectorwidget.cpp:448
void setMaximumWidgetSize(int width, int height)
Sets the maximum size for the widget.
Definition kpixmapregionselectorwidget.cpp:458
QImage selectedImage() const
Definition kpixmapregionselectorwidget.cpp:442
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
Accepted
virtual void accept()
virtual int exec()
virtual void reject()
int result() const const
void accepted()
void rejected()
void setStandardButtons(StandardButtons buttons)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
QString tr(const char *sourceText, const char *disambiguation, int n)
int height() const const
int width() const const
availableGeometry
rect
QScreen * screen() const const
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.