diff options
| author | Adrien Tétar | 2015-09-17 21:48:34 +0200 | 
|---|---|---|
| committer | Adrien Tétar | 2015-09-18 15:24:15 +0200 | 
| commit | 748bb567eef19dcd8e067934786950c5866dc580 (patch) | |
| tree | e49d296009472b902bf18d265dfebac103d4ac56 /Lib/defconQt/__main__.py | |
| parent | 35dd3057c86e02a0c07f7fed20771b3e9d43eb9c (diff) | |
| download | trufont-748bb567eef19dcd8e067934786950c5866dc580.tar.bz2 | |
meta: cleanup past experiments and set up a proper package structure
Diffstat (limited to 'Lib/defconQt/__main__.py')
| -rw-r--r-- | Lib/defconQt/__main__.py | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/Lib/defconQt/__main__.py b/Lib/defconQt/__main__.py new file mode 100644 index 0000000..babcc73 --- /dev/null +++ b/Lib/defconQt/__main__.py @@ -0,0 +1,26 @@ +from defcon import Font +from defconQt.fontView import MainWindow +import sys + +from PyQt5.QtGui import QIcon +from PyQt5.QtWidgets import QApplication + +if len(sys.argv) < 2: +    ufoFile = "C:\\CharterNova-Regular.ufo" +#    print('Usage: %s INPUTFILE' % sys.argv[0]) +#    sys.exit(1) +else: +     ufoFile = sys.argv[1] + +#from pycallgraph import PyCallGraph +#from pycallgraph.output import GraphvizOutput +from defconQt import representationFactories +representationFactories.registerAllFactories() +#with PyCallGraph(output=GraphvizOutput()): +app = QApplication(sys.argv) +# TODO: http://stackoverflow.com/a/21330349/2037879 +app.setWindowIcon(QIcon("resources/icon.png")) +window = MainWindow(Font(ufoFile)) +window.resize(605, 430) +window.show() +sys.exit(app.exec_()) | 
