Esempio n. 1
0
    def __init__(self, parent=None):
        super(QtCore.QObject, self).__init__(parent=parent)
        self.settings = QtCore.QSettings()
        #self.settings.clear()

        self.win = parent
        GlobalOptions.n_recent_files = 10
        self._defaultFlowchartFileName = projectPath('resources/defaultFlowchart.dfc')
        self._defaultLibFileName = projectPath('resources/defaultLibrary.json')
        
        self.initLibrary()
        self.readSettingsOnStart()
Esempio n. 2
0
    def __init__(self, parent=None):
        super(QtCore.QObject, self).__init__(parent=parent)
        self.settings = QtCore.QSettings()
        #self.settings.clear()

        self.win = parent
        GlobalOptions.n_recent_files = 10
        self._defaultFlowchartFileName = projectPath(
            'resources/defaultFlowchart.dfc')
        self._defaultLibFileName = projectPath('resources/defaultLibrary.json')

        self.initLibrary()
        self.readSettingsOnStart()
Esempio n. 3
0
    def __init__(self, app=None):
        super(MainWindow, self).__init__()
        self._unittestmode = False  #set this to True if running a unittest
        self._application = app
        uic.loadUi(projectPath('resources/mainwindow.ui'), self)
        self.uiData = uiData(self)
        self.connectActions()
        self.initUI()
        self.initGlobalShortcuts()

        # everything has been inited. Now do some actions
        # 1) check crash status
        self.uiData.on_crash_LoadBakFile()
Esempio n. 4
0
    def __init__(self, app=None):
        super(MainWindow, self).__init__()
        self._unittestmode = False  #set this to True if running a unittest
        self._application = app
        uic.loadUi(projectPath('resources/mainwindow.ui'), self)
        self.uiData = uiData(self)
        self.connectActions()
        self.initUI()
        self.initGlobalShortcuts()

        # everything has been inited. Now do some actions
        # 1) check crash status
        self.uiData.on_crash_LoadBakFile()
Esempio n. 5
0
    def readXLS(self, path=None):
        ''' Read XLS and return the node'''
        if path is None:
            # now set test_data file
            path = projectPath('../TUTORIALS/test_data.xlsx')

        n = self.fc.createNode('readXLS', pos=(0, 0))
        p = n.ctrlWidget().param  #alias to method
        p('Select File').setValue(path)
        #set some params...
        p('Parameters', 'skiprows').setValue(0)
        p('Parameters', 'skip_footer').setValue(0)
        p('Parameters', 'na_values').setValue(u'---')
        #load data
        p('Load File').activate()
        return n
Esempio n. 6
0
    def readXLS(self, path=None):
        ''' Read XLS and return the node'''
        if path is None:
            # now set test_data file
            path = projectPath('../TUTORIALS/test_data.xlsx')

        n = self.fc.createNode('readXLS', pos=(0, 0))
        p = n.ctrlWidget().param  #alias to method
        p('Select File').setValue(path)
        #set some params...
        p('Parameters', 'skiprows').setValue(0)
        p('Parameters', 'skip_footer').setValue(0)
        p('Parameters', 'na_values').setValue(u'---')
        #load data
        p('Load File').activate()
        return n
Esempio n. 7
0
def main():

    # load logging configuration
    pygwa_logger.setup_logging()
    logger.info('\n|\n|\n|\n|\n|\n...Starting the application...\n')

    app = QtWidgets.QApplication(sys.argv)
    app.setWindowIcon(QtGui.QIcon(projectPath('resources/icon.gif')))

    # is needed for QSettings
    app.setOrganizationName("pygwa")
    app.setApplicationName("pygwa")

    ex = MainWindow(app=app)
    ex.show()

    sys.exit(app.exec_())
Esempio n. 8
0
def main():

    # load logging configuration
    pygwa_logger.setup_logging()
    logger.info('\n|\n|\n|\n|\n|\n...Starting the application...\n')


    app = QtWidgets.QApplication(sys.argv)
    app.setWindowIcon(QtGui.QIcon(projectPath('resources/icon.gif')))
    
    # is needed for QSettings
    app.setOrganizationName("pygwa")
    app.setApplicationName("pygwa")

    ex = MainWindow(app=app)
    ex.show()

    sys.exit(app.exec_())
Esempio n. 9
0
from PyQt5 import QtWidgets
import lib.common.syntaxPython as syntaxPython
from lib import projectPath

app = QtWidgets.QApplication([])
editor = QtWidgets.QPlainTextEdit()
highlight = syntaxPython.PythonHighlighter(editor.document())
editor.show()

# Load syntax.py into the editor for demo purposes
infile = open(projectPath('../lib/common/syntaxPython.py'), 'r')
editor.setPlainText(infile.read())

app.exec_()
Esempio n. 10
0
from PyQt5 import QtWidgets
import lib.common.syntaxPython as syntaxPython
from lib import projectPath


app = QtWidgets.QApplication([])
editor = QtWidgets.QPlainTextEdit()
highlight = syntaxPython.PythonHighlighter(editor.document())
editor.show()

# Load syntax.py into the editor for demo purposes
infile = open(projectPath('../lib/common/syntaxPython.py'), 'r')
editor.setPlainText(infile.read())

app.exec_()