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 "../../include/Visualization/oiViewerMainWindow.h"
15#include <QMenu>
16#include <QMenuBar>
17
18namespace oILAB {
19
21 : /* init */ viewerCount(0)
22 /* init */,
23 tabWidget(new QTabWidget(this))
24 /* init */,
25 newViewerAction(new QAction(tr("&New"), this)) {
26 resize(1920, 1080);
27
28 QMenu *viewertMenu = menuBar()->addMenu(tr("&Viewer"));
29 viewertMenu->addAction(newViewerAction);
30 connect(newViewerAction, &QAction::triggered, this,
32
33 setCentralWidget(tabWidget);
34 }
35
37 {
38 try
39 {
40 tabWidget->addTab(new oiViewerVTKwidget(this), tr(std::string("Viewer "+std::to_string(viewerCount)).c_str()));
42 }
43 catch(const std::exception& e)
44 {
45 std::cout<<e.what()<<std::endl;
46 }
47 }
48
49 } // namespace oILAB
50#endif
51
52
53
54
55
56
57