#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";
+}