-
Notifications
You must be signed in to change notification settings - Fork 0
/
__main__.py
41 lines (33 loc) · 1.27 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
#!/usr/bin/env python3
"""
This file is the entrypoint of the GUI for GraphDonkey.
It launches the MainWindow in maximized modus and sets
all application information.
Author: Randy Paredis
Date: 12/14/2019
"""
import os, sys
from main.extra.IOHandler import IOHandler
depfol = IOHandler.dir_plugins(".dependencies")
if not os.path.isdir(depfol):
os.mkdir(depfol)
sys.path.append(depfol)
from PyQt5 import QtWidgets, QtGui
from main.extra import Constants
from main.MainWindow import MainWindow
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
app.setApplicationName(Constants.APP_NAME)
app.setApplicationVersion(Constants.APP_VERSION)
app.setApplicationDisplayName(
Constants.APP_NAME + " [" + Constants.APP_VERSION_NAME + "] v" + Constants.APP_VERSION)
app.setWindowIcon(Constants.APP_ICON)
# Set the default size in case of error messages and wizards before the preferences were loaded
font = QtGui.QFontDatabase.systemFont(QtGui.QFontDatabase.GeneralFont)
font.setPointSize(11)
QtWidgets.QApplication.instance().setFont(font)
print("LAUNCING APP...")
print("GraphDonkey Version:", Constants.APP_VERSION_NAME, "(" + Constants.APP_VERSION + ")")
mainwindow = MainWindow()
mainwindow.show()
code = app.exec_()