-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjcm.py
executable file
·40 lines (33 loc) · 1.21 KB
/
jcm.py
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
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
import machine_widget
import PyQt4.QtGui as QtGui
import PyQt4.QtCore as QtCore
import sys
import logging
class Main_Window(QtGui.QSplitter):
def __init__(self, parent=None):
super(Main_Window, self).__init__(QtCore.Qt.Horizontal, parent)
# two widgets to allow copying
self.left = machine_widget.Machine_Widget(self)
self.right = machine_widget.Machine_Widget(self)
self.left.copy_from.connect(self.right.copy_to)
self.right.copy_from.connect(self.left.copy_to)
self.addWidget(self.left)
self.addWidget(self.right)
def await_machine_threads(self):
for widget in [self.left, self.right]:
widget.await_threads()
if __name__ == "__main__":
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(filename)s@%(lineno)s: "
"%(message)s",
level=logging.DEBUG)
app = QtGui.QApplication(sys.argv)
window = Main_Window()
size = window.size()
size.setHeight(800)
window.resize(size)
app.lastWindowClosed.connect(window.await_machine_threads)
window.setWindowTitle("Jive5ab Copy Manager")
window.show()
sys.exit(app.exec_())