Update mussa to build on ubuntu 10.04 with qt 4.6.2 +boost 1.40.0.1
[mussa.git] / qui / ImageSaveDialog.hpp
1 #ifndef _IMAGESAVEDIALOG_H_
2 #define _IMAGESAVEDIALOG_H_
3
4 #include <boost/shared_ptr.hpp>
5  
6 #include <QDialog>
7 #include <QDir>
8
9 #include "qui/seqbrowser/SequenceBrowser.hpp"
10 #include "qui/seqbrowser/SequenceBrowserWidget.hpp"
11 #include "qui/seqbrowser/ScrollableSequenceBrowser.hpp"
12
13 class ImageScaler;
14 class QLabel;
15 class QPixmap;
16 class QPushButton;
17 class QGLWidget;
18
19 class ImageSaveDialog : public QDialog
20 {
21   Q_OBJECT
22
23 public:
24   ImageSaveDialog(boost::shared_ptr<QDir> default_dir_, 
25                   ScrollableSequenceBrowser *scrollSeqBrowser = 0,
26                   QWidget *parent = 0);
27   QDir defaultDir() const;
28   
29 public slots:
30   void accept();
31   void reject();
32   void setSize(int width, int height);
33
34 private:
35   //! prompt user for file name and save image, if (endDialog) close dialog
36   /** if endDialog is true, we should close the dialog box,
37    *  otherwise, keep the dialog box. (In case the user canceled out
38    *  of save as.
39    */  
40   void savePixmap(bool &endDialog);
41   QSize getOpenGlPixmapSize();
42   QPixmap renderOpenGlPixmap();
43   
44   boost::shared_ptr<QDir> default_dir;
45   ImageScaler *imageScaler;
46   QPushButton *saveButton;
47   QPushButton *cancelButton;
48
49   SequenceBrowser glwidget;
50 };
51
52 #endif