add dummy help menu button

This commit is contained in:
Axel Kohlmeyer
2023-07-27 11:53:23 -04:00
parent f170d8a56d
commit 034b7458bc
3 changed files with 36 additions and 6 deletions

View File

@ -69,6 +69,7 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) :
connect(ui->actionRun_Buffer, &QAction::triggered, this, &LammpsGui::run_buffer);
connect(ui->actionStop_LAMMPS, &QAction::triggered, this, &LammpsGui::stop_run);
connect(ui->actionAbout_LAMMPS_GUI, &QAction::triggered, this, &LammpsGui::about);
connect(ui->action_Help, &QAction::triggered, this, &LammpsGui::help);
#if !QT_CONFIG(clipboard)
ui->actionCut->setEnabled(false);
@ -425,6 +426,12 @@ void LammpsGui::about()
msg.exec();
}
void LammpsGui::help()
{
QString helpmsg = "This is LAMMPS-GUI version " LAMMPS_GUI_VERSION;
QMessageBox::information(this, "LAMMPS-GUI Help", helpmsg);
}
void LammpsGui::start_lammps()
{
char *args[] = {(char *)"LAMMPS GUI", (char *)"-log", (char *)"none"};

View File

@ -61,6 +61,7 @@ private slots:
void run_buffer();
void stop_run();
void about();
void help();
void logupdate();
private:

View File

@ -25,8 +25,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="CodeEditor" name="textEdit" native="true">
</widget>
<widget class="CodeEditor" name="textEdit" native="true"/>
</item>
</layout>
</widget>
@ -70,10 +69,17 @@
<addaction name="actionRun_Buffer"/>
<addaction name="actionStop_LAMMPS"/>
</widget>
<widget class="QMenu" name="menuAbout">
<property name="title">
<string>&amp;About</string>
</property>
<addaction name="actionAbout_LAMMPS_GUI"/>
<addaction name="action_Help"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menu_Run"/>
<addaction name="actionAbout_LAMMPS_GUI"/>
<addaction name="menuAbout"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionNew">
@ -243,7 +249,8 @@
</action>
<action name="actionRun_Buffer">
<property name="icon">
<iconset theme="emblem-default"/>
<iconset theme="emblem-default">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Run LAMMPS</string>
@ -257,7 +264,8 @@
</action>
<action name="actionStop_LAMMPS">
<property name="icon">
<iconset theme="process-stop"/>
<iconset theme="process-stop">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>&amp;Stop LAMMPS</string>
@ -270,13 +278,27 @@
</property>
</action>
<action name="actionAbout_LAMMPS_GUI">
<property name="icon">
<iconset theme="help-about"/>
</property>
<property name="text">
<string>&amp;About</string>
<string>&amp;About LAMMPS-GUI</string>
</property>
<property name="toolTip">
<string>About LAMMPS-GUI</string>
</property>
</action>
<action name="action_Help">
<property name="icon">
<iconset theme="help-faq"/>
</property>
<property name="text">
<string>&amp;Help</string>
</property>
<property name="toolTip">
<string>Short Help</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>