mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Add visibility control for settings in 3MFWriter plugin
Introduced a new property 'show_in_menu' to control the visibility of individual settings in 3MFWriter plugin. Modified 'SettingExport' class constructor to store this visibility status. Also, updated the 'SettingsExportGroup' model to filter the settings based on visibility before presenting them in the GUI. CURA-11723
This commit is contained in:
parent
d3b1294e8b
commit
6ddd96f914
4 changed files with 23 additions and 6 deletions
|
@ -23,6 +23,7 @@ class SettingsExportGroup(QObject):
|
|||
self._category_details = category_details
|
||||
self._extruder_index = extruder_index
|
||||
self._extruder_color = extruder_color
|
||||
self._visible_settings = []
|
||||
|
||||
@pyqtProperty(str, constant=True)
|
||||
def name(self):
|
||||
|
@ -32,6 +33,14 @@ class SettingsExportGroup(QObject):
|
|||
def settings(self):
|
||||
return self._settings
|
||||
|
||||
@pyqtProperty(list, constant=True)
|
||||
def visibleSettings(self):
|
||||
if self._visible_settings == []:
|
||||
for item in self._settings:
|
||||
if item.isVisible:
|
||||
self._visible_settings.append(item)
|
||||
return self._visible_settings
|
||||
|
||||
@pyqtProperty(int, constant=True)
|
||||
def category(self):
|
||||
return self._category
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue