|
@@ -2125,35 +2125,29 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.exclusion_box.setContentsMargins(0, 0, 0, 0)
|
|
self.exclusion_box.setContentsMargins(0, 0, 0, 0)
|
|
|
self.exclusion_frame.setLayout(self.exclusion_box)
|
|
self.exclusion_frame.setLayout(self.exclusion_box)
|
|
|
|
|
|
|
|
- h_lay = QtWidgets.QHBoxLayout()
|
|
|
|
|
- self.exclusion_box.addLayout(h_lay)
|
|
|
|
|
-
|
|
|
|
|
- # Button Add Area
|
|
|
|
|
- self.add_area_button = QtWidgets.QPushButton(_('Add area'))
|
|
|
|
|
- self.add_area_button.setToolTip(_("Add an Exclusion Area."))
|
|
|
|
|
- h_lay.addWidget(self.add_area_button)
|
|
|
|
|
-
|
|
|
|
|
- # Button Delete Area
|
|
|
|
|
- self.delete_area_button = QtWidgets.QPushButton(_('Clear areas'))
|
|
|
|
|
- self.delete_area_button.setToolTip(_("Delete all exclusion areas."))
|
|
|
|
|
- h_lay.addWidget(self.delete_area_button)
|
|
|
|
|
-
|
|
|
|
|
- grid_l = QtWidgets.QGridLayout()
|
|
|
|
|
- grid_l.setColumnStretch(0, 0)
|
|
|
|
|
- grid_l.setColumnStretch(1, 1)
|
|
|
|
|
- self.exclusion_box.addLayout(grid_l)
|
|
|
|
|
-
|
|
|
|
|
- # Area Selection shape
|
|
|
|
|
- self.area_shape_label = QtWidgets.QLabel('%s:' % _("Shape"))
|
|
|
|
|
- self.area_shape_label.setToolTip(
|
|
|
|
|
- _("The kind of selection shape used for area selection.")
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
|
|
|
|
|
- {'label': _("Polygon"), 'value': 'polygon'}])
|
|
|
|
|
-
|
|
|
|
|
- grid_l.addWidget(self.area_shape_label, 0, 0)
|
|
|
|
|
- grid_l.addWidget(self.area_shape_radio, 0, 1)
|
|
|
|
|
|
|
+ self.exclusion_table = FCTable()
|
|
|
|
|
+ self.exclusion_box.addWidget(self.exclusion_table)
|
|
|
|
|
+ self.exclusion_table.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
|
|
|
|
+
|
|
|
|
|
+ self.exclusion_table.setColumnCount(4)
|
|
|
|
|
+ self.exclusion_table.setColumnWidth(0, 20)
|
|
|
|
|
+ self.exclusion_table.setHorizontalHeaderLabels(['#', _('Object'), _('Strategy'), _('Over Z')])
|
|
|
|
|
+
|
|
|
|
|
+ self.exclusion_table.horizontalHeaderItem(0).setToolTip(_("This is the Area ID."))
|
|
|
|
|
+ self.exclusion_table.horizontalHeaderItem(1).setToolTip(
|
|
|
|
|
+ _("Type of the object where the exclusion area was added."))
|
|
|
|
|
+ self.exclusion_table.horizontalHeaderItem(2).setToolTip(
|
|
|
|
|
+ _("The strategy used for exclusion area. Go around the exclusion areas or over it."))
|
|
|
|
|
+ self.exclusion_table.horizontalHeaderItem(3).setToolTip(
|
|
|
|
|
+ _("If the strategy is to go over the area then this is the height at which the tool will go to avoid the "
|
|
|
|
|
+ "exclusion area."))
|
|
|
|
|
+
|
|
|
|
|
+ self.exclusion_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
|
|
|
|
|
+
|
|
|
|
|
+ grid_a1 = QtWidgets.QGridLayout()
|
|
|
|
|
+ grid_a1.setColumnStretch(0, 0)
|
|
|
|
|
+ grid_a1.setColumnStretch(1, 1)
|
|
|
|
|
+ self.exclusion_box.addLayout(grid_a1)
|
|
|
|
|
|
|
|
# Chose Strategy
|
|
# Chose Strategy
|
|
|
self.strategy_label = FCLabel('%s:' % _("Strategy"))
|
|
self.strategy_label = FCLabel('%s:' % _("Strategy"))
|
|
@@ -2164,8 +2158,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.strategy_radio = RadioSet([{'label': _('Over'), 'value': 'over'},
|
|
self.strategy_radio = RadioSet([{'label': _('Over'), 'value': 'over'},
|
|
|
{'label': _('Around'), 'value': 'around'}])
|
|
{'label': _('Around'), 'value': 'around'}])
|
|
|
|
|
|
|
|
- grid_l.addWidget(self.strategy_label, 1, 0)
|
|
|
|
|
- grid_l.addWidget(self.strategy_radio, 1, 1)
|
|
|
|
|
|
|
+ grid_a1.addWidget(self.strategy_label, 1, 0)
|
|
|
|
|
+ grid_a1.addWidget(self.strategy_radio, 1, 1)
|
|
|
|
|
|
|
|
# Over Z
|
|
# Over Z
|
|
|
self.over_z_label = FCLabel('%s:' % _("Over Z"))
|
|
self.over_z_label = FCLabel('%s:' % _("Over Z"))
|
|
@@ -2175,8 +2169,36 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.over_z_entry.set_range(0.000, 9999.9999)
|
|
self.over_z_entry.set_range(0.000, 9999.9999)
|
|
|
self.over_z_entry.set_precision(self.decimals)
|
|
self.over_z_entry.set_precision(self.decimals)
|
|
|
|
|
|
|
|
- grid_l.addWidget(self.over_z_label, 2, 0)
|
|
|
|
|
- grid_l.addWidget(self.over_z_entry, 2, 1)
|
|
|
|
|
|
|
+ grid_a1.addWidget(self.over_z_label, 2, 0)
|
|
|
|
|
+ grid_a1.addWidget(self.over_z_entry, 2, 1)
|
|
|
|
|
+
|
|
|
|
|
+ # Button Add Area
|
|
|
|
|
+ self.add_area_button = QtWidgets.QPushButton(_('Add area'))
|
|
|
|
|
+ self.add_area_button.setToolTip(_("Add an Exclusion Area."))
|
|
|
|
|
+
|
|
|
|
|
+ # Area Selection shape
|
|
|
|
|
+ self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
|
|
|
|
|
+ {'label': _("Polygon"), 'value': 'polygon'}])
|
|
|
|
|
+ self.area_shape_radio.setToolTip(
|
|
|
|
|
+ _("The kind of selection shape used for area selection.")
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ grid_a1.addWidget(self.add_area_button, 4, 0)
|
|
|
|
|
+ grid_a1.addWidget(self.area_shape_radio, 4, 1)
|
|
|
|
|
+
|
|
|
|
|
+ h_lay_1 = QtWidgets.QHBoxLayout()
|
|
|
|
|
+ self.exclusion_box.addLayout(h_lay_1)
|
|
|
|
|
+
|
|
|
|
|
+ # Button Delete All Areas
|
|
|
|
|
+ self.delete_area_button = QtWidgets.QPushButton(_('Clear areas'))
|
|
|
|
|
+ self.delete_area_button.setToolTip(_("Delete all exclusion areas."))
|
|
|
|
|
+
|
|
|
|
|
+ # Button Delete Selected Areas
|
|
|
|
|
+ self.delete_sel_area_button = QtWidgets.QPushButton(_('Delete Selected'))
|
|
|
|
|
+ self.delete_sel_area_button.setToolTip(_("Delete all exclusion areas that are selected in the table."))
|
|
|
|
|
+
|
|
|
|
|
+ h_lay_1.addWidget(self.delete_area_button)
|
|
|
|
|
+ h_lay_1.addWidget(self.delete_sel_area_button)
|
|
|
|
|
|
|
|
# -------------------------- EXCLUSION AREAS END -------------------------------------------------------------
|
|
# -------------------------- EXCLUSION AREAS END -------------------------------------------------------------
|
|
|
# ------------------------------------------------------------------------------------------------------------
|
|
# ------------------------------------------------------------------------------------------------------------
|