oILAB
Loading...
Searching...
No Matches
oiViewerMainWindow.cpp
Go to the documentation of this file.
1
/* This file is part of MODEL, the Mechanics Of Defect Evolution Library.
2
*
3
* Copyright (C) 2011 by Giacomo Po <gpo@ucla.edu>.
4
*
5
* model is distributed without any warranty under the
6
* GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
7
*/
8
9
#ifndef model_oiViewerMainWindow_cpp_
10
#define model_oiViewerMainWindow_cpp_
11
12
#include <iostream>
13
14
#include <
oiViewerMainWindow.h
>
15
#include <QMenu>
16
#include <QMenuBar>
17
18
19
namespace
gbLAB
20
{
21
22
oiViewerMainWindow::oiViewerMainWindow
() :
23
/* init */
viewerCount(0)
24
/* init */
,tabWidget(new QTabWidget(this))
25
/* init */
,newViewerAction(new QAction(tr(
"&New"
), this))
26
{
27
resize(1920, 1080);
28
29
QMenu* viewertMenu=menuBar()->addMenu(tr(
"&Viewer"
));
30
viewertMenu->addAction(
newViewerAction
);
31
connect(
newViewerAction
, &QAction::triggered,
this
, &
oiViewerMainWindow::newViewerTab
);
32
33
setCentralWidget(
tabWidget
);
34
}
35
36
void
oiViewerMainWindow::newViewerTab
()
37
{
38
try
39
{
40
tabWidget
->addTab(
new
oiViewerVTKwidget
(
this
), tr(std::string(
"Viewer "
+std::to_string(
viewerCount
)).c_str()));
41
viewerCount
++;
42
}
43
catch
(
const
std::exception& e)
44
{
45
std::cout<<e.what()<<std::endl;
46
}
47
}
48
49
}
// namespace model
50
#endif
51
52
53
54
55
56
57
gbLAB
Definition
BiCrystal.cpp:13
oiViewerMainWindow.h
gbLAB::oiViewerMainWindow::newViewerAction
QAction * newViewerAction
Definition
oiViewerMainWindow.h:42
gbLAB::oiViewerMainWindow::viewerCount
size_t viewerCount
Definition
oiViewerMainWindow.h:40
gbLAB::oiViewerMainWindow::newViewerTab
void newViewerTab()
Definition
oiViewerMainWindow.cpp:36
gbLAB::oiViewerMainWindow::tabWidget
QTabWidget * tabWidget
Definition
oiViewerMainWindow.h:41
gbLAB::oiViewerMainWindow::oiViewerMainWindow
oiViewerMainWindow()
Definition
oiViewerMainWindow.cpp:22
gbLAB::oiViewerVTKwidget
Definition
oiViewerVTKwidget.h:33
src
Visualization
oiViewerMainWindow.cpp
Generated on Wed Aug 6 2025 23:06:44 for oILAB by
1.9.8