예제 #1
0
 def __init__(self, receiver, parent=None):
     QUndoCommand.__init__(self, parent)
     ## main window
     self.receiver = receiver
     self._cp = None
     self._cpEdit = None
     self._subwindow = None
예제 #2
0
 def __init__(self, obj, attrname, newvalue, name=None, parent=None):
     if name is None:
         name = "Set %r" % attrname
     QUndoCommand.__init__(self, name, parent)
     self.obj = obj
     self.attrname = attrname
     self.newvalue = newvalue
     self.oldvalue = getattr(obj, attrname)
예제 #3
0
 def __init__(self, receiver, parent=None):
     QUndoCommand.__init__(self, parent)
     ## main window
     self.receiver = receiver
     self._cp = None
     self._ids = None
     self._ds = None
     self._lids = None
예제 #4
0
 def __init__(self, receiver, parent=None):
     QUndoCommand.__init__(self, parent)
     ## main window
     self.receiver = receiver
     self._ds = None
     self._oldstate = None
     self._newstate = None
     self._subwindow = None
예제 #5
0
    def __init__(self, receiver, parent=None):
        QUndoCommand.__init__(self, parent)
        ## main window
        self.receiver = receiver
        ## element type
        self.type = None

        self._ds = DataSourcePaste(receiver, parent)
        self._cp = ComponentPasteItem(receiver, parent)
예제 #6
0
    def __init__(self, scheme, node, parent=None):
        QUndoCommand.__init__(self, "Remove %s" % node.title, parent)
        self.scheme = scheme
        self.node = node

        links = scheme.input_links(node) + \
                scheme.output_links(node)

        for link in links:
            RemoveLinkCommand(scheme, link, parent=self)
예제 #7
0
    def __init__(self, receiver, parent=None):
        QUndoCommand.__init__(self, parent)
        ## main window
        self.receiver = receiver
        ## new datasource name
        self.name = None
        ## new file directory
        self.directory = None

        self._ds = None
        self._pathFile = None
예제 #8
0
    def __init__(self, receiver, parent=None):
        QUndoCommand.__init__(self, parent)
        ## main window
        self.receiver = receiver
        ## new name of component
        self.name = None
        ## directory of the component file
        self.directory = None

        self._cp = None
        self._pathFile = None
        self._subwindow = None
예제 #9
0
 def __init__(self, row, model, parent, add = True):
     QUndoCommand.__init__(self)
     self.row = row
     self.add = add
     self.model = model
     self._parent = parent
     if add:
         self.rowdata = [ QVariant() for x in model._header ]
         self.setText('Inserted Row %s' % (row + 1))
     else:
         self.rowdata = [ QVariant(x) for x in model.rows[row] ]
         self.setText('Removed Row %s' % (row + 1))
예제 #10
0
 def __init__(self, row, column, value, model):
     QUndoCommand.__init__(self)
     self.old = model.rows[row][column]
     self.new = QVariant(value)
     self.row = row
     self.column = column
     self.model = model
     label = value.toString()
     if "\n" in label or len(label) > 20:
         label = str(label).splitlines()[0].rstrip()[:18] + "..."
     self.setText('Row %s: Set %s = "%s"' %
         (row + 1, model._header[column].toString(), label))
예제 #11
0
파일: commands.py 프로젝트: rorydog1/epics
 def __init__(self, row, column, value, model):
     QUndoCommand.__init__(self)
     self.old = model.rows[row][column]
     self.new = QVariant(value)
     self.row = row
     self.column = column
     self.model = model
     label = value.toString()
     if "\n" in label or len(label) > 20:
         label = str(label).splitlines()[0].rstrip()[:18] + "..."
     self.setText('Row %s: Set %s = "%s"' %
                  (row + 1, model._header[column].toString(), label))
예제 #12
0
파일: commands.py 프로젝트: rorydog1/epics
 def __init__(self, row, model, parent, add=True):
     QUndoCommand.__init__(self)
     self.row = row
     self.add = add
     self.model = model
     self._parent = parent
     if add:
         self.rowdata = [QVariant() for x in model._header]
         self.setText('Inserted Row %s' % (row + 1))
     else:
         self.rowdata = [QVariant(x) for x in model.rows[row]]
         self.setText('Removed Row %s' % (row + 1))
예제 #13
0
    def __init__(self, receiver, parent=None):
        QUndoCommand.__init__(self, parent)
        ## main window
        self.receiver = receiver
        ## new item
        self.item = None
        ## new directory
        self.directory = None
        ## new component name
        self.name = None

        self._cp = None
        self._oldName = None
        self._oldDirectory = None
예제 #14
0
    def __init__(self, receiver, parent=None):
        QUndoCommand.__init__(self, parent)
        ## main window
        self.receiver = receiver
        ## new item
        self.item = None
        ## new datasource name
        self.name = None
        ## new datasource directory
        self.directory = None

        self._ds = None
        self._oldName = None
        self._oldDirectory = None
예제 #15
0
 def __init__(self, data_manager, shifts, angles, parent=None):
     QUndoCommand.__init__(self, "Align images", parent)
     self.data_manager = data_manager
     self.shifts = shifts
     self.angles = angles
     self.saved_move = None
예제 #16
0
 def __init__(self, text, cmd_id, parent):
     QUndoCommand.__init__(self, text, parent)
     self._id = cmd_id
예제 #17
0
 def __init__(self, scheme, node, old, new, parent=None):
     QUndoCommand.__init__(self, "Move", parent)
     self.scheme = scheme
     self.node = node
     self.old = old
     self.new = new
예제 #18
0
 def __init__(self, scheme, node, parent=None):
     QUndoCommand.__init__(self, "Add %s" % node.title, parent)
     self.scheme = scheme
     self.node = node
예제 #19
0
 def __init__(self, scheme, annotation, parent=None):
     QUndoCommand.__init__(self, "Remove annotation", parent)
     self.scheme = scheme
     self.annotation = annotation
예제 #20
0
 def __init__(self, scheme, link, parent=None):
     QUndoCommand.__init__(self, "Remove link", parent)
     self.scheme = scheme
     self.link = link
예제 #21
0
 def __init__(self, scheme, annotation, old, new, parent=None):
     QUndoCommand.__init__(self, "Change text", parent)
     self.scheme = scheme
     self.annotation = annotation
     self.old = old
     self.new = new
예제 #22
0
 def __init__(self, scheme, node, old_name, new_name, parent=None):
     QUndoCommand.__init__(self, "Rename", parent)
     self.scheme = scheme
     self.node = node
     self.old_name = old_name
     self.new_name = new_name
예제 #23
0
 def __init__(self, scheme, item, new_line, parent=None):
     QUndoCommand.__init__(self, "Move arrow", parent)
     self.scheme = scheme
     self.item = item
     self.new_line = new_line
     self.old_line = (item.start_pos, item.end_pos)
예제 #24
0
 def __init__(self, data_manager, parent=None):
     QUndoCommand.__init__(self, "Reset images alignment", parent)
     self.data_manager = data_manager
     self.saved_move = None
예제 #25
0
 def __init__(self, receiver, parent=None):
     QUndoCommand.__init__(self, parent)
     ## main window
     self.receiver = receiver
예제 #26
0
 def __init__(self, data_manager, parent=None):
     QUndoCommand.__init__(self, "Cleaning cells", parent)
     self.data_manager = data_manager
     self.first_run = True
예제 #27
0
 def __init__(self, scheme, item, new_geom, parent=None):
     QUndoCommand.__init__(self, "Resize", parent)
     self.scheme = scheme
     self.item = item
     self.new_geom = new_geom
     self.old_geom = item.rect