GEMC  1.8
Geant4 Monte-Carlo Framework
infos.cc
Go to the documentation of this file.
1 // %%%%%%%%%%
2 // Qt headers
3 // %%%%%%%%%%
4 #include <QtGui>
5 #include <QWebView>
6 // windows.h must come before gl.h in windows
7 #ifdef _MSC_VER
8  #include <windows.h>
9 #endif
10 
11 #include <gl.h>
12 
13 // %%%%%%%%%%%%%
14 // gemc headers
15 // %%%%%%%%%%%%%
16 #include "infos.h"
17 #include "docs/about.h"
18 #include "docs/particles_color.h"
19 #include "docs/lund.h"
20 
21 // %%%%%%%%%%%
22 // C++ headers
23 // %%%%%%%%%%%
24 
25 // Notice:
26 // For images, use png format.
27 
28 infos::infos(QWidget *parent, gemc_opts *Opts) : QWidget(parent)
29 {
30  gemcOpt = Opts;
31 
32  QTabWidget* InfoType = new QTabWidget;
33  abouttab = new AboutTab(this, gemcOpt);
34  pcolorstab = new PColorsTab(this, gemcOpt);
35  lundtab = new LUNDTab(this, gemcOpt);
36 
37  InfoType->addTab(abouttab, tr("About"));
38  InfoType->addTab(pcolorstab, tr("Particle Colors"));
39  InfoType->addTab(lundtab, tr("LUND format"));
40 
41  QVBoxLayout *mainLayout = new QVBoxLayout;
42  mainLayout->addWidget(InfoType);
43  setLayout(mainLayout);
44 }
45 
46 
47 
49 {
50  string hd_msg = gemcOpt->args["LOG_MSG"].args ;
51  double VERB = gemcOpt->args["GEO_VERBOSITY"].arg ;
52  if(VERB>2)
53  cout << hd_msg << " Infos Widget Deleted." << endl;
54 
55 }
56 
57 
58 AboutTab::AboutTab(QWidget *parent, gemc_opts *Opts) : QWidget(parent)
59 {
60  QWebView *view = new QWebView(parent);
61  view->setHtml(load_doc());
62 
63  QVBoxLayout *mLayout = new QVBoxLayout;
64  mLayout->addWidget(view);
65  setLayout(mLayout);
66 }
67 
69 {
70  QWebView *view = new QWebView(parent);
71  view->setHtml(load_doc());
72 
73  QVBoxLayout *mLayout = new QVBoxLayout;
74  mLayout->addWidget(view);
75  setLayout(mLayout);
76 }
77 
78 LUNDTab::LUNDTab(QWidget *parent, gemc_opts *Opts) : QWidget(parent)
79 {
80  QWebView *view = new QWebView(parent);
81  view->setHtml(load_doc());
82 
83  QVBoxLayout *mLayout = new QVBoxLayout;
84  mLayout->addWidget(view);
85  setLayout(mLayout);
86 }
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
LUNDTab(QWidget *parent=0, gemc_opts *=0)
Definition: infos.cc:78
Definition: infos.h:50
gemc_opts * gemcOpt
Definition: infos.h:70
Definition: infos.h:31
AboutTab * abouttab
Definition: infos.h:72
QString load_doc()
Definition: about.h:23
~infos()
Definition: infos.cc:48
PColorsTab(QWidget *parent=0, gemc_opts *=0)
Definition: infos.cc:68
LUNDTab * lundtab
Definition: infos.h:74
map< string, opts > args
Options map.
Definition: usage.h:68
QString load_doc()
Definition: lund.h:1
QString load_doc()
PColorsTab * pcolorstab
Definition: infos.h:73
infos(QWidget *parent, gemc_opts *)
Definition: infos.cc:28
AboutTab(QWidget *parent=0, gemc_opts *=0)
Definition: infos.cc:58