#include "qui/PathScene.h"
#include "qui/ThresholdWidget.h"
+#include "qui/ImageSaveDialog.h"
#include <iostream>
connect(threshold, SIGNAL(thresholdChanged(int)),
scene, SLOT(setClipPlane(int)));
mussaViewTB->addWidget(threshold);
+
+ //Image Save Dialog
+ imageSaveDialog = new ImageSaveDialog(scene, this);
+
addToolBar(mussaViewTB);
statusBar()->showMessage("Welcome to mussa", 2000);
whatsThisAction = QWhatsThis::createAction(this);
whatsThisAction->setIcon(QIcon("icons/help.png"));
+
+ //Save pixel map action
+ saveOpenGlPixmapAction = new QAction(tr("Save to image..."), this);
+ connect(saveOpenGlPixmapAction, (SIGNAL(triggered())),
+ this, SLOT(promptSaveOpenGlPixmap()));
+ saveOpenGlPixmapAction->setIcon(QIcon("icons/image2.png"));
}
void PathWindow::setupMainMenu()
newMenu->addAction(loadMotifListAction);
newMenu->addAction(saveMotifListAction);
newMenu->addSeparator();
+ newMenu->addAction(saveOpenGlPixmapAction);
+ newMenu->addSeparator();
newMenu->addAction(closeAction);
newMenu = menuBar()->addMenu(tr("&View"));
QMessageBox::warning(this, QObject::tr("mussa"), QObject::tr("Not implemented yet"));
}
+void PathWindow::promptSaveOpenGlPixmap()
+{
+ QSize size;
+ size = scene->size();
+ imageSaveDialog->setSize(size.width(), size.height());
+ int result = imageSaveDialog->exec();
+ std::cout << "Result: " << result << "\n";
+}
#define _PATHWINDOW_H_
#include <QMainWindow>
-
+#include <QPixmap>
class QAction;
class PathScene;
+class ImageSaveDialog;
class PathWindow : public QMainWindow
{
//\@}
void showMussaToolbar();
+
+ void promptSaveOpenGlPixmap();
protected:
// display our wonderful mussa output
PathScene *scene;
QToolBar *mussaViewTB;
+ ImageSaveDialog *imageSaveDialog;
QAction *aboutAction;
QAction *closeAction;
QAction *showMussaViewToolbarAction;
QAction *toggleMotifsAction;
QAction *whatsThisAction;
+ QAction *saveOpenGlPixmapAction;
//! initialze the actions
void setupActions();