Skip to content

Commit

Permalink
added a help menu to pyqt_menu.py
Browse files Browse the repository at this point in the history
  • Loading branch information
anh committed Aug 18, 2023
1 parent f9ed915 commit e359142
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion pyqt_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def __init__(self):
super().__init__()

self.radio_groups = []
self.windows = []

page_layout = qw.QVBoxLayout()
radio_layout = qw.QHBoxLayout()
Expand Down Expand Up @@ -175,11 +176,30 @@ def launch(self):
print(e)

def help(self):
pass
w = HelpWindow()
self.windows.append(w)
w.show()

def quit(self):
self.close()

class HelpWindow(qw.QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle('Help')
self.main_layout = qw.QVBoxLayout()
self.add_label('Athena Version:', '\tThe version of Athena (must match the version of the executable) to be used')
self.add_label('Athena Executable:', '\tEither the path or the name of the Athena executable. If only a name is given, then it is assumed that the executable is in /usr/bin.')
self.add_label('Selecting Problems:', '\tA problem can either be selected from the list of predefined problems or a custom problem can be chosen. Use the radio buttons to choose which method to use.')
self.setLayout(self.main_layout)

def add_label(self, s1, s2):
txt = qw.QLabel(s1)
txt.setStyleSheet('font-weight: bold')
self.main_layout.addWidget(txt)
self.main_layout.addWidget(qw.QLabel(s2))


app = qw.QApplication(argv)

main = MainWindow()
Expand Down

0 comments on commit e359142

Please sign in to comment.