26 from .wireframe_widget
import WireframeWidget
31 from PyQt5
import QtCore, QtWidgets
32 from .scene_selection_helper
import SelHelper
33 from .combo_options_widget
import ComboOptionsWidget
34 from .custom_widget
import CustomWidget
35 from .cpk_widget
import CPKWidget
36 from .tube_widget
import TubeWidget
37 from .simple_widget
import SimpleWidget
38 from .sline_widget
import SlineWidget
39 from .hsc_widget
import HSCWidget
40 from .trace_widget
import TraceWidget
41 from .line_trace_widget
import LineTraceWidget
45 ComboOptionsWidget.__init__(self, parent)
48 self.
text_text_ =
"Render Options"
53 self.
keep_action_keep_action_.setToolTip(
"Keep rendermodes and add current")
79 self.setMinimumSize(250,200)
83 scene_selection = gui.SceneSelection.Instance()
84 for i
in range(0,scene_selection.GetActiveNodeCount()):
85 node = scene_selection.GetActiveNode(i)
87 render_mode = item.GetRenderMode()
88 if render_mode
is not None:
89 node.SetRenderMode(render_mode)
90 if(scene_selection.GetActiveViewCount() > 0):
91 entity = scene_selection.GetViewEntity()
92 view = scene_selection.GetViewUnion()
93 render_mode = item.GetRenderMode()
94 if render_mode
is not None:
95 entity.SetRenderMode(item.GetRenderMode(),view,self.
keep_action_keep_action_.isChecked())
101 if hasattr(self,
"keep_button_"):
104 ComboOptionsWidget.setEnabled(self,
True)
107 new_render_mode =
None
108 if cur_widget
is not None:
109 new_render_mode = cur_widget.GetRenderMode()
111 if SelHelper().CheckAllFlags(SelHelper.NO_SELECTION):
112 ComboOptionsWidget.setEnabled(self,
False)
121 scene_selection = gui.SceneSelection.Instance()
122 if scene_selection.GetActiveNodeCount() > 0 :
123 if hasattr(self,
"keep_button_"):
125 render_mode_valid =
True
127 for i
in range(0,scene_selection.GetActiveNodeCount()):
128 node = scene_selection.GetActiveNode(i)
129 if isinstance(scene_selection.GetActiveNode(i),
gfx.GfxObj):
130 if render_mode
is None:
131 render_mode = node.GetRenderMode()
132 elif render_mode != node.GetRenderMode():
133 render_mode_valid =
False
135 if SelHelper().CheckFlags(SelHelper.HAS_IMG | SelHelper.IS_ONE_TYPE):
138 elif SelHelper().CheckMinOneFlag(SelHelper.HAS_ENTITY| SelHelper.HAS_VIEW)
and SelHelper().CheckNotFlags(SelHelper.HAS_IMG):
143 ComboOptionsWidget.setEnabled(self,
False)
146 if SelHelper().CheckMinOneFlag(SelHelper.HAS_ENTITY| SelHelper.HAS_IMG)
and SelHelper().CheckNotFlags(SelHelper.HAS_VIEW):
147 if(render_mode_valid):
148 ComboOptionsWidget.ChangeSelectedItem(self,render_mode)
150 ComboOptionsWidget.ChangeSelectedItem(self,
"")
154 ComboOptionsWidget.ChangeSelectedItem(self,new_render_mode)
158 return self.
text_text_
161 def __init__(self, text="", render_mode=None, parent=None):
162 QtWidgets.QLabel.__init__(self, parent)
163 self.setMinimumSize(250,30)
167 text_label = QtWidgets.QLabel(text)
168 font = text_label.font()
170 grid = QtWidgets.QGridLayout()
171 grid.addWidget(text_label,0,0,1,1)
172 grid.addWidget(QtWidgets.QLabel(
"No Settings available"), 1, 0, 1, 3)
173 grid.setRowStretch(2,1)
175 self.setMinimumSize(250,60)
graphical rendering of mol::EntityHandle entites
main class for all graphic objects
isocontour rendering for 3D image data