qvolray

diff src/ui.cc @ 14:88312413467c

adding a sidewidget
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 10 Apr 2012 06:35:34 +0300
parents 17d9dc2edc91
children 4c62be57fc1a
line diff
     1.1 --- a/src/ui.cc	Tue Apr 10 06:11:16 2012 +0300
     1.2 +++ b/src/ui.cc	Tue Apr 10 06:35:34 2012 +0300
     1.3 @@ -14,6 +14,12 @@
     1.4  	glview = new GLView;
     1.5  	setCentralWidget(glview);
     1.6  
     1.7 +	// side-window
     1.8 +	sidewin = new SideWindow;
     1.9 +	sidewin->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
    1.10 +	sidewin->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
    1.11 +	addDockWidget(Qt::LeftDockWidgetArea, sidewin);
    1.12 +
    1.13  	// actions
    1.14  	QAction *act_open = new QAction(qApp->style()->standardIcon(QStyle::SP_DialogOpenButton), "&Open...", this);
    1.15  	act_open->setStatusTip("Open a volume dataset");
    1.16 @@ -53,6 +59,12 @@
    1.17  	}
    1.18  }
    1.19  
    1.20 +
    1.21 +SideWindow::SideWindow()
    1.22 +{
    1.23 +}
    1.24 +
    1.25 +
    1.26  void post_redisplay()
    1.27  {
    1.28  	glview->updateGL();
    1.29 @@ -79,7 +91,6 @@
    1.30  	if(!volray_init()) {
    1.31  		exit(0);
    1.32  	}
    1.33 -	glClearColor(1, 0, 0, 1);
    1.34  }
    1.35  
    1.36  void GLView::resizeGL(int xsz, int ysz)