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->actionRun_Buffer, &QAction::triggered, this, &LammpsGui::run_buffer);
connect(ui->actionStop_LAMMPS, &QAction::triggered, this, &LammpsGui::stop_run); connect(ui->actionStop_LAMMPS, &QAction::triggered, this, &LammpsGui::stop_run);
connect(ui->actionAbout_LAMMPS_GUI, &QAction::triggered, this, &LammpsGui::about); connect(ui->actionAbout_LAMMPS_GUI, &QAction::triggered, this, &LammpsGui::about);
connect(ui->action_Help, &QAction::triggered, this, &LammpsGui::help);
#if !QT_CONFIG(clipboard) #if !QT_CONFIG(clipboard)
ui->actionCut->setEnabled(false); ui->actionCut->setEnabled(false);
@ -425,6 +426,12 @@ void LammpsGui::about()
msg.exec(); 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() void LammpsGui::start_lammps()
{ {
char *args[] = {(char *)"LAMMPS GUI", (char *)"-log", (char *)"none"}; char *args[] = {(char *)"LAMMPS GUI", (char *)"-log", (char *)"none"};

View File

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

View File

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