From cadc45d41d53d6ecb660494f65b7f691938bb272 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 31 Jul 2023 01:01:00 -0400 Subject: [PATCH] implement quick help dialog --- tools/lammps-gui/TODO.md | 3 +-- tools/lammps-gui/lammpsgui.cpp | 38 +++++++++++++++++++++++++++++++--- tools/lammps-gui/lammpsgui.ui | 4 ++-- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/tools/lammps-gui/TODO.md b/tools/lammps-gui/TODO.md index ea6321c136..3b1087db26 100644 --- a/tools/lammps-gui/TODO.md +++ b/tools/lammps-gui/TODO.md @@ -2,10 +2,9 @@ LAMMPS-GUI TODO list: # Short term goals -- add "Help" entry to menu bar. Should open a popup window with a one page description of how to use it. Use HTML or Markdown text. - add CTRL-q hotkey to log windows so you can exit the entire application (add do you really want to? dialog to this) - add "syntax check" with enabled "-skiprun" flag -- add settings dialog where certain properties can be set through customizing the LAMMPS command line +- add multi-tab settings dialog where certain properties can be set through customizing the LAMMPS command line + enable/disable OpenMP (via suffix), OPT package, select number of OpenMP threads + toggle whether captured screen output should include input file echo + select Font diff --git a/tools/lammps-gui/lammpsgui.cpp b/tools/lammps-gui/lammpsgui.cpp index 8a4339671d..91d82f0efe 100644 --- a/tools/lammps-gui/lammpsgui.cpp +++ b/tools/lammps-gui/lammpsgui.cpp @@ -180,7 +180,6 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) : } else { setWindowTitle(QString("LAMMPS-GUI - *unknown*")); } - } LammpsGui::~LammpsGui() @@ -620,8 +619,41 @@ void LammpsGui::about() void LammpsGui::help() { - QString helpmsg = "This is LAMMPS-GUI version " LAMMPS_GUI_VERSION; - QMessageBox::information(this, "LAMMPS-GUI Help", helpmsg); + QMessageBox::information( + this, "LAMMPS-GUI Quick Help", + "
This is LAMMPS-GUI version " LAMMPS_GUI_VERSION "


" + "Overview" + "
LAMMPS GUI is a graphical text editor that is " + "linked to the LAMMPS library and thus can run LAMMPS directly using " + "the contents of the text buffer as input through the LAMMPS C-library " + "interface. This makes it convenient to use for beginners and during " + "tutorials


" + "Features" + "
The main window of the LAMMPS GUI is a text " + "editor window with syntax highlighting. The output of a LAMMPS run is " + "captured and displayed in a log window. The log window is updated " + "regularly during the run, as is a progress bar in the main window. " + "After the simulation is finished, an image of the simulated system " + "can be created and shown (and saved) in image viewer window. Ongoing " + "runs can be stopped at the next run iteration.

" + "
When opening a file, the editor will determine " + "the directory where the input file resides and switch its current " + "working directory to that same folder. Many LAMMPS inputs contain " + "commands that read other files, typically from the folder as the " + "input file. The GUI will show its current working directory. " + "In addition to using the menu, the editor window also receive files " + "as the first command line argument or via drag-n-drop from a " + "graphical file manager GUI or a desktop environment.

" + "
Almost all commands are accessible via hotkeys. " + "Which those hotkeys are, is shown next to the entries in the menus. " + "Log and image viewer windows can be closed with CTRL-W (or Command-W " + "on macOS).

" + "
The 'About LAMMPS' dialog will show the " + "LAMMPS version and the features included into the LAMMPS library " + "linked to the LAMMPS GUI.

" + "Due to its nature as a graphical application, it is not " + "possible to use the LAMMPS GUI in parallel with MPI, but OpenMP " + "multi-threading is available.
"); } void LammpsGui::manual() diff --git a/tools/lammps-gui/lammpsgui.ui b/tools/lammps-gui/lammpsgui.ui index 9fbdf38446..a307fe2525 100644 --- a/tools/lammps-gui/lammpsgui.ui +++ b/tools/lammps-gui/lammpsgui.ui @@ -311,10 +311,10 @@ .. - &Help + Quick &Help - Short Help + Quick Help