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 QPixmap; 00026 class QImage; 00027 class QPushButton; 00028 class QFrame; 00029 class LayoutWidget; 00030 class PhotoViewWidget; 00031 class Photo; 00032 //-------------------- 00033 00034 #include <qwidget.h> 00035 00036 //===================================== 00039 //===================================== 00040 class PhotoEditWidget : public QWidget 00041 { 00042 Q_OBJECT 00043 00044 public: 00046 PhotoEditWidget(QWidget *parent=0, 00047 const char* name=0); 00048 00050 ~PhotoEditWidget(); 00051 00053 void setPhoto(Photo* photo); 00054 //---------------------- 00055 private slots: 00057 void updateDescription( const QString& val ); 00058 00060 void adjustExposure(); 00061 00063 void cropToRegion(); 00064 00066 void invertSelection(); 00067 00069 void reduceRedeye(); 00070 00072 void resetImageAction(); 00073 00075 void returnFromEdit(); 00076 //---------------------- 00077 private: 00079 QGridLayout* grid; 00080 00082 QFrame* buttons; 00083 00085 QGridLayout* grid2; 00086 00088 QLabel* photoDescription; 00089 00091 QLineEdit* photoDescriptionVal; 00092 00094 Photo* photo; 00095 00098 QImage* originalImage; 00099 00101 PhotoViewWidget* photoView; 00102 00104 QPixmap* adjExposureImage; 00105 00107 QPushButton* adjExposureButton; 00108 00110 QPixmap* cropImage; 00111 00113 QPushButton* cropButton; 00114 00116 QPixmap* invertImage; 00117 00119 QPushButton* invertButton; 00120 00122 QPixmap* redEyeImage; 00123 00125 QPushButton* redEyeButton; 00126 00128 QPixmap* resetImage; 00129 00131 QPushButton* resetButton; 00132 00134 QPixmap* returnImage; 00135 00137 QPushButton* returnButton; 00138 00140 LayoutWidget* layout; 00141 //---------------------- 00142 }; 00143 //====================== 00144 00145 #endif //GUI_PHOTOEDITWIDGET_H