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

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • widgets
thumbimage.h
Go to the documentation of this file.
1 /***************************************************************************
2  thumbimage.h - description
3  -------------------
4  begin : Fri 09 Dec 2005
5  copyright : (C) 2005 by Jason Harris
6  email : kstars@30doradus.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef THUMBIMAGE_H
19 #define THUMBIMAGE_H
20 
21 #include <QLabel>
22 #include <QPixmap>
23 
24 class ThumbImage : public QLabel {
25  Q_OBJECT
26 public:
27  explicit ThumbImage( QWidget *parent, const char *name = 0 );
28  ~ThumbImage();
29 
30  void setImage( QPixmap *pm ) { Image = pm; setFixedSize( Image->width(), Image->height() ); }
31  QPixmap* image() { return Image; }
32  QPixmap croppedImage();
33 
34  void setCropRect( int x, int y, int w, int h ) { CropRect->setRect( x, y, w, h ); }
35  QRect* cropRect() const { return CropRect; }
36 
37 signals:
38  void cropRegionModified();
39 
40 protected:
41  // void resizeEvent( QResizeEvent *e);
42  void paintEvent( QPaintEvent *);
43  void mousePressEvent( QMouseEvent *e );
44  void mouseReleaseEvent( QMouseEvent *e );
45  void mouseMoveEvent( QMouseEvent *e );
46 
47 private:
48  QRect *CropRect;
49  QPoint *Anchor;
50  QPixmap *Image;
51 
52  bool bMouseButtonDown;
53  bool bTopLeftGrab, bBottomLeftGrab, bTopRightGrab, bBottomRightGrab;
54  int HandleSize;
55 };
56 
57 #endif
ThumbImage::setImage
void setImage(QPixmap *pm)
Definition: thumbimage.h:30
QWidget
ThumbImage::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *e)
Definition: thumbimage.cpp:111
ThumbImage::cropRegionModified
void cropRegionModified()
ThumbImage::image
QPixmap * image()
Definition: thumbimage.h:31
ThumbImage
Definition: thumbimage.h:24
ThumbImage::croppedImage
QPixmap croppedImage()
Definition: thumbimage.cpp:24
ThumbImage::setCropRect
void setCropRect(int x, int y, int w, int h)
Definition: thumbimage.h:34
ThumbImage::ThumbImage
ThumbImage(QWidget *parent, const char *name=0)
Definition: thumbimage.cpp:28
ThumbImage::mousePressEvent
void mousePressEvent(QMouseEvent *e)
Definition: thumbimage.cpp:84
ThumbImage::cropRect
QRect * cropRect() const
Definition: thumbimage.h:35
ThumbImage::paintEvent
void paintEvent(QPaintEvent *)
Definition: thumbimage.cpp:49
QLabel
ThumbImage::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *e)
Definition: thumbimage.cpp:119
ThumbImage::~ThumbImage
~ThumbImage()
Definition: thumbimage.cpp:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal