-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
136 lines (110 loc) · 14.4 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import sys
sys.path.append('.')
sys.path.append('lib/')
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtGui import QIcon
from time import sleep as delay
import base64
import libQemu
qemu = libQemu.Qemu()
class loadingPage(QWidget):
#loading gif widget/page
def __init__(self):
super().__init__()
self.setWindowFlags(Qt.FramelessWindowHint) #| Qt.WindowStaysOnTopHint | Qt.SplashScreen)
self.setAttribute(Qt.WA_TranslucentBackground, True) #100% transparent
self.setStyleSheet( """
color: rgba(237,174,28,100%);
background-color: #181B1D;
padding: 55px;
text-align: center;
border-radius: 15px;
padding: 0px;
""")
self.label = QLabel()
self.vbox = QVBoxLayout()
self.vbox.addWidget(self.label)
self.vbox.setAlignment(Qt.AlignCenter)
self.setLayout(self.vbox)
self.gif = QMovie('loader.gif')
self.gif.setScaledSize(QSize().scaled(300, 300, Qt.KeepAspectRatio))
self.label.setMovie(self.gif)
self.gif.start()
class App(QWidget):
#main GUI class
def __init__(self):
super().__init__()
self.loadingPage = loadingPage()
self.title = 'Open Image'
self.width = 640#280
self.height = 480#80
self.left = 100
self.top = 100
self.statusbar = QStatusBar()
#self.setStatusBar(self.statusBar)
self.progressBar = QProgressBar(self)
self.statusbar.addWidget(self.progressBar)
self.loader()
self.frontCheckDep()
self.initUI()
exit()
def Handle_Progress(self, blocknum, blocksize, totalsize):
## calculate the progress
readed_data = blocknum * blocksize
if totalsize > 0:
download_percentage = readed_data * 100 / totalsize
self.progressBar.setValue(download_percentage)
QApplication.processEvents()
def frontCheckDep(self):
if not qemu.checkDep():
reply = QMessageBox.question(self, 'Qemu Not Found', 'Do you want to install it?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
if reply == QMessageBox.Yes:
self.loadingPage.show()
if not qemu.install(self.Handle_Progress):
exit()
self.loadingPage.hide()
else:
exit()
def loader(self):
#splashscreen. Stored in b64, converted to PNG.
b64_data = '''iVBORw0KGgoAAAANSUhEUgAAAIIAAACCCAMAAAC93eDPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAK4UExURUdwTMRHTKkqQeh6dtJfbP95Z9xFQqcUKagWM6ocNrEmPudpaa0oP/mAbfx9acFEV1cmMOtcVPyQgfJxWvOCb+VWUbwzS/R3X+RMS1tKULsxSftxZYYfMdUoNdYqM9AiNNQlNtEkM9cpN9QmMdAiNtUnNOAwNtgrNN0vNs0gN+U4PtwuNNMkNNEkNc0iNNgsNtwtONEeOOQzOuAzNtssNawRJ6YRJ+U7NeY3OOEyOc4hMt82O9oyNuE8OKIQJdAjMeQ4O9knMv91U6kULv9uXd02M7ISJe1LReM4N8UfNdQqMNkxO94vOsoiOOA8PtcuND/I/eAsOBwiKL4aK+5PUMAhMus1PdMqOL4aMCwTGakOH/50Wtc2Mdo7OtEnLegtNsUaL8EiKrEWLscgKM4rNvRMR9grP+RJSfdTUR0cJCYeJKopPrgYK+hLPzkRHOtDSP5kWUnH/NMkPcYmPJ5BR9hOUEMUGOBbXcU8QedBP7pfX+bW2uVVTs5ANkS898oqLXYtOzAaIPhfT8AxH5cmL/xwTl8eJDy38dEvKrYgM5oKH68xBDa0+jCy7rgqQSKQ4tI7QiCE0/i+BTu/+tDo+1DO/BodFx4mLbI2NM/h6iqb7v65E+M6RjKm9J0oOYwzQTAjKNOUld7g7MHm/v+pPbNBRUoeInUkK2De/6PZ+r3f8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hyV0s/Gpqj0KCJM32i3ZGnOMCh5BnQdwKCpxakUokqRJG5IZg1TGGh7mgU1kqFLkWf+cvp1YNYq6yVemop6FHsa6XkeGeUoTKonW2vIqKVKY8C5qCNYaFe8tkq8EXXXCswogR+irvgpgj0FXZKjAeVrl+OLV8cDCPMYAijA6BIfCNAA/ChANiu6tUulb6tj0rvEpU1fgqOp7QHfFdG50TgUJ6tAVXRVFFnk2y3P0HbI/nVVBHwp5sdPEtgU6RyLtAbUG9JNHOCz90iGZ/dvaLh0SkiziKSEHDdGG6tW4I1CpUnzMj6FR5gxa3ZmADU4FGzMsr07GNvHriGle6DaOwCMy9CD+44F6Ig6Kt1YHAwwWGQJMjSw9EYEvNVShWev6UcNUyCToITuEE8dkkWpCzN+mENYkuDr6P8YqmB+0R7SbWt5Ba7WElJRjEuZZli71/ULn48dzBQYUNgxqVueUQLKA2ncDAjWodP7q5gLSoixbCu4XlhhijjeZsxQrVAJKIJHfZqrk/K101KEGnLCqrUnF1scoS+QN2KiPRW3ausM3s2BK51Z7o6Y/TRVW0agD5IDUvd8tiXz+uXemvGJTQdzrK8NUplWCql+UPEW0JhjBhOYxfKbQPxk1VFeaFwUFJqv/KeX5ov3xw2aClwlJBQ16lasXXyOz2VrtTODrOl0S37sAKF6fVyexsRE50SPR1EBsllYpUxeDy+X9+v+r3g8i7FguXe1Lx1SsbfvdSxs1JJMxR82ng4R9Q4ky12SoUg6n+qx72c/PHFmPOys3NBQimT24WEIR1bC5I9SFK07ywDVvlsV1uKpfRLamD/osX/B8IlizHxClxCSicJN6qUFB5mCRuOwHSMqhY/mj/98Bjq5b70xCVDHrW50RiTxUKtyV654tSggkZV0yYlyWP+/svX/Uj/gsG0WMrVy5e/Pzy5f7+y5Y97pTb20cWIv/2+cWLV66cL/z/A1y6AHxGiCVzAAAAAElFTkSuQmCC'''
pm = QPixmap()
pm.loadFromData(base64.b64decode(b64_data), 'png')
self.splash = QSplashScreen(pm)
self.splash.show()
QTimer.singleShot(2000, self.splash.close)
delay(2)
def initUI(self):
self.setWindowTitle(self.title)
self.setGeometry(self.left, self.top, self.width, self.height)
qemu.run(self.openFileNameDialog())
#self.openFileNamesDialog()
#self.saveFileDialog()
self.show()
def openFileNameDialog(self):
#Open File Dialog. Self explanatory
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
fileName, _ = QFileDialog.getOpenFileName(self,"QFileDialog.getOpenFileName()", "","PokePi Image (*.pimg);; All Files (*.*)", options=options)
if fileName:
return fileName
else:
exit()
def openFileNamesDialog(self):
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
files, _ = QFileDialog.getOpenFileNames(self,"QFileDialog.getOpenFileNames()", "","All Files (*);;Python Files (*.py)", options=options)
if files:
print(files)
def saveFileDialog(self):
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
fileName, _ = QFileDialog.getSaveFileName(self,"QFileDialog.getSaveFileName()","","All Files (*);;Text Files (*.txt)", options=options)
if fileName:
print(fileName)
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = App()
sys.exit(app.exec_())