| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -19,13 +19,21 @@ volatile sig_atomic_t do_exit = 0; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					MainWindow::MainWindow(QWidget *parent) : QWidget(parent) { | 
					 | 
					 | 
					 | 
					MainWindow::MainWindow(QWidget *parent) : QWidget(parent) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  main_layout = new QStackedLayout; | 
					 | 
					 | 
					 | 
					  main_layout = new QStackedLayout; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#ifdef QCOM2 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  QLabel * label = new QLabel(this); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  main_layout->addWidget(label); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  GLWindow * glWindow = new GLWindow; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  glWindow->setLabel(label); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  glWindow->show(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#else | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  GLWindow * glWindow = new GLWindow(this); | 
					 | 
					 | 
					 | 
					  GLWindow * glWindow = new GLWindow(this); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  main_layout->addWidget(glWindow); | 
					 | 
					 | 
					 | 
					  main_layout->addWidget(glWindow); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#endif | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  SettingsWindow * settingsWindow = new SettingsWindow(this); | 
					 | 
					 | 
					 | 
					  SettingsWindow * settingsWindow = new SettingsWindow(this); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  main_layout->addWidget(settingsWindow); | 
					 | 
					 | 
					 | 
					  main_layout->addWidget(settingsWindow); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  main_layout->setMargin(0); | 
					 | 
					 | 
					 | 
					  main_layout->setMargin(0); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  setLayout(main_layout); | 
					 | 
					 | 
					 | 
					  setLayout(main_layout); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  QObject::connect(glWindow, SIGNAL(openSettings()), this, SLOT(openSettings())); | 
					 | 
					 | 
					 | 
					  QObject::connect(glWindow, SIGNAL(openSettings()), this, SLOT(openSettings())); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -52,6 +60,10 @@ GLWindow::GLWindow(QWidget *parent) : QOpenGLWidget(parent) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  timer = new QTimer(this); | 
					 | 
					 | 
					 | 
					  timer = new QTimer(this); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  QObject::connect(timer, SIGNAL(timeout()), this, SLOT(timerUpdate())); | 
					 | 
					 | 
					 | 
					  QObject::connect(timer, SIGNAL(timeout()), this, SLOT(timerUpdate())); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#ifdef QCOM2 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  setFixedWidth(vwp_w); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  setFixedHeight(vwp_h); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#endif | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					GLWindow::~GLWindow() { | 
					 | 
					 | 
					 | 
					GLWindow::~GLWindow() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -59,6 +71,10 @@ GLWindow::~GLWindow() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  doneCurrent(); | 
					 | 
					 | 
					 | 
					  doneCurrent(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					void GLWindow::setLabel(QLabel * l){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  label = l; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void GLWindow::initializeGL() { | 
					 | 
					 | 
					 | 
					void GLWindow::initializeGL() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  initializeOpenGLFunctions(); | 
					 | 
					 | 
					 | 
					  initializeOpenGLFunctions(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  std::cout << "OpenGL version: " << glGetString(GL_VERSION) << std::endl; | 
					 | 
					 | 
					 | 
					  std::cout << "OpenGL version: " << glGetString(GL_VERSION) << std::endl; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -78,6 +94,13 @@ void GLWindow::initializeGL() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void GLWindow::timerUpdate(){ | 
					 | 
					 | 
					 | 
					void GLWindow::timerUpdate(){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  ui_update(ui_state); | 
					 | 
					 | 
					 | 
					  ui_update(ui_state); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  update(); | 
					 | 
					 | 
					 | 
					  update(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  if (label != NULL){ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    QImage img = grabFramebuffer(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    QTransform transform; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    transform.rotate(90); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    label->setPixmap(QPixmap::fromImage(img).transformed(transform)); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					void GLWindow::resizeGL(int w, int h) { | 
					 | 
					 | 
					 | 
					void GLWindow::resizeGL(int w, int h) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |