-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScoreBox.py
More file actions
28 lines (27 loc) · 939 Bytes
/
ScoreBox.py
File metadata and controls
28 lines (27 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from fencer import Fencer
from clock import Clock
class MainWindow(QMainWindow):
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.setWindowTitle("Scoring machine")
self.fencerRed = Fencer({"name" : "Red Leftie", "nationality" : "PYT"})
self.fencerGreen = Fencer({"name" : "Green Righty", "nationality" : "CPP"})
self.clock = Clock()
print("got this far")
layotOuter = QVBoxLayout()
layotOuter.addLayout(self.clock.getLayout())
layoutFencers = QHBoxLayout()
layoutFencers.addLayout(self.fencerRed.placeWidgets())
layoutFencers.addLayout(self.fencerGreen.placeWidgets())
widget = QWidget()
layotOuter.addLayout(layoutFencers)
widget.setLayout(layotOuter)
self.setCentralWidget(widget)
app = QApplication([])
window = MainWindow()
window.clock.startClock()
window.show()
app.exec_()