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

subalbumWidget.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_SUBALBUMWIDGET_H
00018 #define GUI_SUBALBUMWIDGET_H
00019 
00020 //--------------------
00021 //forward declarations
00022 class QGridLayout;
00023 class QLabel;
00024 class QLineEdit;
00025 class QPixmap;
00026 class QIconView;
00027 class PhotosIconView;
00028 class QToolButton;
00029 class QFrame;
00030 class Subalbum;
00031 class LayoutWidget;
00032 class Photo;
00033 
00034 class QIconViewItem;
00035 //--------------------
00036 
00037 #include <qwidget.h>
00038 
00039 //=====================================
00042 //=====================================
00043 class SubalbumWidget : public QWidget
00044 {
00045 Q_OBJECT
00046 
00047 public:
00049   SubalbumWidget(Subalbum* salbum,
00050                  QWidget *parent=0, 
00051                  const char* name=0);
00052                  
00054   void setSubalbum(Subalbum* salbum);
00055   
00057   void refreshPhotos();
00058 
00060   void refreshSelectedPhotos();
00061   
00063   void syncPhotos();
00064   
00066   Subalbum* getSubalbum();
00067 
00069   Photo* getSelectedPhoto();
00070 
00072   QIconView* getPhotos();
00073 
00075   void updateButtons(bool enable);
00076 //----------------------
00077 private slots:
00079   void updateName( const QString& val );
00080 
00082   void updateDescription( const QString& val );
00083 
00085   void setImageAction();
00086 
00088   void updateButtons();
00089   
00091   void addImageAction();
00092 
00094   void removeImageAction();
00095 
00097   void rotate90ImageAction();
00098     
00100   void rotate270ImageAction();
00101 
00103   void flipHorizontallyImageAction();
00104   
00106   void flipVerticallyImageAction();    
00107     
00109   void editAction();    
00110   
00112   void rearrangeAndSaveCurrent( QIconViewItem* item);
00113   
00114   //Rearranges subalbums in grid
00115   void reorder();
00116   //----------------------
00117 protected:
00118     void resizeEvent( QResizeEvent * );
00119   //----------------------
00120 private:
00122   QGridLayout* mainGrid;
00123   QGridLayout* buttonsGrid;
00124   QGridLayout* annotationGrid;  
00125 
00127   QFrame* buttonsFrame;
00128   QFrame* annotationsFrame;
00129       
00131   QLabel* subalbumName;
00132 
00134   QLineEdit* subalbumNameVal;
00135 
00137   QLabel* subalbumDescription;
00138 
00140   QLineEdit* subalbumDescriptionVal;
00141 
00143   QLabel* representativeImageText;
00144 
00146   QToolButton* setImage;
00147 
00149   QLabel* representativeLogo;
00150 
00152   PhotosIconView* photos;
00153 
00155   Subalbum* subalbum;
00156     
00158   QToolButton* addImage;
00159     
00161   QToolButton* removeImage;
00162     
00164   QToolButton* rotate90Image;
00165 
00167   QToolButton* rotate270Image;
00168     
00170   QToolButton* flipHorizontallyImage;
00171 
00173   QToolButton* flipVerticallyImage;
00174       
00176   QToolButton* editButton;
00177   
00179   LayoutWidget* layout;
00180   
00182   bool buttonsState;
00183 //----------------------
00184 };
00185 //======================
00186 
00187 #endif //GUI_SUBALBUMWIDGET_H

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