Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

photoEditWidget.h

Go to the documentation of this file.
00001 //==============================================
00002 //  copyright            : (C) 2003 by Will Stokes
00003 //==============================================
00004 //  This program is free software; you can redistribute it 
00005 //  and/or modify it under the terms of the GNU General 
00006 //  Public License as published by the Free Software 
00007 //  Foundation; either version 2 of the License, or  
00008 //  (at your option) any later version.         
00009 //
00010 //  As a special exception, Will Stokes gives permission to 
00011 //  link this program with Qt non-commercial edition, and 
00012 //  distribute the resulting executable, without including the 
00013 //  source code for the Qt non-commercial edition in the 
00014 //  source distribution. 
00015 //==============================================
00016 
00017 #ifndef GUI_PHOTOEDITWIDGET_H
00018 #define GUI_PHOTOEDITWIDGET_H
00019 
00020 //--------------------
00021 //forward declarations
00022 class QGridLayout;
00023 class QLabel;
00024 class QLineEdit;
00025 class QImage;
00026 class QToolButton;
00027 class QFrame;
00028 class LayoutWidget;
00029 class PhotoViewWidget;
00030 class Photo;
00031 //--------------------
00032 
00033 #include <qwidget.h>
00034 
00035 //=====================================
00038 //=====================================
00039 class PhotoEditWidget : public QWidget
00040 {
00041 Q_OBJECT
00042 
00043 public:
00045   PhotoEditWidget(QWidget *parent=0, 
00046                           const char* name=0);
00047                  
00049   ~PhotoEditWidget();
00050   
00052   void setPhoto(Photo* photo);
00053 //----------------------
00054 private slots:
00056   void updateDescription( const QString& val );
00057   
00059   void adjustExposure();
00060   
00062   void cropToRegion();
00063 
00065   void invertSelection();
00066     
00068   void grayscaleSelection();
00069 
00071   void reduceRedeye();
00072     
00074   void resetImageAction();
00075   
00077   void returnFromEdit();
00078   //----------------------  
00079 private:
00081   bool findScaledSelection(QPoint& topLeft, QPoint& bottomRight);
00082 
00084   void findActualSelection(QPoint& topLeft, QPoint& bottomRight, QImage* fullImage);
00085 
00087   void applyImageUpdate(QImage* fullImage, QImage* editedImage);
00088     
00090   QGridLayout* grid;
00091 
00093   QFrame* buttons;
00094   
00096   QGridLayout* grid2;
00097   
00099   QLabel* photoDescription;
00100 
00102   QLineEdit* photoDescriptionVal;
00103   
00105   Photo* photo;
00106   
00109   QImage* originalImage;
00110   
00112   PhotoViewWidget* photoView;
00113     
00115   QToolButton* adjExposureButton;
00116   
00118   QToolButton* cropButton;
00119     
00121   QToolButton* invertButton;
00122     
00124   QToolButton* grayscaleButton;
00125   
00127   QToolButton* redEyeButton;
00128     
00130   QToolButton* resetButton;
00131   
00133   QToolButton* returnButton;
00134   
00136   LayoutWidget* layout;
00137 //----------------------
00138 };
00139 //======================
00140 
00141 #endif //GUI_PHOTOEDITWIDGET_H

Generated on Thu Nov 13 00:10:54 2003 for AlbumShaper by doxygen 1.3.4