Beispiel #1
0
 def pastecell(self):
     """
     Kopiert Wert in eine ausgewaehlte Zelle
     :return:
     """
     clipboard = QApplication.clipboard()
     index = self.gui.tableView.selectionModel().selectedIndexes()[0]
     command = EditCommand(self.tablemodel, index)
     command.newValue(str(clipboard.text()))
     self.undoStack.push(command)
     self.gui.tableView.reset()
Beispiel #2
0
 def pastecell(self):
     """
     Kopiert Wert in eine ausgewaehlte Zelle
     :return:
     """
     clipboard = QApplication.clipboard()
     index = self.gui.tableView.selectionModel().selectedIndexes()[0]
     command = EditCommand(self.tablemodel, index)
     command.newValue(str(clipboard.text()))
     self.undoStack.push(command)
     self.gui.tableView.reset()
Beispiel #3
0
 def cutcell(self):
     """
     Schneidet eine Zelle aus
     :return:
     """
     self.copycell()
     index = self.gui.tableView.selectionModel().selectedIndexes()[0]
     command = EditCommand(self.tablemodel, index)
     command.newValue("")
     self.undoStack.beginMacro("Cut")
     self.undoStack.push(command)
     self.undoStack.endMacro()
     self.undoText_redoText()
     self.gui.tableView.reset()
Beispiel #4
0
 def cutcell(self):
     """
     Schneidet eine Zelle aus
     :return:
     """
     self.copycell()
     index = self.gui.tableView.selectionModel().selectedIndexes()[0]
     command = EditCommand(self.tablemodel, index)
     command.newValue("")
     self.undoStack.beginMacro("Cut")
     self.undoStack.push(command)
     self.undoStack.endMacro()
     self.undoText_redoText()
     self.gui.tableView.reset()
Beispiel #5
0
 def editorEvent(self, event, model, option, index):
     self.edit = EditCommand(model, index)