Skip to content
Snippets Groups Projects
Commit 7ba1afb0 authored by simon.fanetti's avatar simon.fanetti
Browse files

clean main SandboxSetup app

parent 32f71cde
Branches
No related tags found
No related merge requests found
#include <QApplication>
#include "mainwindow.h"
......@@ -10,91 +8,3 @@ int main(int argc, char *argv[])
main.show();
return app.exec();
}
/*
#include <QApplication>
#include "monitorgui.h"
#include "camerafocus.h"
#include "croppingmask.h"
#include "projectiongui.h"
#include "qtfullscreen.h"
#include "beamerlocationgui.h"
#include <sandboxSetup.h>
void exit_msg(SandboxSetup *setup, std::string msg){
setup->getCamera()->stop();
std::cout << msg << std::endl;
exit(1);
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
SandboxSetup setup;
MonitorGui mg;
ProjectionGui pg(&setup, &mg);
CameraFocus cf(&setup);
CroppingMask cm(&setup, &mg);
BeamerLocationGui bl(&setup, &mg);
setup.getCamera()->start();
// Select output screen and projection's resolutions
mg.show();
app.exec();
if(!mg.isOk()){
exit_msg(&setup, "Cancel resolution");
}
setup.getBeamer()->setResolution(cv::Size(mg.getWidth(), mg.getHeight()));
// Setup camera and beamer physically
pg.show();
app.exec();
// Edit frame process profil for the setupBeamerLocation routine
cf.show();
app.exec();
if(!cf.isOk()){
exit_msg(&setup, "Cancel camera parameters");
}
// Setup the adjust matrix and cropping mask
cm.show();
app.exec();
if(!cm.isOk()){
exit_msg(&setup, "Cancel drop");
}
if(cm.updated()){
cv::Size s = setup.getCamera()->getDepthFrame().size();
cv::Point center(s.width / 2, s.height / 2);
std::vector<cv::Point> rectPoints = cm.getRectPoints();
setup.setupAdjustMatrix(rectPoints, center);
setup.setupCroppingMask(rectPoints);
}
// Setup the beamer location
bl.show();
app.exec();
if(!bl.endedSuccessfully()){
exit_msg(&setup, "Cancel beamer position");
}
// Save config in file
if(setup.saveConfig()){
exit_msg(&setup, "Failed to save configuration");
}
setup.getCamera()->stop();
return 0;
}
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment