Revize fd159c79
Přidáno uživatelem Martin Forejt před téměř 4 roky(ů)
aswi2021vochomurka/view/about.py | ||
---|---|---|
1 |
from PyQt5.QtWidgets import QDialog |
|
2 |
|
|
3 |
|
|
4 |
class AboutDialog(QDialog): |
|
5 |
def __init__(self): |
|
6 |
super(AboutDialog, self).__init__() |
|
7 |
|
|
8 |
self.setWindowTitle("About") |
aswi2021vochomurka/view/help.py | ||
---|---|---|
1 |
from PyQt5.QtWidgets import QDialog |
|
2 |
|
|
3 |
|
|
4 |
class HelpDialog(QDialog): |
|
5 |
def __init__(self): |
|
6 |
super(HelpDialog, self).__init__() |
|
7 |
|
|
8 |
self.setWindowTitle("Help") |
aswi2021vochomurka/view/main_view.py | ||
---|---|---|
102 | 102 |
menuBar = QMenuBar(self) |
103 | 103 |
settingsAction = QAction("&Settings", self) |
104 | 104 |
settingsAction.triggered.connect(self.settings) |
105 |
helpAction = QAction("&Help", self) |
|
106 |
helpAction.triggered.connect(self.help) |
|
107 |
aboutAction = QAction("&About", self) |
|
108 |
aboutAction.triggered.connect(self.about) |
|
109 | 105 |
menuBar.addAction(settingsAction) |
110 |
menuBar.addAction(helpAction) |
|
111 |
menuBar.addAction(aboutAction) |
|
112 | 106 |
self.setMenuBar(menuBar) |
113 | 107 |
|
114 | 108 |
def plot(self, message: Message): |
... | ... | |
138 | 132 |
if dialog.exec_(): |
139 | 133 |
self.reconnect() |
140 | 134 |
|
141 |
def help(self): |
|
142 |
dialog = HelpDialog() |
|
143 |
dialog.exec_() |
|
144 |
pass |
|
145 |
|
|
146 |
def about(self): |
|
147 |
dialog = AboutDialog() |
|
148 |
dialog.exec_() |
|
149 |
|
|
150 | 135 |
def disconnect(self): |
151 | 136 |
self.worker.stop() |
152 | 137 |
self.workerThread.quit() |
Také k dispozici: Unified diff
Re: #8921 - refactoring