Example #1
0
    def __init__(self):
        '''
        Constructor
        '''
        super(AppMainWindow, self).__init__()
        print "STM32 GCC-ARM IDE started..."
        print SPLASH_NOTICE

        if False:  # todo: set to True if building stand-alone package (cx_Freeze)
            setpath = os.path.dirname(os.path.realpath(__file__))
            if os.name == 'nt':
                os.chdir(setpath[:setpath.rfind('\\')])
            else:
                os.chdir(setpath[:setpath.rfind('/')])

        self.aboutDlg = AboutDialog(self)
        self.aboutDlg.show()

        self.setWindowTitle("STM32 GCC-ARM IDE")
        self.setWindowIcon(QtGui.QIcon('images/app.png'))
        self.setMinimumSize(300, 400)

        self.Editor = MultipleCppEditor(self)
        self.setCentralWidget(self.Editor)

        self.OutLineView = self.Editor.getOutLineView()
        self.OutLineView.setObjectName("OutLineView")
        self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, self.OutLineView)

        self.Compiler = GccCompilerThread(self)
        self.pollCompilerTimerID = None

        self.serialPortName = None
        self.serialPortLabel = QtGui.QLabel(
            '<font color=red><i>(select port)</i></font>')
        self.SerialPortMonitorDialog = SerialPortMonitor(self)

        self.flashLoader = FlashLoaderThread(self)
        self.pollLoaderTimerID = None

        self.Configs = IdeConfig(self)

        self.createLogWindow()
        self.createActions()
        self.createToolBars()
        self.createStatusBar()

        self.Configs.restoreIdeSettings()
        self.createMenus()

        self.aboutDlg.finish(self)
        print "IDE ready."