initial commit for anatomy widget

This commit is contained in:
iLLiCiTiT 2020-09-01 16:50:00 +02:00
parent ce6e64e573
commit dabe68f28c
3 changed files with 70 additions and 1 deletions

View file

@ -3,6 +3,10 @@
"type": "dict-invisible",
"children": [
{
"type": "anatomy",
"key": "anatomy",
"is_file": true
}, {
"type": "schema",
"children": [
"1_plugins_gui_schema"

View file

@ -1,8 +1,10 @@
from .window import MainWidget
# TODO properly register inputs to TypeToKlass class
from . import inputs
from . import anatomy_inputs
__all__ = [
"MainWidget",
"inputs"
"inputs",
"anatomy_inputs"
]

View file

@ -0,0 +1,63 @@
import json
import logging
from Qt import QtWidgets, QtCore, QtGui
from .widgets import (
ExpandingWidget,
ModifiedIntSpinBox,
ModifiedFloatSpinBox
)
from .inputs import ConfigObject, InputObject
from .lib import NOT_SET, AS_WIDGET, METADATA_KEY, TypeToKlass
class AnatomyWidget(QtWidgets.QWidget, InputObject):
value_changed = QtCore.Signal(object)
def __init__(
self, input_data, values, parent_keys, parent, label_widget=None
):
self._parent = parent
self._as_widget = values is AS_WIDGET
self._is_group = True
self._state = None
self.key = "anatomy"
self.start_value = None
super(AnatomyWidget, self).__init__(parent)
layout = QtWidgets.QHBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(5)
label = QtWidgets.QLabel("Test")
layout.addWidget(label)
self.override_value = NOT_SET
def update_global_values(self, values):
print("* update_global_values")
def set_value(self, value, *, global_value=False):
print("* set_value")
def clear_value(self):
print("* clear_value")
def _on_value_change(self, item=None):
print("* _on_value_change")
def update_style(self):
print("* update_style")
def item_value(self):
print("* item_value")
class TemplatesWidget:
pass
TypeToKlass.types["anatomy"] = AnatomyWidget