1 from DialogEdit import *
5 class EditPointDialog(DialogEdit):
7 self, helpFile, controller, widgetDialogBox, model, oldPoint, pointRange
11 # Initializing parent widget
12 DialogEdit.__init__(self, helpFile, controller, widgetDialogBox)
16 # Reading oldX and oldY
20 while oldPoint[i] != ":":
24 for j in range(i + 1, len(oldPoint)):
27 self.pointRange = pointRange
28 self.entryX.setText(oldX)
29 self.entryY.setText(oldY)
32 def addSpecialWidgets(self):
33 floatValidator = QDoubleValidator(self)
35 lX = QLabel("X", self)
36 self.v11.addWidget(lX)
37 lY = QLabel("Y", self)
38 self.v11.addWidget(lY)
40 self.entryX = QLineEdit(self)
41 self.entryX.setValidator(floatValidator)
42 self.v12.addWidget(self.entryX)
43 self.entryY = QLineEdit(self)
44 self.entryY.setValidator(floatValidator)
45 self.v12.addWidget(self.entryY)
49 pointRange = self.pointRange
50 newX = float(self.newX)
51 newY = float(self.newY)
53 self.getController().editPoint(self._model, newPoint, pointRange)
56 def retrieveUserEntries(self):
57 self.newX = str(self.entryX.text())
58 self.newY = str(self.entryY.text())
61 def checkUserEntries(self):
62 if self.newX == "" or self.newY == "":
63 self.errMessage = "All attributes must be filled"