KDEUI
kpixmapregionselectorwidget.cpp
Go to the documentation of this file.
88 d->m_label->setAttribute(Qt::WA_NoSystemBackground,true);//setBackgroundMode( Qt::NoBackground );
148 if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() );
149 if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() );
344 d->m_selectedRegion.translate(d->m_originalPixmap.width()-d->m_selectedRegion.width()-d->m_selectedRegion.x(),0);
354 d->m_selectedRegion.translate(0,d->m_originalPixmap.height()-d->m_selectedRegion.height()-d->m_selectedRegion.y());
396 QRect KPixmapRegionSelectorWidget::Private::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint )
497 // kDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(d->m_unzoomedPixmap.width()).arg(d->m_unzoomedPixmap.height());
505 d->m_originalPixmap=QPixmap::fromImage( image.scaled( width, height, Qt::KeepAspectRatio,Qt::SmoothTransformation ) );
QString i18n(const char *text)
QRect selectedRegion() const
Returns the selected region ( in zoomed pixmap coordinates )
Definition: kpixmapregionselectorwidget.cpp:129
Rotate 180 degrees.
Definition: kpixmapregionselectorwidget.h:55
void pixmapRotated()
~KPixmapRegionSelectorWidget()
Destructor for a KPixmapRegionSelectorWidget.
Definition: kpixmapregionselectorwidget.cpp:103
void setFreeSelectionAspectRatio()
Allows the user to do a selection which has any aspect ratio.
Definition: kpixmapregionselectorwidget.cpp:483
QAction * addAction(const QString &name, QAction *action)
Add an action under the given name to the collection.
Definition: kactioncollection.cpp:217
KPixmapRegionSelectorWidget(QWidget *parent=0)
Constructor for a KPixmapRegionSelectorWidget.
Definition: kpixmapregionselectorwidget.cpp:77
void rotateClockwise()
Rotates the current image 90º clockwise.
Definition: kpixmapregionselectorwidget.cpp:274
QRect unzoomedSelectedRegion() const
Returns the selected region ( in unzoomed, original pixmap coordinates )
Definition: kpixmapregionselectorwidget.cpp:464
void setPixmap(const QPixmap &pixmap)
Sets the pixmap which will be shown for the user to select a region from.
Definition: kpixmapregionselectorwidget.cpp:113
KPixmapRegionSelectorWidget is a widget that shows a picture and provides the user with a friendly wa...
Definition: kpixmapregionselectorwidget.h:44
void setSelectedRegion(const QRect &rect)
Sets the selected region to be rect (in zoomed pixmap coordinates)
Definition: kpixmapregionselectorwidget.cpp:134
void resetSelection()
Resets the selection to use the whole image.
Definition: kpixmapregionselectorwidget.cpp:122
friend class Private
Definition: kpixmapregionselectorwidget.h:159
RotateDirection
This enum provides a rotation direction.
Definition: kpixmapregionselectorwidget.h:54
Rotate 90 degrees to the right.
Definition: kpixmapregionselectorwidget.h:54
void rotate(RotateDirection direction)
Rotates the image as specified by the direction parameter, also tries to rotate the selected region s...
Definition: kpixmapregionselectorwidget.cpp:216
void setMaximumWidgetSize(int width, int height)
Sets the maximum size for the widget.
Definition: kpixmapregionselectorwidget.cpp:488
void rotateCounterclockwise()
Rotates the current image 90º counterclockwise.
Definition: kpixmapregionselectorwidget.cpp:279
QImage selectedImage() const
Definition: kpixmapregionselectorwidget.cpp:472
virtual KMenu * createPopupMenu()
Creates a KMenu with the menu that appears when clicking with the right button on the label...
Definition: kpixmapregionselectorwidget.cpp:188
void setSelectionAspectRatio(int width, int height)
Sets the aspect ration that the selected subimage should have.
Definition: kpixmapregionselectorwidget.cpp:478
QPixmap pixmap() const
Rotate 90 degrees to the left.
Definition: kpixmapregionselectorwidget.h:56
QAction * addTitle(const QString &text, QAction *before=0L)
Inserts a title item with no icon.
Definition: kmenu.cpp:170
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.