• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Slots | Public Member Functions | Protected Member Functions | List of all members
KPixmapRegionSelectorWidget Class Reference

#include <kpixmapregionselectorwidget.h>

Inherits TQWidget.

Public Slots

void rotateClockwise ()
 
void rotateCounterclockwise ()
 

Public Member Functions

 KPixmapRegionSelectorWidget (TQWidget *parent=0L, const char *name=0L)
 
 ~KPixmapRegionSelectorWidget ()
 
void setPixmap (const TQPixmap &pixmap)
 
TQPixmap pixmap () const
 
void setSelectedRegion (const TQRect &rect)
 
TQRect selectedRegion () const
 
TQRect unzoomedSelectedRegion () const
 
void resetSelection ()
 
TQImage selectedImage () const
 
void setSelectionAspectRatio (int width, int height)
 
void setFreeSelectionAspectRatio ()
 
void setMaximumWidgetSize (int width, int height)
 
void rotate (KImageEffect::RotateDirection direction)
 

Protected Member Functions

virtual TDEPopupMenu * createPopupMenu ()
 

Detailed Description

KPixmapRegionSelectorWidget is a widget that shows a picture and provides the user with a friendly way to select a rectangular subregion of the pixmap.

NOTE: There are two copies of this .h and the .cpp file, with subtle differences. One copy is in tdelibs/tdeui, and the other copy is in tdepim/libtdepim This is because tdepim has to remain backwards compatible. Any changes to either file should be made to the other.

Author
Antonio Larrosa larro.nosp@m.sa@k.nosp@m.de.or.nosp@m.g
Since
3.4

Definition at line 44 of file kpixmapregionselectorwidget.h.

Constructor & Destructor Documentation

◆ KPixmapRegionSelectorWidget()

KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget ( TQWidget *  parent = 0L,
const char *  name = 0L 
)

Constructor for a KPixmapRegionSelectorWidget.

Definition at line 40 of file kpixmapregionselectorwidget.cpp.

◆ ~KPixmapRegionSelectorWidget()

KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget ( )

Destructor for a KPixmapRegionSelectorWidget.

Definition at line 63 of file kpixmapregionselectorwidget.cpp.

Member Function Documentation

◆ createPopupMenu()

TDEPopupMenu * KPixmapRegionSelectorWidget::createPopupMenu ( )
protectedvirtual

Creates a TDEPopupMenu with the menu that appears when clicking with the right button on the label.

Definition at line 138 of file kpixmapregionselectorwidget.cpp.

◆ pixmap()

TQPixmap KPixmapRegionSelectorWidget::pixmap ( ) const
inline
Returns
the original whole pixmap that we're using in this widget as the pixmap the user is selecting a region from.

Definition at line 69 of file kpixmapregionselectorwidget.h.

◆ resetSelection()

void KPixmapRegionSelectorWidget::resetSelection ( )

Resets the selection to use the whole image.

Definition at line 76 of file kpixmapregionselectorwidget.cpp.

◆ rotate()

void KPixmapRegionSelectorWidget::rotate ( KImageEffect::RotateDirection  direction)

Rotates the image as specified by the direction parameter, also tries to rotate the selected region so that it doesn't change, as long as the forced aspect ratio setting is respected, in other case, the selected region is resetted.

Definition at line 160 of file kpixmapregionselectorwidget.cpp.

◆ rotateClockwise

void KPixmapRegionSelectorWidget::rotateClockwise ( )
slot

Rotates the current image 90º clockwise.

Definition at line 199 of file kpixmapregionselectorwidget.cpp.

◆ rotateCounterclockwise

void KPixmapRegionSelectorWidget::rotateCounterclockwise ( )
slot

Rotates the current image 90º counterclockwise.

Definition at line 204 of file kpixmapregionselectorwidget.cpp.

◆ selectedImage()

TQImage KPixmapRegionSelectorWidget::selectedImage ( ) const
Returns
a TQImage object with just the region the user selected from the image

Definition at line 396 of file kpixmapregionselectorwidget.cpp.

◆ selectedRegion()

TQRect KPixmapRegionSelectorWidget::selectedRegion ( ) const

Returns the selected region ( in zoomed pixmap coordinates )

Definition at line 82 of file kpixmapregionselectorwidget.cpp.

◆ setFreeSelectionAspectRatio()

void KPixmapRegionSelectorWidget::setFreeSelectionAspectRatio ( )

Allows the user to do a selection which has any aspect ratio.

This is the default.

See also
setSelectionAspectRatio()

Definition at line 407 of file kpixmapregionselectorwidget.cpp.

◆ setMaximumWidgetSize()

void KPixmapRegionSelectorWidget::setMaximumWidgetSize ( int  width,
int  height 
)

Sets the maximum size for the widget.

If the image is larger than this (either horizontally or vertically), it's scaled to adjust to the maximum size (preserving the aspect ratio)

Definition at line 412 of file kpixmapregionselectorwidget.cpp.

◆ setPixmap()

void KPixmapRegionSelectorWidget::setPixmap ( const TQPixmap &  pixmap)

Sets the pixmap which will be shown for the user to select a region from.

Parameters
pixmapThe pixmap. Must be non-null.

Definition at line 67 of file kpixmapregionselectorwidget.cpp.

◆ setSelectedRegion()

void KPixmapRegionSelectorWidget::setSelectedRegion ( const TQRect &  rect)

Sets the selected region to be rect (in zoomed pixmap coordinates)

Definition at line 87 of file kpixmapregionselectorwidget.cpp.

◆ setSelectionAspectRatio()

void KPixmapRegionSelectorWidget::setSelectionAspectRatio ( int  width,
int  height 
)

Sets the aspect ration that the selected subimage should have.

The way to select it, is specifying an example valid width and height.

See also
setFreeSelectionAspectRatio()

Definition at line 402 of file kpixmapregionselectorwidget.cpp.

◆ unzoomedSelectedRegion()

TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion ( ) const

Returns the selected region ( in unzoomed, original pixmap coordinates )

Definition at line 388 of file kpixmapregionselectorwidget.cpp.


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

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.