Просмотр исходного кода

- in Tool Distance and Tool Minimal Distance made the entry fields read-only

Marius Stanciu 6 лет назад
Родитель
Сommit
b226177448
3 измененных файлов с 14 добавлено и 0 удалено
  1. 1 0
      README.md
  2. 6 0
      flatcamTools/ToolDistance.py
  3. 7 0
      flatcamTools/ToolDistanceMin.py

+ 1 - 0
README.md

@@ -20,6 +20,7 @@ CAD program, and create G-Code for Isolation routing.
 - small change in the UI layout for Check Rules Tool by adding a new rule (Check trace size)
 - small change in the UI layout for Check Rules Tool by adding a new rule (Check trace size)
 - changed a tooltip in Optimal Tool
 - changed a tooltip in Optimal Tool
 - in Optimal Tool added display of how frequent that minimum distance is found
 - in Optimal Tool added display of how frequent that minimum distance is found
+- in Tool Distance and Tool Minimal Distance made the entry fields read-only
 
 
 29.09.2019
 29.09.2019
 
 

+ 6 - 0
flatcamTools/ToolDistance.py

@@ -64,26 +64,32 @@ class Distance(FlatCAMTool):
         self.total_distance_label.setToolTip(_("This is the point to point Euclidian distance."))
         self.total_distance_label.setToolTip(_("This is the point to point Euclidian distance."))
 
 
         self.start_entry = FCEntry()
         self.start_entry = FCEntry()
+        self.start_entry.setReadOnly(True)
         self.start_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.start_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.start_entry.setToolTip(_("This is measuring Start point coordinates."))
         self.start_entry.setToolTip(_("This is measuring Start point coordinates."))
 
 
         self.stop_entry = FCEntry()
         self.stop_entry = FCEntry()
+        self.stop_entry.setReadOnly(True)
         self.stop_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.stop_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.stop_entry.setToolTip(_("This is the measuring Stop point coordinates."))
         self.stop_entry.setToolTip(_("This is the measuring Stop point coordinates."))
 
 
         self.distance_x_entry = FCEntry()
         self.distance_x_entry = FCEntry()
+        self.distance_x_entry.setReadOnly(True)
         self.distance_x_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_x_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_x_entry.setToolTip(_("This is the distance measured over the X axis."))
         self.distance_x_entry.setToolTip(_("This is the distance measured over the X axis."))
 
 
         self.distance_y_entry = FCEntry()
         self.distance_y_entry = FCEntry()
+        self.distance_y_entry.setReadOnly(True)
         self.distance_y_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_y_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_y_entry.setToolTip(_("This is the distance measured over the Y axis."))
         self.distance_y_entry.setToolTip(_("This is the distance measured over the Y axis."))
 
 
         self.angle_entry = FCEntry()
         self.angle_entry = FCEntry()
+        self.angle_entry.setReadOnly(True)
         self.angle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.angle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.angle_entry.setToolTip(_("This is orientation angle of the measuring line."))
         self.angle_entry.setToolTip(_("This is orientation angle of the measuring line."))
 
 
         self.total_distance_entry = FCEntry()
         self.total_distance_entry = FCEntry()
+        self.total_distance_entry.setReadOnly(True)
         self.total_distance_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.total_distance_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.total_distance_entry.setToolTip(_("This is the point to point Euclidian distance."))
         self.total_distance_entry.setToolTip(_("This is the point to point Euclidian distance."))
 
 

+ 7 - 0
flatcamTools/ToolDistanceMin.py

@@ -71,32 +71,39 @@ class DistanceMin(FlatCAMTool):
         self.half_point_label.setToolTip(_("This is the middle point of the point to point Euclidean distance."))
         self.half_point_label.setToolTip(_("This is the middle point of the point to point Euclidean distance."))
 
 
         self.start_entry = FCEntry()
         self.start_entry = FCEntry()
+        self.start_entry.setReadOnly(True)
         self.start_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.start_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.start_entry.setToolTip(_("This is first object point coordinates.\n"
         self.start_entry.setToolTip(_("This is first object point coordinates.\n"
                                       "This is the start point for measuring distance."))
                                       "This is the start point for measuring distance."))
 
 
         self.stop_entry = FCEntry()
         self.stop_entry = FCEntry()
+        self.stop_entry.setReadOnly(True)
         self.stop_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.stop_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.stop_entry.setToolTip(_("This is second object point coordinates.\n"
         self.stop_entry.setToolTip(_("This is second object point coordinates.\n"
                                       "This is the end point for measuring distance."))
                                       "This is the end point for measuring distance."))
 
 
         self.distance_x_entry = FCEntry()
         self.distance_x_entry = FCEntry()
+        self.distance_x_entry.setReadOnly(True)
         self.distance_x_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_x_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_x_entry.setToolTip(_("This is the distance measured over the X axis."))
         self.distance_x_entry.setToolTip(_("This is the distance measured over the X axis."))
 
 
         self.distance_y_entry = FCEntry()
         self.distance_y_entry = FCEntry()
+        self.distance_y_entry.setReadOnly(True)
         self.distance_y_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_y_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.distance_y_entry.setToolTip(_("This is the distance measured over the Y axis."))
         self.distance_y_entry.setToolTip(_("This is the distance measured over the Y axis."))
 
 
         self.angle_entry = FCEntry()
         self.angle_entry = FCEntry()
+        self.angle_entry.setReadOnly(True)
         self.angle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.angle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.angle_entry.setToolTip(_("This is orientation angle of the measuring line."))
         self.angle_entry.setToolTip(_("This is orientation angle of the measuring line."))
 
 
         self.total_distance_entry = FCEntry()
         self.total_distance_entry = FCEntry()
+        self.total_distance_entry.setReadOnly(True)
         self.total_distance_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.total_distance_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.total_distance_entry.setToolTip(_("This is the point to point Euclidean distance."))
         self.total_distance_entry.setToolTip(_("This is the point to point Euclidean distance."))
 
 
         self.half_point_entry = FCEntry()
         self.half_point_entry = FCEntry()
+        self.half_point_entry.setReadOnly(True)
         self.half_point_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.half_point_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.half_point_entry.setToolTip(_("This is the middle point of the point to point Euclidean distance."))
         self.half_point_entry.setToolTip(_("This is the middle point of the point to point Euclidean distance."))