MNE-CPP  beta 1.0
viewerwidget.cpp
Go to the documentation of this file.
1 //=============================================================================================================
42 //*************************************************************************************************************
43 //=============================================================================================================
44 // INCLUDES
45 //=============================================================================================================
46 
47 #include "viewerwidget.h"
48 #include "ui_viewerwidget.h"
49 
50 //*************************************************************************************************************
51 //=============================================================================================================
52 // FORWARD DECLARATIONS
53 //=============================================================================================================
54 
55 ViewerWidget::ViewerWidget(QWidget *parent) :
56  QWidget(parent),
57  ui(new Ui::ViewerWidget)
58 {
59  //Ui setup
60  ui->setupUi(this);
61  //QGridLayout is used so the viewer and MdiArea can fit always the size of MainWindow
62  m_gridLayout = new QGridLayout(this);
63  //Multiple Display Area, created inside ViewerWidget
64  m_MdiArea = new QMdiArea(this);
65  m_gridLayout->addWidget(m_MdiArea);
66 
67  //=============================================================================================================
68  //
69  //Pial surface
70  //
71  //A new View3D object is created, in charge of the subwindow and the displaying of the 3D surface
72  m_view3d_pial = new View3D(1);
73  //A new subwindow is created
74  m_MdiArea->addSubWindow(m_view3d_pial);
75  m_view3d_pial->setWindowTitle("Pial surface");
76 
77 
78  //
79  //Inflated surface
80  //
81  //A new View3D object is created, in charge of the subwindow and the displaying of the 3D surface
82  m_view3d_inflated = new View3D(2);
83  //A new subwindow is created
84  m_MdiArea->addSubWindow(m_view3d_inflated);
85  m_view3d_inflated->setWindowTitle("Inflated surface");
86 
87 
88 // //
89 // //Original surface
90 // //
91 // //A new View3D object is created, in charge of the subwindow and the displaying of the 3D surface
92 // m_view3d_original = new View3D(3);
93 // //A new subwindow is created
94 // m_MdiArea->addSubWindow(m_view3d_original);
95 // m_view3d_original->setWindowTitle("Original surface");
96 
97  //
98  //White matter
99  //
100  //A new View3D object is created, in charge of the subwindow and the displaying of the 3D surface
101  m_vie3d_white = new View3D(4);
102  //A new subwindow is created
103  m_MdiArea->addSubWindow(m_vie3d_white);
104  m_vie3d_white->setWindowTitle("White matter");
105 
106  //Cascade subwindows
107  this->m_MdiArea->cascadeSubWindows();
108 }
109 
110 //*************************************************************************************************************
111 
112 void ViewerWidget::CascadeSubWindows()
113 {
114  //Arrange subwindows in a Tile mode //Arrange subwindows in a Tile mode
115  this->m_MdiArea->cascadeSubWindows();
116 }
117 
118 //*************************************************************************************************************
119 
120 void ViewerWidget::TileSubWindows()
121 {
122  //Arrange subwindows in a Tile mode
123  this->m_MdiArea->tileSubWindows();
124 }
125 
126 //*************************************************************************************************************
127 
128 void ViewerWidget::ReloadSurfaces()
129 {
130 // //Not working at the time
131 // m_MdiArea->addSubWindow(m_view3d_pial);
132 // m_view3d_pial->setWindowTitle("Pial surface");
133 // m_MdiArea->addSubWindow(m_view3d_inflated);
134 // m_view3d_inflated->setWindowTitle("Inflated surface");
135 // m_MdiArea->addSubWindow(m_vie3d_white);
136 // m_vie3d_white->setWindowTitle("White matter");
137 
138 }
139 //*************************************************************************************************************
140 
141 ViewerWidget::~ViewerWidget()
142 {
143  delete ui;
144 }
Definition: aboutwindow.h:52
Definition: view3d.h:79