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

KDEUI

kpixmapregionselectorwidget.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2004 Antonio Larrosa <larrosa@kde.org
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KPIXMAPREGIONSELECTORWIDGET_H
00021 #define KPIXMAPREGIONSELECTORWIDGET_H
00022 
00023 #include <kdeui_export.h>
00024 
00025 #include <QtGui/QPixmap>
00026 #include <QtGui/QWidget>
00027 
00028 class KMenu;
00029 
00030 
00044 class KDEUI_EXPORT KPixmapRegionSelectorWidget : public QWidget
00045 {
00046    Q_OBJECT
00047     Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
00048    
00049 public:
00054     enum RotateDirection{ Rotate90,  
00055                           Rotate180, 
00056                           Rotate270  
00057     };
00058 
00062    explicit KPixmapRegionSelectorWidget( QWidget *parent = 0 );
00063 
00067    ~KPixmapRegionSelectorWidget();
00068 
00074    void setPixmap( const QPixmap &pixmap );
00075 
00080    QPixmap pixmap() const;
00081 
00085    void setSelectedRegion(const QRect &rect);
00086 
00090    QRect selectedRegion() const;
00091 
00095    QRect unzoomedSelectedRegion() const;
00096 
00100    void resetSelection();
00101 
00106    QImage selectedImage() const;
00107 
00113    void setSelectionAspectRatio(int width, int height);
00114 
00120    void setFreeSelectionAspectRatio();
00121 
00127    void setMaximumWidgetSize( int width, int height );
00128 
00135    void rotate(RotateDirection direction);
00136 
00137 public Q_SLOTS:
00141    void rotateClockwise();
00145    void rotateCounterclockwise();
00146 
00147 Q_SIGNALS:
00148     void pixmapRotated();
00149 
00150 protected:
00154    virtual KMenu *createPopupMenu();
00155 
00156 private:
00157    bool eventFilter(QObject *obj, QEvent *ev);
00158    
00159    class Private;
00160    friend class Private;
00161    Private* const d;
00162    
00163    Q_DISABLE_COPY(KPixmapRegionSelectorWidget)
00164 };
00165 
00166 #endif
00167 

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