myWindow::myWindow(QWidget *parent) :QMainWindow(parent),ui(new Ui::MainWindow) { try { //Setup window layout ui->setupUi(this); //Create openGL context QGLFormat qglFormat; qglFormat.setVersion(1,2); //Create OpenGL Widget renderer glWidget=new myWidgetGL(qglFormat); //Add the OpenGL Widget into the layout ui->layout_scene->addWidget(glWidget); } catch(cpe::exception_cpe const& e) { std::cout<<std::endl<<e.report_exception()<<std::endl; } //Connect slot and signals connect(ui->quit,SIGNAL(clicked()),this,SLOT(action_quit())); connect(ui->draw,SIGNAL(clicked()),this,SLOT(action_draw())); connect(ui->wireframe,SIGNAL(clicked()),this,SLOT(action_wireframe())); connect(ui->saveFace,SIGNAL(clicked()),this,SLOT(action_saveFace())); connect(ui->startHandtrack,SIGNAL(clicked()),this,SLOT(action_start_handtrack())); connect(ui->showFaceTrack,SIGNAL(clicked()),SLOT(action_faceTrack())); connect(ui->showHandTrack,SIGNAL(clicked()),this,SLOT(action_handTrack())); //sc = new scene(); }
static void sighandler(int signum){ switch ( signum ){ case SIGINT: case SIGTERM: action_quit(); break; case SIGHUP: action_reload(); break; case SIGUSR1: action_debug(); } }
static void handle_quit(DBusMessage* message){ action_quit(); }