AlbumShaper  1.0a3
panningPreviewInterface.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_PANNINGPREVIEWINTERFACE_H
00012 #define GUI_EDITING_PANNINGPREVIEWINTERFACE_H
00013 
00014 #include <qrect.h>
00015 
00016 #include "splitViewInterface.h"
00017 
00018 //=====================================
00020 //=====================================
00021 class PanningPreviewInterface : public SplitViewInterface
00022 {
00023 Q_OBJECT
00024 
00025 public:
00027   PanningPreviewInterface(QString imageFilename, QWidget *parent=0, const char* name=0);
00028 
00029   virtual QSize sizeHint() const;
00030 
00031   //get current selection
00032   QRect getSelection();
00033 
00034   //returns size of space that will be used for painting
00035   QSize paintingSize();
00036 
00037   //----------------------
00038 protected:
00039   void resizeEvent( QResizeEvent * );
00040   //----------------------
00041 private:
00042   //util funtion - generates orig image and signals adjusted image is out of date
00043   void generateOrigImage();
00044   
00046   QImage fullSizeImage;
00047 
00049   QRect selection;
00050   //----------------------
00051 signals:
00052   //emitted when the selected region has changed indicating the adjusted image is out of date
00053   void selectionChanged();
00054   //----------------------
00055 public slots:
00056   //reset selected region
00057   void setSelection( QRect selection );
00058   //----------------------
00059 };
00060 //======================
00061 
00062 #endif //GUI_EDITING_PANNINGPREVIEWINTERFACE_H