Bases: AbstractToolbarSettings
Methods:
Attributes:
Source code
| def __init__(self, parent: type[AbstractToolbar] | AbstractToolbar) -> None:
self.parent_toolbar_type = parent if isinstance(parent, type) else parent.__class__
super().__init__()
|
always_show_scene_marks: bool
default_export_template: str
parent_toolbar_type = parent if isinstance(parent, type) else __class__
get_separator(horizontal: bool = False) -> QFrame
Source code
| def get_separator(self, horizontal: bool = False) -> QFrame:
separator = QFrame(self)
separator.setFrameShape(QFrame.Shape.HLine if horizontal else QFrame.Shape.VLine)
separator.setFrameShadow(QFrame.Shadow.Sunken)
return separator
|
Source code
| def set_defaults(self) -> None:
self.export_template_lineedit.setText(r'({start},{end}),')
self.always_show_scene_marks_checkbox.setChecked(False)
self.export_multiline_checkbox.setChecked(True)
|
set_qobject_names() -> None
Source code
279
280
281
282
283
284
285
286
287
288
289
290
291
292 | def set_qobject_names(self) -> None:
if not hasattr(self, '__slots__'):
return
slots = list(self.__slots__)
if isinstance(self, AbstractToolbar) and 'main' in slots:
slots.remove('main')
for attr_name in slots:
attr = getattr(self, attr_name)
if not isinstance(attr, QObject):
continue
attr.setObjectName(type(self).__name__ + '.' + attr_name)
|
Source code
20
21
22
23
24
25
26
27
28
29
30
31
32
33 | def setup_ui(self) -> None:
super().setup_ui()
self.export_template_lineedit = LineEdit('Export Template')
self.always_show_scene_marks_checkbox = CheckBox('Always show scene marks')
self.export_multiline_checkbox = CheckBox('Export as multiple lines')
HBoxLayout(self.vlayout, [QLabel('Default Export Template'), self.export_template_lineedit])
HBoxLayout(self.vlayout, self.always_show_scene_marks_checkbox)
HBoxLayout(self.vlayout, self.export_multiline_checkbox)
|