Update mussa to build on ubuntu 10.04 with qt 4.6.2 +boost 1.40.0.1
[mussa.git] / qui / ImageSaveDialog.hpp
index beda6ee95e2107e8c64e3e89447880b00f888a28..399fd8679c3c90c86e0c0d4d100694014df8fe6b 100644 (file)
@@ -1,7 +1,14 @@
 #ifndef _IMAGESAVEDIALOG_H_
 #define _IMAGESAVEDIALOG_H_
+
+#include <boost/shared_ptr.hpp>
  
 #include <QDialog>
+#include <QDir>
+
+#include "qui/seqbrowser/SequenceBrowser.hpp"
+#include "qui/seqbrowser/SequenceBrowserWidget.hpp"
+#include "qui/seqbrowser/ScrollableSequenceBrowser.hpp"
 
 class ImageScaler;
 class QLabel;
@@ -14,30 +21,32 @@ class ImageSaveDialog : public QDialog
   Q_OBJECT
 
 public:
-  ImageSaveDialog(QGLWidget *qlwidget = 0, QWidget *parent = 0);
-
+  ImageSaveDialog(boost::shared_ptr<QDir> default_dir_, 
+                 ScrollableSequenceBrowser *scrollSeqBrowser = 0,
+                 QWidget *parent = 0);
+  QDir defaultDir() const;
+  
 public slots:
   void accept();
   void reject();
-  //  int exec();
-  void promptFileDialog();
   void setSize(int width, int height);
 
-signals:
-
 private:
-  void savePixmap();
+  //! prompt user for file name and save image, if (endDialog) close dialog
+  /** if endDialog is true, we should close the dialog box,
+   *  otherwise, keep the dialog box. (In case the user canceled out
+   *  of save as.
+   */  
+  void savePixmap(bool &endDialog);
   QSize getOpenGlPixmapSize();
   QPixmap renderOpenGlPixmap();
-
+  
+  boost::shared_ptr<QDir> default_dir;
   ImageScaler *imageScaler;
-  //QPixmap *pixmap;
-  QLabel *filePathLabel;
-  QPushButton *browseButton;
   QPushButton *saveButton;
   QPushButton *cancelButton;
-  QGLWidget *glwidget;
-  
+
+  SequenceBrowser glwidget;
 };
 
 #endif