• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | Static Public Member Functions

KPixmapRegionSelectorDialog Class Reference

A dialog that uses a KPixmapRegionSelectorWidget to allow the user to select a region of an image. More...

#include <kpixmapregionselectordialog.h>

Inheritance diagram for KPixmapRegionSelectorDialog:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 KPixmapRegionSelectorDialog (QWidget *parent=0)
 ~KPixmapRegionSelectorDialog ()
void adjustRegionSelectorWidgetSizeToFitScreen ()
KPixmapRegionSelectorWidget * pixmapRegionSelectorWidget () const

Static Public Member Functions

static QImage getSelectedImage (const QPixmap &pixmap, QWidget *parent=0L)
static QImage getSelectedImage (const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent=0L)
static QRect getSelectedRegion (const QPixmap &pixmap, QWidget *parent=0L)
static QRect getSelectedRegion (const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent=0L)

Detailed Description

A dialog that uses a KPixmapRegionSelectorWidget to allow the user to select a region of an image.

If you want to use special features like forcing the selected area to have a fixed aspect ratio, you can use

See also:
pixmapRegionSelectorWidget() to get the pointer to the KPixmapRegionSelectorWidget object and set the desired options there.

There are some convenience methods that allow to easily show a dialog for the user to select a region of an image, and just care about the selected image.

kpixmapregionselectordialog.png

KDE Pixmap Region Selector Dialog

Author:
Antonio Larrosa <larrosa@kde.org>

Definition at line 44 of file kpixmapregionselectordialog.h.


Constructor & Destructor Documentation

KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog ( QWidget *  parent = 0) [explicit]

The constructor of an empty KPixmapRegionSelectorDialog, you have to call later the setPixmap method of the KPixmapRegionSelectorWidget widget of the new object.

Definition at line 60 of file kpixmapregionselectordialog.cpp.

KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog ( )

The destructor of the dialog.

Definition at line 78 of file kpixmapregionselectordialog.cpp.


Member Function Documentation

void KPixmapRegionSelectorDialog::adjustRegionSelectorWidgetSizeToFitScreen ( )
Since:
4.4.3 Adjusts the size of the KPixmapRegionSelectorWidget to not overflow the screen size

Definition at line 88 of file kpixmapregionselectordialog.cpp.

QImage KPixmapRegionSelectorDialog::getSelectedImage ( const QPixmap &  pixmap,
int  aspectRatioWidth,
int  aspectRatioHeight,
QWidget *  parent = 0L 
) [static]

Creates a modal dialog, lets the user to select a region of the pixmap with the same aspect ratio than aspectRatioWidth x aspectRatioHeight and returns when the dialog is closed.

Returns:
the selected image, or an invalid image if the user pressed the Cancel button.

Definition at line 145 of file kpixmapregionselectordialog.cpp.

QImage KPixmapRegionSelectorDialog::getSelectedImage ( const QPixmap &  pixmap,
QWidget *  parent = 0L 
) [static]

Creates a modal dialog, lets the user to select a region of the pixmap and returns when the dialog is closed.

Returns:
the selected image, or an invalid image if the user pressed the Cancel button.

Definition at line 128 of file kpixmapregionselectordialog.cpp.

QRect KPixmapRegionSelectorDialog::getSelectedRegion ( const QPixmap &  pixmap,
int  aspectRatioWidth,
int  aspectRatioHeight,
QWidget *  parent = 0L 
) [static]

Creates a modal dialog, lets the user to select a region of the pixmap with the same aspect ratio than aspectRatioWidth x aspectRatioHeight and returns when the dialog is closed.

Returns:
the selected rectangle, or an invalid rectangle if the user pressed the Cancel button.

Definition at line 110 of file kpixmapregionselectordialog.cpp.

QRect KPixmapRegionSelectorDialog::getSelectedRegion ( const QPixmap &  pixmap,
QWidget *  parent = 0L 
) [static]

Creates a modal dialog, lets the user to select a region of the pixmap and returns when the dialog is closed.

Returns:
the selected rectangle, or an invalid rectangle if the user pressed the Cancel button.

Definition at line 93 of file kpixmapregionselectordialog.cpp.

KPixmapRegionSelectorWidget * KPixmapRegionSelectorDialog::pixmapRegionSelectorWidget ( ) const
Returns:
the KPixmapRegionSelectorWidget widget so that additional parameters can be set by using it.

Definition at line 83 of file kpixmapregionselectordialog.cpp.


The documentation for this class was generated from the following files:
  • kpixmapregionselectordialog.h
  • kpixmapregionselectordialog.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal