Skip to content

Commit 55e754a

Browse files
committed
TR corrections
1 parent 05486bf commit 55e754a

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

pyqt-calculator-tutorial/examples/h_layout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
window = QWidget()
1414
window.setWindowTitle("QHBoxLayout")
1515
layout = QHBoxLayout()
16-
layout.addWidget(QPushButton("Right"))
17-
layout.addWidget(QPushButton("Center"))
1816
layout.addWidget(QPushButton("Left"))
17+
layout.addWidget(QPushButton("Center"))
18+
layout.addWidget(QPushButton("Right"))
1919
window.setLayout(layout)
2020
window.show()
2121
sys.exit(app.exec_())

pyqt-calculator-tutorial/examples/hello.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import sys
66

7-
# 1. Import `QApplication`, and all the required widgets
7+
# 1. Import `QApplication` and all the required widgets
88
from PyQt5.QtWidgets import QApplication
99
from PyQt5.QtWidgets import QWidget
1010
from PyQt5.QtWidgets import QLabel

pyqt-calculator-tutorial/examples/signals_slots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Filename: signals_slots.py
22

3-
"""Signals, and Slots example."""
3+
"""Signals and Slots example."""
44

55
import sys
66

pyqt-calculator-tutorial/pycalc/pycalc.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1111
# SOFTWARE.
1212

13-
"""PyCalc is a simple calculator built using Python, and PyQt5."""
13+
"""PyCalc is a simple calculator built using Python and PyQt5."""
1414

1515
import sys
1616
from functools import partial
1717

18-
# Import QApplication, and the required widgets from PyQt5.QtWidgets
18+
# Import QApplication and the required widgets from PyQt5.QtWidgets
1919
from PyQt5.QtWidgets import QApplication
2020
from PyQt5.QtWidgets import QMainWindow
2121
from PyQt5.QtWidgets import QWidget
@@ -41,12 +41,12 @@ def __init__(self):
4141
# Set some main window's properties
4242
self.setWindowTitle("PyCalc")
4343
self.setFixedSize(235, 235)
44-
# Create, and set the central widget, and the general layout
44+
# Create and set the central widget and the general layout
4545
self.generalLayout = QVBoxLayout()
4646
self._centralWidget = QWidget(self)
4747
self.setCentralWidget(self._centralWidget)
4848
self._centralWidget.setLayout(self.generalLayout)
49-
# Create the display, and the buttons
49+
# Create the display and the buttons
5050
self._createDisplay()
5151
self._createButtons()
5252

@@ -88,7 +88,7 @@ def _createButtons(self):
8888
"+": (3, 3),
8989
"=": (3, 4),
9090
}
91-
# Create the buttons, and add them to the grid layout
91+
# Create the buttons and add them to the grid layout
9292
for btn_text, pos in buttons.items():
9393
self.buttons[btn_text] = QPushButton(btn_text)
9494
self.buttons[btn_text].setFixedSize(40, 40)
@@ -121,15 +121,15 @@ def evaluateExpression(expression):
121121
return result
122122

123123

124-
# Create a Controller class to connect the GUI, and the model
124+
# Create a Controller class to connect the GUI and the model
125125
class PyCalcCtrl:
126126
"""PyCalc's Controller."""
127127

128128
def __init__(self, model, view):
129129
"""Controller initializer."""
130130
self._evaluate = model
131131
self._view = view
132-
# Connect signals, and slots
132+
# Connect signals and slots
133133
self._connectSignals()
134134

135135
def _calculateResult(self):
@@ -146,7 +146,7 @@ def _buildExpression(self, sub_exp):
146146
self._view.setDisplayText(expression)
147147

148148
def _connectSignals(self):
149-
"""Connect signals, and slots."""
149+
"""Connect signals and slots."""
150150
for btn_text, btn in self._view.buttons.items():
151151
if btn_text not in {"=", "C"}:
152152
btn.clicked.connect(partial(self._buildExpression, btn_text))
@@ -164,7 +164,7 @@ def main():
164164
# Show the calculator's GUI
165165
view = PyCalcUi()
166166
view.show()
167-
# Create an instance of the model, and the controller
167+
# Create an instance of the model and the controller
168168
model = evaluateExpression
169169
PyCalcCtrl(model=model, view=view)
170170
# Execute calculator's main loop

0 commit comments

Comments
 (0)