add icons to menu bar

This commit is contained in:
Axel Kohlmeyer
2023-07-26 22:39:09 -04:00
parent f3e54cada1
commit a62d1be3e6
2 changed files with 84 additions and 3 deletions

View File

@ -42,7 +42,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>23</height>
<height>24</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -75,88 +75,166 @@
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionNew">
<property name="icon">
<iconset theme="document-new"/>
</property>
<property name="text">
<string>&amp;New</string>
</property>
<property name="toolTip">
<string>Start a New Input File</string>
</property>
<property name="statusTip">
<string>Start a New Input File</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action>
<action name="actionOpen">
<property name="icon">
<iconset theme="document-open"/>
</property>
<property name="text">
<string>&amp;Open</string>
</property>
<property name="toolTip">
<string>Open an Input File</string>
</property>
<property name="statusTip">
<string>Open an Input File</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
<action name="actionSave">
<property name="icon">
<iconset theme="document-save"/>
</property>
<property name="text">
<string>&amp;Save</string>
</property>
<property name="toolTip">
<string>Save Input File</string>
</property>
<property name="statusTip">
<string>Save Input File</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionSave_As">
<property name="icon">
<iconset theme="document-save-as"/>
</property>
<property name="text">
<string>Save &amp;As</string>
</property>
<property name="toolTip">
<string>Save Input File As...</string>
</property>
<property name="statusTip">
<string>Save Input File As...</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="actionQuit">
<property name="icon">
<iconset theme="application-exit"/>
</property>
<property name="text">
<string>&amp;Quit</string>
</property>
<property name="toolTip">
<string>Quit LAMMPS-GUI</string>
</property>
<property name="statusTip">
<string>Quit LAMMPS-GUI</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
<action name="actionCut">
<property name="icon">
<iconset theme="edit-cut"/>
</property>
<property name="text">
<string>C&amp;ut</string>
</property>
<property name="statusTip">
<string>Cut Selected Text to Clipboard</string>
</property>
<property name="shortcut">
<string>Ctrl+X</string>
</property>
</action>
<action name="actionCopy">
<property name="icon">
<iconset theme="edit-copy"/>
</property>
<property name="text">
<string>&amp;Copy</string>
</property>
<property name="statusTip">
<string>Copy Selected Text to Clipboard</string>
</property>
<property name="shortcut">
<string>Ctrl+C</string>
</property>
</action>
<action name="actionPaste">
<property name="icon">
<iconset theme="edit-paste"/>
</property>
<property name="text">
<string>&amp;Paste</string>
</property>
<property name="statusTip">
<string>Paste Text from Clipboard</string>
</property>
<property name="shortcut">
<string>Ctrl+V</string>
</property>
</action>
<action name="actionUndo">
<property name="icon">
<iconset theme="edit-undo"/>
</property>
<property name="text">
<string>&amp;Undo</string>
</property>
<property name="statusTip">
<string>Undo Edit</string>
</property>
<property name="shortcut">
<string>Ctrl+Z</string>
</property>
</action>
<action name="actionRedo">
<property name="icon">
<iconset theme="edit-redo"/>
</property>
<property name="text">
<string>&amp;Redo</string>
</property>
<property name="statusTip">
<string>Redo Edit</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+Z</string>
</property>
</action>
<action name="actionRun_Buffer">
<property name="text">
<string>&amp;Run</string>
<string>&amp;Run LAMMPS</string>
</property>
<property name="toolTip">
<string>Run LAMMPS with Input</string>
</property>
<property name="shortcut">
<string>Ctrl+Return</string>
@ -166,6 +244,9 @@
<property name="text">
<string>&amp;About</string>
</property>
<property name="toolTip">
<string>About LAMMPS-GUI</string>
</property>
</action>
</widget>
<customwidgets>

View File

@ -36,7 +36,7 @@
#include <fcntl.h>
#include <thread>
StdCapture::StdCapture() : m_capturing(false), m_oldStdOut(0)
StdCapture::StdCapture() : m_oldStdOut(0), m_capturing(false)
{
// make stdout unbuffered so that we don't need to flush the stream
setvbuf(stdout, NULL, _IONBF, 0);