add option to restart the LAMMPS instance to "Run" menu
This commit is contained in:
BIN
tools/lammps-gui/icons/system-restart.png
Normal file
BIN
tools/lammps-gui/icons/system-restart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@ -212,6 +212,7 @@ LammpsGui::LammpsGui(QWidget *parent, const QString &filename) :
|
|||||||
connect(ui->actionRun_Buffer, &QAction::triggered, this, &LammpsGui::run_buffer);
|
connect(ui->actionRun_Buffer, &QAction::triggered, this, &LammpsGui::run_buffer);
|
||||||
connect(ui->actionRun_File, &QAction::triggered, this, &LammpsGui::run_file);
|
connect(ui->actionRun_File, &QAction::triggered, this, &LammpsGui::run_file);
|
||||||
connect(ui->actionStop_LAMMPS, &QAction::triggered, this, &LammpsGui::stop_run);
|
connect(ui->actionStop_LAMMPS, &QAction::triggered, this, &LammpsGui::stop_run);
|
||||||
|
connect(ui->actionRestart_LAMMPS, &QAction::triggered, this, &LammpsGui::restart_lammps);
|
||||||
connect(ui->actionSet_Variables, &QAction::triggered, this, &LammpsGui::edit_variables);
|
connect(ui->actionSet_Variables, &QAction::triggered, this, &LammpsGui::edit_variables);
|
||||||
connect(ui->actionImage, &QAction::triggered, this, &LammpsGui::render_image);
|
connect(ui->actionImage, &QAction::triggered, this, &LammpsGui::render_image);
|
||||||
connect(ui->actionLAMMPS_Tutorial, &QAction::triggered, this, &LammpsGui::tutorial_web);
|
connect(ui->actionLAMMPS_Tutorial, &QAction::triggered, this, &LammpsGui::tutorial_web);
|
||||||
|
|||||||
@ -111,6 +111,7 @@ private slots:
|
|||||||
void findandreplace();
|
void findandreplace();
|
||||||
void run_buffer() { do_run(true); }
|
void run_buffer() { do_run(true); }
|
||||||
void run_file() { do_run(false); }
|
void run_file() { do_run(false); }
|
||||||
|
void restart_lammps() { lammps.close(); };
|
||||||
|
|
||||||
void edit_variables();
|
void edit_variables();
|
||||||
void render_image();
|
void render_image();
|
||||||
@ -183,6 +184,7 @@ class TutorialWizard : public QWizard {
|
|||||||
public:
|
public:
|
||||||
TutorialWizard(int ntutorial, QWidget *parent = nullptr);
|
TutorialWizard(int ntutorial, QWidget *parent = nullptr);
|
||||||
void accept() override;
|
void accept() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _ntutorial;
|
int _ntutorial;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -67,6 +67,7 @@
|
|||||||
<file>icons/search.png</file>
|
<file>icons/search.png</file>
|
||||||
<file>icons/system-box.png</file>
|
<file>icons/system-box.png</file>
|
||||||
<file>icons/system-help.png</file>
|
<file>icons/system-help.png</file>
|
||||||
|
<file>icons/system-restart.png</file>
|
||||||
<file>icons/system-run.png</file>
|
<file>icons/system-run.png</file>
|
||||||
<file>icons/trash.png</file>
|
<file>icons/trash.png</file>
|
||||||
<file>icons/tutorial-logo.png</file>
|
<file>icons/tutorial-logo.png</file>
|
||||||
|
|||||||
@ -74,6 +74,7 @@
|
|||||||
<addaction name="actionRun_Buffer"/>
|
<addaction name="actionRun_Buffer"/>
|
||||||
<addaction name="actionRun_File"/>
|
<addaction name="actionRun_File"/>
|
||||||
<addaction name="actionStop_LAMMPS"/>
|
<addaction name="actionStop_LAMMPS"/>
|
||||||
|
<addaction name="actionRestart_LAMMPS"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionSet_Variables"/>
|
<addaction name="actionSet_Variables"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@ -270,7 +271,7 @@
|
|||||||
<iconset theme=":/icons/run-file.png"/>
|
<iconset theme=":/icons/run-file.png"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Run LAMMPS from File</string>
|
<string>Run LAMMPS from &File</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Ctrl+Shift+Return</string>
|
<string>Ctrl+Shift+Return</string>
|
||||||
@ -287,6 +288,14 @@
|
|||||||
<string>Ctrl+/</string>
|
<string>Ctrl+/</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionRestart_LAMMPS">
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme=":/icons/system-restart.png"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Restart &LAMMPS</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionImage">
|
<action name="actionImage">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme=":/icons/emblem-photos.png"/>
|
<iconset theme=":/icons/emblem-photos.png"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user