g4display
Loading...
Searching...
No Matches
g4display.cc
Go to the documentation of this file.
1// g4display.cc
2//
3// Implementation of the G4Display main widget.
4// Doxygen documentation for public behavior is authoritative in g4display.h (see rule 7).
5
6// gemc
7#include "g4display.h"
8#include "g4display_options.h" // provides G4DISPLAY_LOGGER constant and option definitions
9#include "tabs/g4displayview.h" // control tab
10#include "tabs/g4displayutilities.h" // utilities tab
11
12G4Display::G4Display(const std::shared_ptr<GOptions>& gopt, QWidget* parent)
13 : GBase(gopt, G4DISPLAY_LOGGER),
14 QWidget(parent) {
15 // QTabWidget hosts the visualization control panels.
16 auto dialogTabs = new QTabWidget;
17
18 // View tab: camera/light/slice/view flags.
19 dialogTabs->addTab(new G4DisplayView(gopt, log, this), tr("View"));
20
21 // Utilities tab: scene decoration and text tools.
22 auto* utilitiesTab = new G4DisplayUtilities(gopt, log, this);
23 dialogTabs->addTab(utilitiesTab, tr("Utilities"));
24
25 // Lay out the tab widget as the main content of this widget.
26 auto* mainLayout = new QVBoxLayout;
27 mainLayout->setContentsMargins(0, 0, 0, 0);
28 mainLayout->setSpacing(0);
29 mainLayout->addWidget(dialogTabs);
30 setLayout(mainLayout);
31
32 log->debug(NORMAL, SFUNCTION_NAME, "View and Utilities tabs added.");
33}
“Utilities” tab for G4Display.
“View” tab for G4Display.
G4Display(const std::shared_ptr< GOptions > &gopt, QWidget *parent=nullptr)
Construct the main display widget.
Definition g4display.cc:12
std::shared_ptr< GLogger > log
void debug(debug_type type, Args &&... args) const
Declaration of the G4Display main widget.
Option structures and helpers for g4display configuration.
constexpr const char * G4DISPLAY_LOGGER
Declaration of the G4DisplayUtilities widget.
Declaration of the G4DisplayView tab widget.
#define SFUNCTION_NAME
NORMAL