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