-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
29 lines (26 loc) · 926 Bytes
/
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
import sys
from PySide.QtCore import Qt
from PySide.QtGui import QApplication, QPixmap, QSplashScreen
from dialog.directory_dialog import DirectoryDialog
from indexer.indexer import Indexer
from gui.mainwindow import MainWindow
if __name__ == "__main__":
app = QApplication(sys.argv)
dir = DirectoryDialog()
if dir.exec_() and dir.result() != "" and dir.result() != None:
app.indexer = Indexer(dir.result())
splash_pix = QPixmap('res/SplashScreen.png')
splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
splash.setMask(splash_pix.mask())
splash.show()
app.processEvents()
app.indexer.load_data()
app.doclist = None
app.webview = None
app.currentWord = None
app.mainWindow = MainWindow()
splash.finish(app.mainWindow)
app.mainWindow.show()
sys.exit(app.exec_())
else:
app.quit()