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

editingInterface.h

Go to the documentation of this file.
00001 //==============================================
00002 //  copyright            : (C) 2003-2005 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 
00011 #ifndef GUI_EDITING_EDITINGINTERFACE_H
00012 #define GUI_EDITING_EDITINGINTERFACE_H
00013 
00014 //--------------------
00015 //forward declarations
00016 class QGridLayout;
00017 class QLabel;
00018 class QLineEdit;
00019 class QImage;
00020 class QToolButton;
00021 class QPushButton;
00022 class QFrame;
00023 class QComboBox;
00024 class ClickableLabel;
00025 class LayoutWidget;
00026 class SelectionInterface;
00027 class Subalbum;
00028 class Photo;
00029 //--------------------
00030 
00031 #include <qwidget.h>
00032 #include "../../backend/tools/imageTools.h"
00033 
00034 //=====================================
00036 //=====================================
00037 
00038 class EditingInterface : public QWidget
00039 {
00040 Q_OBJECT
00041 
00042 public:
00044   EditingInterface(QWidget *parent=0, const char* name=0);
00045 
00046   ~EditingInterface();
00047 
00049   void setPhoto(Subalbum* collection, Photo* photo);
00050 
00052   Photo* getPhoto();
00053   
00054   //returns true if currently selected photo is revertable
00055   bool currentPhotoRevertable();
00056   
00058   void revertCurrentPhoto();
00059 //----------------------
00060 signals:
00061   void photoModified();
00062 //----------------------    
00063 public slots:
00064   void handleSelectionChanged();
00065   void handleAspectRatioChanged();
00066   void setFocus();
00067   //----------------------
00068 protected:
00069   void keyPressEvent( QKeyEvent *e );
00070 //----------------------
00071 private slots:
00073   void showPrevPhoto();
00074 
00076   void showNextPhoto();
00077 
00079   void showFirstPhoto();
00080   
00082   void showLastPhoto();
00083   
00085   void rotateRight();
00086 
00088   void rotateLeft();
00089 
00091   void flipHorizontal();
00092 
00094   void startCorrectTilt();
00095   
00097   void finishCorrectTilt( QPoint p1, QPoint p2 ); 
00098   
00100   void flipVertical();
00101 
00103   void selectAspectRatio();
00104 
00106   void screenResolutionChanged();
00107   
00109   void rotateSelection();
00110   
00112   void crop();
00113 
00115   void enhanceContrast();
00116 
00118   void colorBalance();
00119   
00121   void removeRedeye();
00122 
00124   void tuneLevels();
00125   
00127   void adjustGrain();
00128   
00130   void selectEffect();
00131   
00133   void applyEffect();
00134   
00136   void returnAction();
00137   //----------------------
00138 private:
00141   void selectAspectRatio(bool rotateCurAspectRatio);    
00142     
00144   void showNextPrevFirstLastPhoto( Photo* newPhoto );    
00145     
00147   void rotateFlip( TRANSFORM_CODE rotationFlipType );
00148 
00150   bool findSelection(QPoint& topLeft, QPoint& bottomRight);
00151   
00153   void selectAll(QPoint& topLeft, QPoint& bottomRight);
00154 
00156   QImage* applyEffect(QString filename, bool useBusyIndicators=false);
00157   
00159   void applyImageUpdate(QImage* editedImage, bool resetSelection);
00162   ClickableLabel *previousButton, *nextButton;
00163   
00166   SelectionInterface* selectionInterface;
00167 
00169   QComboBox* aspectRatios;
00170   
00171   //Widget for selecting orientation for cropping
00172   QComboBox* orientations;
00173   
00175   int displayResolutionIndex;
00176   
00178   QSize* aspectRatioValues;     
00179   double* maxDimensions;
00180   
00182   QToolButton* correctTiltButton;
00183 
00185   QToolButton* cropButton;
00186   
00188   ClickableLabel* redEyeReductionButton;
00189     
00191   QComboBox* effectsList;
00192   
00194   QPushButton* applyEffectButton;
00195 
00197   QLabel* effectPreview;
00200   Subalbum* collection;
00201   
00203   Photo* photo;
00204 
00206   QString effectPreviewImageFilename;
00207   
00209   LayoutWidget* layout;
00210   
00212   int displayWidth, displayHeight;
00213   
00215   int imageWidth, imageHeight;
00216   
00218   int BW_EFFECT, SEPIA_EFFECT, INVERT_EFFECT, EMBOSS_EFFECT, PAINTING_EFFECT, POINTILLISM_EFFECT;  
00219 //----------------------
00220 };
00221 //======================
00222 
00223 #endif //GUI_EDITING_EDITINGINTERFACE_H

Generated on Sat Apr 2 05:44:04 2005 for AlbumShaper by  doxygen 1.3.9.1