1#!/usr/bin/env python 2# -*- coding: utf-8 -*- 3# 4# Copyright 2017, Data61 5# Commonwealth Scientific and Industrial Research Organisation (CSIRO) 6# ABN 41 687 119 230. 7# 8# This software may be distributed and modified according to the terms of 9# the BSD 2-Clause license. Note that NO WARRANTY is provided. 10# See "LICENSE_BSD2.txt" for details. 11# 12# @TAG(DATA61_BSD) 13 14import sys, os 15 16sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../')) 17sys.path.append(os.path.dirname(os.path.abspath(__file__))) 18 19from PyQt5 import QtWidgets, QtGui 20 21from Controller.graph_controller import GraphController 22 23def main(argv, out, err): 24 ''' 25 This is the main function for the program. It allows the user to start the module by going "python visualCAmkES" 26 27 :param argv: sys.argv - Arguments to the function. 28 :param out: sys.stdout - Unused 29 :param err: sys.stderr - Unused 30 :return 31 ''' 32 33 # Create a Qt app, set the name and window icon. 34 app = QtWidgets.QApplication(argv) 35 app.setApplicationName("VisualCAmkES") 36 app.setWindowIcon(QtGui.QIcon(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'Assests/VisualCAmkES.png'))) 37 38 # A good place to do any argument parsing. 39 40 # Create a GraphController and start the application 41 new_controller = GraphController() 42 new_controller.show() 43 44 app.exec_() 45 46if __name__ == '__main__': 47 sys.exit(main(sys.argv, sys.stdout, sys.stderr)) 48