Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
|
#include <G4UIQt.hh>
Public Member Functions | |
G4UIQt (G4int, char **) | |
G4UIsession * | SessionStart () |
void | AddMenu (const char *, const char *) |
void | AddButton (const char *, const char *, const char *) |
void | AddIcon (const char *userLabel, const char *iconFile, const char *command, const char *file_name="") |
void | OutputStyle (const char *, const char *, const char *) |
void | NativeMenu (G4bool aVal) |
void | ClearMenu () |
void | DefaultIcons (G4bool aVal) |
G4bool | AddTabWidget (QWidget *, QString) |
QTabWidget * | GetViewerTabWidget () |
QWidget * | GetSceneTreeWidget () |
QWidget * | GetViewerPropertiesWidget () |
QWidget * | GetPickInfosWidget () |
G4bool | IsSplitterReleased () |
G4bool | IsIconMoveSelected () |
G4bool | IsIconRotateSelected () |
G4bool | IsIconPickSelected () |
G4bool | IsIconZoomInSelected () |
G4bool | IsIconZoomOutSelected () |
void | SetIconMoveSelected () |
void | SetIconRotateSelected () |
void | SetIconPickSelected () |
void | SetIconZoomInSelected () |
void | SetIconZoomOutSelected () |
void | SetIconHLHSRSelected () |
void | SetIconHLRSelected () |
void | SetIconSolidSelected () |
void | SetIconWireframeSelected () |
void | SetIconPerspectiveSelected () |
void | SetIconOrthoSelected () |
QMainWindow * | GetMainWindow () |
QPixmap * | getSearchIcon () |
QPixmap * | getClearIcon () |
void | SetStartPage (const std::string &) |
QWidget * | GetCoutWidget () |
G4UIDockWidget * | GetCoutDockWidget () |
G4UIDockWidget * | GetUserInterfaceWidget () |
QTabWidget * | GetUITabWidget () |
QWidget * | GetHistoryWidget () |
QWidget * | GetHelpWidget () |
G4bool | AddViewerTab (QWidget *w, std::string title) |
G4bool | AddViewerTabFromFile (std::string fileName, std::string title) |
~G4UIQt () | |
void | Prompt (G4String) |
void | SessionTerminate () |
virtual void | PauseSessionStart (const G4String &) |
virtual G4int | ReceiveG4cout (const G4String &) |
virtual G4int | ReceiveG4cerr (const G4String &) |
Public Member Functions inherited from G4VBasicShell | |
G4VBasicShell () | |
virtual | ~G4VBasicShell () |
virtual G4UIsession * | SessionStart ()=0 |
virtual void | PauseSessionStart (const G4String &Prompt)=0 |
Public Member Functions inherited from G4UIsession | |
G4UIsession () | |
G4UIsession (G4int iBatch) | |
~G4UIsession () override | |
virtual G4UIsession * | SessionStart () |
virtual void | PauseSessionStart (const G4String &Prompt) |
G4int | ReceiveG4cout (const G4String &coutString) override |
G4int | ReceiveG4cerr (const G4String &cerrString) override |
G4int | GetLastReturnCode () const |
Public Member Functions inherited from G4coutDestination | |
G4coutDestination ()=default | |
virtual | ~G4coutDestination ()=default |
void | AddCoutTransformer (const Transformer &t) |
void | AddCoutTransformer (Transformer &&t) |
void | AddCerrTransformer (const Transformer &t) |
void | AddCerrTransformer (Transformer &&t) |
virtual void | ResetTransformers () |
virtual G4int | ReceiveG4cout (const G4String &msg) |
virtual G4int | ReceiveG4cerr (const G4String &msg) |
G4int | ReceiveG4cout_ (const G4String &msg) |
G4int | ReceiveG4cerr_ (const G4String &msg) |
Public Member Functions inherited from G4VInteractiveSession | |
G4VInteractiveSession () | |
virtual | ~G4VInteractiveSession () |
virtual void | AddMenu (const char *, const char *) |
virtual void | AddButton (const char *, const char *, const char *) |
virtual void | AddIcon (const char *, const char *, const char *, const char *) |
virtual void | DefaultIcons (bool) |
virtual void | OutputStyle (const char *, const char *, const char *) |
virtual void | NativeMenu (bool) |
virtual void | ClearMenu () |
void | AddInteractor (G4String, G4Interactor) |
G4Interactor | GetInteractor (G4String) |
Additional Inherited Members | |
Public Types inherited from G4coutDestination | |
using | Transformer = std::function< G4bool(G4String &)> |
Static Public Member Functions inherited from G4UIsession | |
static G4int | InSession () |
Protected Member Functions inherited from G4VBasicShell | |
G4String | ModifyToFullPathCommand (const char *aCommandLine) const |
G4String | GetCurrentWorkingDirectory () const |
G4bool | ChangeDirectory (const char *newDir) |
G4UIcommandTree * | FindDirectory (const char *dirName) const |
G4UIcommand * | FindCommand (const char *commandName) const |
G4String | Complete (const G4String &) |
G4String | FindMatchingPath (G4UIcommandTree *, const G4String &) |
virtual void | ExecuteCommand (const G4String &) |
virtual G4bool | GetHelpChoice (G4int &)=0 |
virtual void | ExitHelp () const =0 |
void | ApplyShellCommand (const G4String &, G4bool &, G4bool &) |
void | ShowCurrent (const G4String &) const |
void | ChangeDirectoryCommand (const G4String &) |
void | ListDirectory (const G4String &) const |
void | TerminalHelp (const G4String &) |
Protected Attributes inherited from G4UIsession | |
G4int | ifBatch = 0 |
G4int | lastRC = 0 |
Protected Attributes inherited from G4coutDestination | |
std::vector< Transformer > | transformersCout |
std::vector< Transformer > | transformersCerr |
Static Protected Attributes inherited from G4UIsession | |
static G4ICOMS_DLL G4int | inSession = 0 |
Static Protected Attributes inherited from G4coutDestination | |
static G4MTGLOB_DLL G4coutDestination * | masterG4coutDestination = nullptr |
G4UIQt::G4UIQt | ( | G4int | argc, |
char ** | argv | ||
) |
Build a Qt window with a menubar, output area and promt area
+-----------------------+ |exit menu| | | | | +-------------------+ | | | | | | | Output area | | | | | | | +-------------------+ | | | clear | | | +-------------------+ | | | promt history | | | +-------------------+ | | +-------------------+ | | |> promt area | | | +-------------------+ | +-----------------------+
Definition at line 115 of file G4UIQt.cc.
G4UIQt::~G4UIQt | ( | ) |
Definition at line 274 of file G4UIQt.cc.
|
virtual |
Add a new button to a menu
aMenu | : parent menu |
aLabel | : label to display |
aCommand | : command to execute as a callback |
Reimplemented from G4VInteractiveSession.
Definition at line 2354 of file G4UIQt.cc.
|
virtual |
special case for the "open" icon. It will open a file selector and map the return file to the given command.
Reimplemented from G4VInteractiveSession.
Definition at line 2429 of file G4UIQt.cc.
Referenced by DefaultIcons().
|
virtual |
Add a new menu to the menu bar
aName | name of menu |
aLabel | label to display |
Reimplemented from G4VInteractiveSession.
Definition at line 2333 of file G4UIQt.cc.
G4bool G4UIQt::AddTabWidget | ( | QWidget * | aWidget, |
QString | name | ||
) |
Add a new tab widget. Create the tab if it was not done
Definition at line 1860 of file G4UIQt.cc.
Referenced by G4OpenInventorQtExaminerViewer::afterRealizeHook(), G4OpenGLQtViewer::CreateMainWindow(), G4VtkQtViewer::CreateMainWindow(), G4UIQt(), and G4ToolsSGQtViewer::Initialise().
G4bool G4UIQt::AddViewerTab | ( | QWidget * | aWidget, |
std::string | title | ||
) |
G4bool G4UIQt::AddViewerTabFromFile | ( | std::string | fileName, |
std::string | title | ||
) |
Add a new tab in the viewer
Definition at line 1827 of file G4UIQt.cc.
|
virtual |
Reimplemented from G4VInteractiveSession.
Definition at line 2695 of file G4UIQt.cc.
|
virtual |
Reimplemented from G4VInteractiveSession.
Definition at line 289 of file G4UIQt.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 210 of file G4UIQt.hh.
Referenced by G4ToolsSGQtViewer::Initialise().
QWidget * G4UIQt::GetPickInfosWidget | ( | ) |
QWidget * G4UIQt::GetSceneTreeWidget | ( | ) |
|
inline |
|
inline |
|
inline |
QWidget * G4UIQt::GetViewerPropertiesWidget | ( | ) |
|
inline |
Definition at line 167 of file G4UIQt.hh.
Referenced by G4OpenInventorQtExaminerViewer::afterRealizeHook(), G4OpenGLQtViewer::CreateMainWindow(), and G4OpenGLQtViewer::isCurrentWidget().
|
inline |
Definition at line 182 of file G4UIQt.hh.
Referenced by G4OpenGLQtViewer::G4MouseMoveEvent(), G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::G4MouseReleaseEvent(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
|
inline |
Definition at line 188 of file G4UIQt.hh.
Referenced by G4OpenGLQtViewer::G4MousePressEvent(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
|
inline |
Definition at line 185 of file G4UIQt.hh.
Referenced by G4OpenGLQtViewer::G4MousePressEvent(), G4OpenGLQtViewer::G4MouseReleaseEvent(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
|
inline |
Definition at line 191 of file G4UIQt.hh.
Referenced by G4OpenGLQtViewer::G4MousePressEvent(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
|
inline |
Definition at line 194 of file G4UIQt.hh.
Referenced by G4OpenGLQtViewer::G4MousePressEvent(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
G4bool G4UIQt::IsSplitterReleased | ( | ) |
|
virtual |
Reimplemented from G4VInteractiveSession.
Definition at line 2686 of file G4UIQt.cc.
|
virtual |
Reimplemented from G4VInteractiveSession.
Definition at line 2667 of file G4UIQt.cc.
|
virtual |
Called by intercoms/src/G4UImanager.cc
Called by visualization/management/src/G4VisCommands.cc with "EndOfEvent" argument
It have to pause the session command terminal.
Call SecondaryLoop to wait for exit event
aState |
Implements G4VBasicShell.
Definition at line 2050 of file G4UIQt.cc.
void G4UIQt::Prompt | ( | G4String | aPrompt | ) |
Display the prompt in the prompt area
aPrompt | : string to display as the promt label |
Definition at line 2021 of file G4UIQt.cc.
Referenced by SessionStart().
Receive a cerr from Geant4. We have to display it in the cout zone
aString | : label to add in the display area |
Reimplemented from G4UIsession.
Definition at line 2195 of file G4UIQt.cc.
Referenced by ReceiveG4cout().
Receive a cout from Geant4. We have to display it in the cout zone
aString | : label to add in the display area |
Reimplemented from G4UIsession.
Definition at line 2102 of file G4UIQt.cc.
|
virtual |
Start the Qt main loop
Implements G4VBasicShell.
Definition at line 1967 of file G4UIQt.cc.
void G4UIQt::SessionTerminate | ( | ) |
Definition at line 2032 of file G4UIQt.cc.
void G4UIQt::SetIconHLHSRSelected | ( | ) |
Definition at line 5034 of file G4UIQt.cc.
Referenced by AddIcon(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
void G4UIQt::SetIconHLRSelected | ( | ) |
Definition at line 5009 of file G4UIQt.cc.
Referenced by AddIcon(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
void G4UIQt::SetIconMoveSelected | ( | ) |
Definition at line 4816 of file G4UIQt.cc.
Referenced by AddIcon().
void G4UIQt::SetIconOrthoSelected | ( | ) |
Definition at line 5081 of file G4UIQt.cc.
Referenced by AddIcon(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
void G4UIQt::SetIconPerspectiveSelected | ( | ) |
Definition at line 5059 of file G4UIQt.cc.
Referenced by AddIcon(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
void G4UIQt::SetIconPickSelected | ( | ) |
Definition at line 4868 of file G4UIQt.cc.
Referenced by AddIcon().
void G4UIQt::SetIconRotateSelected | ( | ) |
Definition at line 4842 of file G4UIQt.cc.
Referenced by AddIcon().
void G4UIQt::SetIconSolidSelected | ( | ) |
Definition at line 4961 of file G4UIQt.cc.
Referenced by AddIcon(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
void G4UIQt::SetIconWireframeSelected | ( | ) |
Definition at line 4985 of file G4UIQt.cc.
Referenced by AddIcon(), and G4OpenGLQtViewer::updateToolbarAndMouseContextMenu().
void G4UIQt::SetIconZoomInSelected | ( | ) |
Definition at line 4899 of file G4UIQt.cc.
Referenced by AddIcon().
void G4UIQt::SetIconZoomOutSelected | ( | ) |
Definition at line 4930 of file G4UIQt.cc.
Referenced by AddIcon().
void G4UIQt::SetStartPage | ( | const std::string & | text | ) |
Definition at line 1917 of file G4UIQt.cc.
Referenced by DefaultIcons().