• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

thumbnaileditor.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           thumbnaileditor.h  -  description
00003                              -------------------
00004     begin                : Thu Mar 2 2005
00005     copyright            : (C) 2005 by Jason Harris
00006     email                : kstars@30doradus.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef THUMBNAILEDITOR_H
00019 #define THUMBNAILEDITOR_H
00020 
00021 #include <kdialogbase.h>
00022 #include <qlabel.h>
00023 
00024 class ThumbnailEditorUI;
00025 class ThumbnailPicker;
00026 class QPoint;
00027 
00028 class ThumbImage : public QLabel
00029 {
00030 Q_OBJECT
00031 public:
00032     ThumbImage( QWidget *parent, const char *name = 0 );
00033     ~ThumbImage();
00034 
00035     void setImage( QPixmap *pm ) { Image = pm; setFixedSize( Image->width(), Image->height() ); }
00036     QPixmap* image() { return Image; }
00037     QPixmap croppedImage();
00038 
00039     void setCropRect( int x, int y, int w, int h ) { CropRect->setRect( x, y, w, h ); }
00040     QRect* cropRect() const { return CropRect; }
00041 
00042 signals:
00043     void cropRegionModified();
00044 
00045 protected:
00046 //  void resizeEvent( QResizeEvent *e);
00047     void paintEvent( QPaintEvent *);
00048     void mousePressEvent( QMouseEvent *e );
00049     void mouseReleaseEvent( QMouseEvent *e );
00050     void mouseMoveEvent( QMouseEvent *e );
00051 
00052 private:
00053     QRect *CropRect;
00054     QPoint *Anchor;
00055     QPixmap *Image;
00056     
00057     bool bMouseButtonDown;
00058     bool bTopLeftGrab, bBottomLeftGrab, bTopRightGrab, bBottomRightGrab;
00059     int HandleSize;
00060 };
00061 
00062 class ThumbnailEditor : public KDialogBase
00063 {
00064 Q_OBJECT
00065 public:
00066     ThumbnailEditor( QWidget *parent, const char *name=0 );
00067     ~ThumbnailEditor();
00068     QPixmap thumbnail();
00069 
00070 private slots:
00071     void slotUpdateCropLabel();
00072 
00073 private:
00074     ThumbnailEditorUI *ui;
00075     ThumbnailPicker *tp;
00076 
00077 };
00078 
00079 #endif

kstars

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

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
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