示例#1
0
class MainApplication(object):
    """
    This object is the main application object for the framework.
    """

    def __init__(self):
        self._size = QtCore.QSize(600, 400)
        self._pos = QtCore.QPoint(100, 150)
        self._pluginManager = PluginManager()
        self._workflowManager = WorkflowManager()
        self._undoManager = UndoManager()
        self._threadCommandManager = ThreadCommandManager()

    def setSize(self, size):
        self._size = size

    def size(self):
        return self._size

    def setPos(self, pos):
        self._pos = pos

    def pos(self):
        return self._pos

    def undoManager(self):
        return self._undoManager

    def workflowManager(self):
        return self._workflowManager

    def pluginManager(self):
        return self._pluginManager

    def threadCommandManager(self):
        return self._threadCommandManager

    def writeSettings(self):
        settings = QtCore.QSettings()
        settings.beginGroup("MainWindow")
        settings.setValue("size", self._size)
        settings.setValue("pos", self._pos)
        settings.endGroup()
        self._pluginManager.writeSettings(settings)
        self._workflowManager.writeSettings(settings)

    def readSettings(self):
        settings = QtCore.QSettings()
        settings.beginGroup("MainWindow")
        self._size = settings.value("size", self._size)
        self._pos = settings.value("pos", self._pos)
        settings.endGroup()
        self._pluginManager.readSettings(settings)
        self._workflowManager.readSettings(settings)
示例#2
0
 def __init__(self):
     self._size = QtCore.QSize(600, 400)
     self._pos = QtCore.QPoint(100, 150)
     self._pluginManager = PluginManager()
     self._workflowManager = WorkflowManager()
     self._undoManager = UndoManager()
     self._threadCommandManager = ThreadCommandManager()