aboutsummaryrefslogtreecommitdiffstats
path: root/Lib/defconQt/__main__.py
blob: e583e5ad97512b35269c44e2c048aaf9217b9830 (plain)
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
from defconQt.objects.defcon import TFont
from defconQt import representationFactories
from defconQt import icons_db  # noqa
from defconQt.fontView import Application, MainWindow
import sys
import os
from PyQt5.QtGui import QIcon

if len(sys.argv) > 1:
    font = TFont(os.path.abspath(sys.argv[1]))
else:
    font = None

# from pycallgraph import PyCallGraph
# from pycallgraph.output import GraphvizOutput
representationFactories.registerAllFactories()
# with PyCallGraph(output=GraphvizOutput()):
app = Application(sys.argv)
# TODO: http://stackoverflow.com/a/21330349/2037879
app.setOrganizationName("A. Tétar & Co.")
app.setApplicationName("TruFont")
app.setWindowIcon(QIcon(":/resources/app.png"))
window = MainWindow(font)
window.show()
sys.exit(app.exec_())