change default_dir to a QDir
[mussa.git] / qui / ImageSaveDialog.hpp
1 #ifndef _IMAGESAVEDIALOG_H_
2 #define _IMAGESAVEDIALOG_H_
3  
4 #include <QDialog>
5
6 class ImageScaler;
7 class QLabel;
8 class QPixmap;
9 class QPushButton;
10 class QGLWidget;
11
12 class ImageSaveDialog : public QDialog
13 {
14   Q_OBJECT
15
16 public:
17   ImageSaveDialog(QGLWidget *qlwidget = 0, QWidget *parent = 0);
18
19 public slots:
20   void accept();
21   void reject();
22   void setSize(int width, int height);
23
24 private:
25   //! prompt user for file name and save image, if (endDialog) close dialog
26   /** if endDialog is true, we should close the dialog box,
27    *  otherwise, keep the dialog box. (In case the user canceled out
28    *  of save as.
29    */  
30   void savePixmap(bool &endDialog);
31   QSize getOpenGlPixmapSize();
32   QPixmap renderOpenGlPixmap();
33
34   ImageScaler *imageScaler;
35   QPushButton *saveButton;
36   QPushButton *cancelButton;
37   QGLWidget *glwidget;  
38 };
39
40 #endif