コード例 #1
0
class GuiEditor:
    """There may be only one instance of this class, because of the
    slot declarations (in editorView.py and edit.py). At present there
    is no possibility of closing an editor and reopening it in the same
    process - the other files would need modifying.
    """
    def __init__(self, appString):
        self.app = Application(appString)
        self.settings = self.app.settings

        self.gui = GuiWidget(self.settings, self.app.clipboard())

        # Initialize the colour objects used by the editor
        coloursInit()

        self.app.init(self.gui)

        styleGroup = QtGui.QActionGroup(self.gui)
        styleGroup.addAction(self.gui.ui.action_styleN)
        styleGroup.addAction(self.gui.ui.action_styleS)
        styleGroup.addAction(self.gui.ui.action_styleSR)

        # Set up the editor gui
        self.edView = EditorView(self.gui)
        # Open a database and initialize the editor
        self.edView.slot_open(force=False)

    def run(self):
        if self.edView.db:
            self.app.run()
コード例 #2
0
ファイル: guiEditor.py プロジェクト: bopopescu/zeugs-svn
class GuiEditor:
    """There may be only one instance of this class, because of the
    slot declarations (in editorView.py and edit.py). At present there
    is no possibility of closing an editor and reopening it in the same
    process - the other files would need modifying.
    """
    def __init__(self, appString):
        self.app = Application(appString)
        self.settings = self.app.settings

        self.gui = GuiWidget(self.settings, self.app.clipboard())

        # Initialize the colour objects used by the editor
        coloursInit()

        self.app.init(self.gui)

        styleGroup = QtGui.QActionGroup(self.gui)
        styleGroup.addAction(self.gui.ui.action_styleN)
        styleGroup.addAction(self.gui.ui.action_styleS)
        styleGroup.addAction(self.gui.ui.action_styleSR)

        # Set up the editor gui
        self.edView = EditorView(self.gui)
        # Open a database and initialize the editor
        self.edView.slot_open(force=False)

    def run(self):
        if self.edView.db:
            self.app.run()
コード例 #3
0
ファイル: guiEditor.py プロジェクト: bopopescu/zeugs-svn
    def __init__(self, appString):
        self.app = Application(appString)
        self.settings = self.app.settings

        self.gui = GuiWidget(self.settings, self.app.clipboard())

        # Initialize the colour objects used by the editor
        coloursInit()

        self.app.init(self.gui)

        styleGroup = QtGui.QActionGroup(self.gui)
        styleGroup.addAction(self.gui.ui.action_styleN)
        styleGroup.addAction(self.gui.ui.action_styleS)
        styleGroup.addAction(self.gui.ui.action_styleSR)

        # Set up the editor gui
        self.edView = EditorView(self.gui)
        # Open a database and initialize the editor
        self.edView.slot_open(force=False)
コード例 #4
0
    def __init__(self, appString):
        self.app = Application(appString)
        self.settings = self.app.settings

        self.gui = GuiWidget(self.settings, self.app.clipboard())

        # Initialize the colour objects used by the editor
        coloursInit()

        self.app.init(self.gui)

        styleGroup = QtGui.QActionGroup(self.gui)
        styleGroup.addAction(self.gui.ui.action_styleN)
        styleGroup.addAction(self.gui.ui.action_styleS)
        styleGroup.addAction(self.gui.ui.action_styleSR)

        # Set up the editor gui
        self.edView = EditorView(self.gui)
        # Open a database and initialize the editor
        self.edView.slot_open(force=False)