00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 from ost import gui
00022 from ost import gfx
00023 from PyQt4 import QtCore, QtGui
00024 from render_mode_widget import RenderModeWidget
00025
00026
00027 class HSCWidget(RenderModeWidget):
00028 def __init__(self, parent=None):
00029 RenderModeWidget.__init__(self, parent)
00030
00031
00032 self.text_ = "Helix & Strand Cartoon"
00033
00034
00035 self.mode_ = gfx.RenderMode.HSC
00036
00037
00038 min_spline_detail = 1
00039 max_spline_detail = 20
00040
00041 min_arc_detail = 1
00042 max_arc_detail = 20
00043
00044 min_width = 0.1
00045 max_width = 5.0
00046 max_tube_width= 5.0
00047
00048 min_tube_ratio = 0.2
00049 max_tube_ratio = 4
00050 min_ratio = 0.1
00051 max_ratio = 2.5
00052
00053 min_ecc = 0.1
00054 max_ecc = 5
00055
00056 min_profile=0
00057 max_profile=4
00058
00059
00060
00061
00062 poly_mode_label = QtGui.QLabel("Poly Mode")
00063
00064 self.poly_mode_cb_ = QtGui.QComboBox()
00065 self.poly_mode_cb_.addItem("Points")
00066 self.poly_mode_cb_.addItem("Wireframe")
00067 self.poly_mode_cb_.addItem("Surface")
00068
00069
00070 spline_label = QtGui.QLabel("Spline Detail")
00071
00072 self.spline_spinbox_ = QtGui.QSpinBox()
00073 self.spline_spinbox_.setRange(min_spline_detail, max_spline_detail)
00074
00075
00076 arc_label = QtGui.QLabel("Arc Detail")
00077
00078 self.arc_spinbox_ = QtGui.QSpinBox()
00079 self.arc_spinbox_.setRange(min_arc_detail, max_arc_detail)
00080
00081
00082 tube_label = QtGui.QLabel("Tube")
00083 font = tube_label.font()
00084 font.setBold(True)
00085
00086
00087 radius_tube_label = QtGui.QLabel("Radius")
00088
00089 self.width_tube_spinbox_ = QtGui.QDoubleSpinBox()
00090 self.width_tube_spinbox_.setRange(min_width, max_tube_width)
00091 self.width_tube_spinbox_.setDecimals(1)
00092 self.width_tube_spinbox_.setSingleStep(0.1)
00093
00094 self.width_tube_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00095 self.width_tube_slider_.setRange(min_width*10.0, max_tube_width*10.0)
00096 self.width_tube_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00097 self.width_tube_slider_.setTickInterval(1)
00098
00099
00100 ratio_tube_label = QtGui.QLabel("Ratio")
00101
00102 self.thickness_tube_spinbox_ = QtGui.QDoubleSpinBox()
00103 self.thickness_tube_spinbox_.setRange(min_tube_ratio, max_tube_ratio)
00104 self.thickness_tube_spinbox_.setDecimals(1)
00105 self.thickness_tube_spinbox_.setSingleStep(0.1)
00106
00107 self.thickness_tube_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00108 self.thickness_tube_slider_.setRange(min_tube_ratio*10.0, max_tube_ratio*10)
00109 self.thickness_tube_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00110 self.thickness_tube_slider_.setTickInterval(1)
00111
00112
00113 tube_profile_label = QtGui.QLabel("Tube Profile Type")
00114 self.tube_profile_spinbox_ = QtGui.QSpinBox()
00115 self.tube_profile_spinbox_.setRange(min_profile, max_profile)
00116
00117
00118 helix_label = QtGui.QLabel("Helix")
00119 font = helix_label.font()
00120 font.setBold(True)
00121
00122
00123 radius_helix_label = QtGui.QLabel("Width")
00124
00125 self.width_helix_spinbox_ = QtGui.QDoubleSpinBox()
00126 self.width_helix_spinbox_.setRange(min_width, max_width)
00127 self.width_helix_spinbox_.setDecimals(1)
00128 self.width_helix_spinbox_.setSingleStep(0.1)
00129
00130 self.width_helix_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00131 self.width_helix_slider_.setRange(min_width*10.0, max_width*10.0)
00132 self.width_helix_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00133 self.width_helix_slider_.setTickInterval(1)
00134
00135
00136 ratio_helix_label = QtGui.QLabel("Thickness")
00137
00138 self.thickness_helix_spinbox_ = QtGui.QDoubleSpinBox()
00139 self.thickness_helix_spinbox_.setRange(min_ratio,max_ratio)
00140 self.thickness_helix_spinbox_.setDecimals(1)
00141 self.thickness_helix_spinbox_.setSingleStep(0.1)
00142
00143 self.thickness_helix_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00144 self.thickness_helix_slider_.setRange(min_ratio*10.0,max_ratio*10.0)
00145 self.thickness_helix_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00146 self.thickness_helix_slider_.setTickInterval(1)
00147
00148
00149 ecc_helix_label = QtGui.QLabel("ECC")
00150
00151 self.ecc_helix_spinbox_ = QtGui.QDoubleSpinBox()
00152 self.ecc_helix_spinbox_.setRange(min_ecc,max_ecc)
00153 self.ecc_helix_spinbox_.setDecimals(1)
00154 self.ecc_helix_spinbox_.setSingleStep(0.1)
00155
00156 self.ecc_helix_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00157 self.ecc_helix_slider_.setRange(min_ecc*10,max_ecc*10)
00158 self.ecc_helix_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00159 self.ecc_helix_slider_.setTickInterval(1)
00160
00161
00162 helix_profile_label = QtGui.QLabel("Helix Profile Type")
00163 self.helix_profile_spinbox_ = QtGui.QSpinBox()
00164 self.helix_profile_spinbox_.setRange(min_profile, max_profile)
00165
00166
00167 helix_mode_label = QtGui.QLabel("Helix Render Mode")
00168 self.helix_mode_spinbox_ = QtGui.QSpinBox()
00169 self.helix_mode_spinbox_.setRange(0, 1)
00170
00171
00172 strand_label = QtGui.QLabel("Strand")
00173 font = strand_label.font()
00174 font.setBold(1)
00175
00176
00177 radius_strand_label = QtGui.QLabel("Width")
00178
00179 self.width_strand_spinbox_ = QtGui.QDoubleSpinBox()
00180 self.width_strand_spinbox_.setRange(min_width, max_width)
00181 self.width_strand_spinbox_.setDecimals(1)
00182 self.width_strand_spinbox_.setSingleStep(0.1)
00183
00184 self.width_strand_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00185 self.width_strand_slider_.setRange(min_width*10, max_width*10)
00186 self.width_strand_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00187 self.width_strand_slider_.setTickInterval(1)
00188
00189
00190 ratio_strand_label = QtGui.QLabel("Thickness")
00191
00192 self.thickness_strand_spinbox_ = QtGui.QDoubleSpinBox()
00193 self.thickness_strand_spinbox_.setRange(min_ratio,max_ratio)
00194 self.thickness_strand_spinbox_.setDecimals(1)
00195 self.thickness_strand_spinbox_.setSingleStep(0.1)
00196
00197 self.thickness_strand_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00198 self.thickness_strand_slider_.setRange(min_ratio*10,max_ratio*10)
00199 self.thickness_strand_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00200 self.thickness_strand_slider_.setTickInterval(1)
00201
00202
00203 ecc_strand_label = QtGui.QLabel("ECC")
00204
00205 self.ecc_strand_spinbox_ = QtGui.QDoubleSpinBox()
00206 self.ecc_strand_spinbox_.setRange(min_ecc,max_ecc)
00207 self.ecc_strand_spinbox_.setDecimals(1)
00208 self.ecc_strand_spinbox_.setSingleStep(0.1)
00209
00210 self.ecc_strand_slider_ = QtGui.QSlider(QtCore.Qt.Horizontal, self)
00211 self.ecc_strand_slider_.setRange(min_ecc*10,max_ecc*10)
00212 self.ecc_strand_slider_.setTickPosition(QtGui.QSlider.NoTicks)
00213 self.ecc_strand_slider_.setTickInterval(1)
00214
00215
00216 strand_profile_label = QtGui.QLabel("Strand Profile Type")
00217 self.strand_profile_spinbox_ = QtGui.QSpinBox()
00218 self.strand_profile_spinbox_.setRange(min_profile, max_profile)
00219
00220
00221 strand_mode_label = QtGui.QLabel("Strand Render Mode")
00222 self.strand_mode_spinbox_ = QtGui.QSpinBox()
00223 self.strand_mode_spinbox_.setRange(0, 1)
00224
00225
00226 row=1
00227 grid = QtGui.QGridLayout()
00228 grid.addWidget(poly_mode_label,row,0,1,1)
00229 grid.addWidget(self.poly_mode_cb_,row,3,1,2)
00230 row+=1
00231 grid.addWidget(spline_label, row, 0, 1, 3)
00232 grid.addWidget(self.spline_spinbox_, row, 4, 1, 1)
00233 row+=1
00234 grid.addWidget(arc_label,row,0,1,3)
00235 grid.addWidget(self.arc_spinbox_,row,4,1,1)
00236 row+=1
00237 grid.addWidget(tube_label, row, 0, 1, 3)
00238 row+=1
00239 grid.addWidget(radius_tube_label, row, 0, 1, 1)
00240 grid.addWidget(self.width_tube_slider_, row, 1, 1, 3)
00241 grid.addWidget(self.width_tube_spinbox_, row, 4, 1, 1)
00242 row+=1
00243 grid.addWidget(ratio_tube_label, row, 0, 1, 1)
00244 grid.addWidget(self.thickness_tube_slider_, row, 1, 1, 3)
00245 grid.addWidget(self.thickness_tube_spinbox_, row, 4, 1, 1)
00246 row+=1
00247 grid.addWidget(tube_profile_label, row, 0, 1, 3)
00248 grid.addWidget(self.tube_profile_spinbox_, row, 4, 1, 1)
00249 row+=1
00250 grid.addWidget(helix_label, row, 0, 1, 3)
00251 row+=1
00252 grid.addWidget(radius_helix_label, row, 0, 1, 1)
00253 grid.addWidget(self.width_helix_slider_, row, 1, 1, 3)
00254 grid.addWidget(self.width_helix_spinbox_, row, 4, 1, 1)
00255 row+=1
00256 grid.addWidget(ratio_helix_label, row, 0, 1, 1)
00257 grid.addWidget(self.thickness_helix_slider_, row, 1, 1, 3)
00258 grid.addWidget(self.thickness_helix_spinbox_, row, 4, 1, 1)
00259 row+=1
00260 grid.addWidget(ecc_helix_label, row, 0, 1, 1)
00261 grid.addWidget(self.ecc_helix_slider_, row, 1, 1, 3)
00262 grid.addWidget(self.ecc_helix_spinbox_, row, 4, 1, 1)
00263 row+=1
00264 grid.addWidget(helix_profile_label, row, 0, 1, 3)
00265 grid.addWidget(self.helix_profile_spinbox_, row, 4, 1, 1)
00266 row+=1
00267 grid.addWidget(helix_mode_label, row, 0, 1, 3)
00268 grid.addWidget(self.helix_mode_spinbox_, row, 4, 1, 1)
00269 row+=1
00270 grid.addWidget(strand_label, row, 0, 1, 3)
00271 row+=1
00272 grid.addWidget(radius_strand_label, row, 0, 1, 1)
00273 grid.addWidget(self.width_strand_slider_, row, 1, 1, 3)
00274 grid.addWidget(self.width_strand_spinbox_, row, 4, 1, 1)
00275 row+=1
00276 grid.addWidget(ratio_strand_label, row, 0, 1, 1)
00277 grid.addWidget(self.thickness_strand_slider_, row, 1, 1, 3)
00278 grid.addWidget(self.thickness_strand_spinbox_, row, 4, 1, 1)
00279 row+=1
00280 grid.addWidget(ecc_strand_label, row, 0, 1, 1)
00281 grid.addWidget(self.ecc_strand_slider_, row, 1, 1, 3)
00282 grid.addWidget(self.ecc_strand_spinbox_, row, 4, 1, 1)
00283 row+=1
00284 grid.addWidget(strand_profile_label, row, 0, 1, 3)
00285 grid.addWidget(self.strand_profile_spinbox_, row, 4, 1, 1)
00286 row+=1
00287 grid.addWidget(strand_mode_label, row, 0, 1, 3)
00288 grid.addWidget(self.strand_mode_spinbox_, row, 4, 1, 1)
00289
00290 grid.setRowStretch(row+1,1)
00291 self.setLayout(grid)
00292
00293 QtCore.QObject.connect(self.spline_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSplineDetail)
00294 QtCore.QObject.connect(self.arc_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateArcDetail)
00295 QtCore.QObject.connect(self.poly_mode_cb_, QtCore.SIGNAL("currentIndexChanged(int)"), self.UpdatePolyMode)
00296
00297 QtCore.QObject.connect(self.width_tube_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateTubeRadius)
00298 QtCore.QObject.connect(self.width_tube_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderTubeRadius)
00299 QtCore.QObject.connect(self.thickness_tube_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateTubeRatio)
00300 QtCore.QObject.connect(self.thickness_tube_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderTubeRatio)
00301 QtCore.QObject.connect(self.tube_profile_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateTubeProfileType)
00302
00303 QtCore.QObject.connect(self.width_helix_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateHelixWidth)
00304 QtCore.QObject.connect(self.width_helix_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderHelixWidth)
00305 QtCore.QObject.connect(self.thickness_helix_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateHelixThickness)
00306 QtCore.QObject.connect(self.thickness_helix_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderHelixThickness)
00307 QtCore.QObject.connect(self.ecc_helix_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateHelixEcc)
00308 QtCore.QObject.connect(self.ecc_helix_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderHelixEcc)
00309 QtCore.QObject.connect(self.helix_profile_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateHelixProfileType)
00310 QtCore.QObject.connect(self.helix_mode_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateHelixMode)
00311
00312 QtCore.QObject.connect(self.width_strand_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateStrandWidth)
00313 QtCore.QObject.connect(self.width_strand_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderStrandWidth)
00314 QtCore.QObject.connect(self.thickness_strand_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateStrandThickness)
00315 QtCore.QObject.connect(self.thickness_strand_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderStrandThickness)
00316 QtCore.QObject.connect(self.ecc_strand_spinbox_, QtCore.SIGNAL("valueChanged(double)"), self.UpdateStrandEcc)
00317 QtCore.QObject.connect(self.ecc_strand_slider_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateSliderStrandEcc)
00318 QtCore.QObject.connect(self.strand_profile_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateStrandProfileType)
00319 QtCore.QObject.connect(self.strand_mode_spinbox_, QtCore.SIGNAL("valueChanged(int)"), self.UpdateStrandMode)
00320
00321 self.setMinimumSize(250,550)
00322
00323
00324 def UpdateGui(self,options):
00325 self.poly_mode_cb_.setCurrentIndex(options.GetPolyMode())
00326 self.spline_spinbox_.setValue(options.GetSplineDetail())
00327 self.arc_spinbox_.setValue(options.GetArcDetail())
00328
00329 self.UpdateTubeRadiusGui(options.GetTubeRadius())
00330 self.UpdateTubeRatioGui(options.GetTubeRatio())
00331 self.tube_profile_spinbox_.setValue(options.GetTubeProfileType())
00332 self.UpdateHelixWidthGui(options.GetHelixWidth())
00333 self.UpdateHelixThicknessGui(options.GetHelixThickness())
00334 self.UpdateHelixEccGui(options.GetHelixEcc())
00335 self.helix_profile_spinbox_.setValue(options.GetHelixProfileType())
00336 self.helix_mode_spinbox_.setValue(options.GetHelixMode())
00337 self.UpdateStrandWidthGui(options.GetStrandWidth())
00338 self.UpdateStrandThicknessGui(options.GetStrandThickness())
00339 self.UpdateStrandEccGui(options.GetStrandEcc())
00340 self.strand_profile_spinbox_.setValue(options.GetStrandProfileType())
00341 self.strand_mode_spinbox_.setValue(options.GetStrandMode())
00342
00343 def UpdatePolyMode(self, value):
00344 self.GetOptions().SetPolyMode(value)
00345 self.ApplyOptions()
00346
00347 def UpdateSplineDetail(self, value):
00348 self.GetOptions().SetSplineDetail(value)
00349 self.ApplyOptions()
00350
00351 def UpdateArcDetail(self, value):
00352 self.GetOptions().SetArcDetail(value)
00353 self.ApplyOptions()
00354
00355 def UpdateTubeRadius(self, value):
00356 self.GetOptions().SetTubeRadius(value)
00357 self.ApplyOptions()
00358
00359 def UpdateSliderTubeRadius(self, value):
00360 self.GetOptions().SetTubeRadius(value/10.0)
00361 self.ApplyOptions()
00362
00363 def UpdateTubeRatio(self, value):
00364 self.GetOptions().SetTubeRatio(value)
00365 self.ApplyOptions()
00366
00367 def UpdateSliderTubeRatio(self, value):
00368 self.GetOptions().SetTubeRatio(value/10.0)
00369 self.ApplyOptions()
00370
00371 def UpdateTubeProfileType(self, value):
00372 self.GetOptions().SetTubeProfileType(value)
00373 self.ApplyOptions()
00374
00375 def UpdateHelixWidth(self, value):
00376 self.GetOptions().SetHelixWidth(value)
00377 self.ApplyOptions()
00378
00379 def UpdateSliderHelixWidth(self, value):
00380 self.GetOptions().SetHelixWidth(value/10.0)
00381 self.ApplyOptions()
00382
00383 def UpdateHelixThickness(self, value):
00384 self.GetOptions().SetHelixThickness(value)
00385 self.ApplyOptions()
00386
00387 def UpdateSliderHelixThickness(self, value):
00388 self.GetOptions().SetHelixThickness(value/10.0)
00389 self.ApplyOptions()
00390
00391 def UpdateHelixEcc(self, value):
00392 self.GetOptions().SetHelixEcc(value)
00393 self.ApplyOptions()
00394
00395 def UpdateHelixProfileType(self, value):
00396 self.GetOptions().SetHelixProfileType(value)
00397 self.ApplyOptions()
00398
00399 def UpdateHelixMode(self, value):
00400 self.GetOptions().SetHelixMode(value)
00401 self.ApplyOptions()
00402
00403 def UpdateSliderHelixEcc(self, value):
00404 self.GetOptions().SetHelixEcc(value/10.0)
00405 self.ApplyOptions()
00406
00407 def UpdateStrandWidth(self, value):
00408 self.GetOptions().SetStrandWidth(value)
00409 self.ApplyOptions()
00410
00411 def UpdateSliderStrandWidth(self, value):
00412 self.GetOptions().SetStrandWidth(value/10.0)
00413 self.ApplyOptions()
00414
00415 def UpdateStrandThickness(self, value):
00416 self.GetOptions().SetStrandThickness(value)
00417 self.ApplyOptions()
00418
00419 def UpdateSliderStrandThickness(self, value):
00420 self.GetOptions().SetStrandThickness(value/10.0)
00421 self.ApplyOptions()
00422
00423 def UpdateStrandEcc(self, value):
00424 self.GetOptions().SetStrandEcc(value)
00425 self.ApplyOptions()
00426
00427 def UpdateSliderStrandEcc(self, value):
00428 self.GetOptions().SetStrandEcc(value/10.0)
00429 self.ApplyOptions()
00430
00431 def UpdateStrandProfileType(self, value):
00432 self.GetOptions().SetStrandProfileType(value)
00433 self.ApplyOptions()
00434
00435 def UpdateStrandMode(self, value):
00436 self.GetOptions().SetStrandMode(value)
00437 self.ApplyOptions()
00438
00439 def UpdateTubeRadiusGui(self,value):
00440 value = round(value, 2)
00441 if(abs(value*10.0 - self.width_tube_slider_.value())>=self.width_tube_slider_.singleStep()):
00442 self.width_tube_slider_.setValue(value*10.0)
00443 if(abs(value - self.width_tube_spinbox_.value())>=self.width_tube_spinbox_.singleStep()):
00444 self.width_tube_spinbox_.setValue(value)
00445
00446 def UpdateTubeRatioGui(self,value):
00447 value = round(value, 2)
00448 if(abs(value*10.0 - self.thickness_tube_slider_.value())>=self.thickness_tube_slider_.singleStep()):
00449 self.thickness_tube_slider_.setValue(value*10.0)
00450 if(abs(value - self.thickness_tube_spinbox_.value())>=self.thickness_tube_spinbox_.singleStep()):
00451 self.thickness_tube_spinbox_.setValue(value)
00452
00453 def UpdateHelixWidthGui(self, value):
00454 value = round(value, 2)
00455 if(abs(value*10.0 - self.width_helix_slider_.value())>=self.width_helix_slider_.singleStep()):
00456 self.width_helix_slider_.setValue(value*10.0)
00457 if(abs(value - self.width_helix_spinbox_.value())>=self.width_helix_spinbox_.singleStep()):
00458 self.width_helix_spinbox_.setValue(value)
00459
00460 def UpdateHelixThicknessGui(self, value):
00461 value = round(value, 2)
00462 if(abs(value*10.0 - self.thickness_helix_slider_.value())>=self.thickness_helix_slider_.singleStep()):
00463 self.thickness_helix_slider_.setValue(value*10.0)
00464 if(abs(value - self.thickness_helix_spinbox_.value())>=self.thickness_helix_spinbox_.singleStep()):
00465 self.thickness_helix_spinbox_.setValue(value)
00466
00467 def UpdateHelixEccGui(self, value):
00468 value = round(value, 2)
00469 if(abs(value*10.0 - self.ecc_helix_slider_.value())>=self.ecc_helix_slider_.singleStep()):
00470 self.ecc_helix_slider_.setValue(value*10.0)
00471 if(abs(value - self.ecc_helix_spinbox_.value())>=self.ecc_helix_spinbox_.singleStep()):
00472 self.ecc_helix_spinbox_.setValue(value)
00473
00474 def UpdateStrandWidthGui(self, value):
00475 value = round(value, 2)
00476 if(abs(value*10.0 - self.width_strand_slider_.value())>=self.width_strand_slider_.singleStep()):
00477 self.width_strand_slider_.setValue(value*10.0)
00478 if(abs(value - self.width_strand_spinbox_.value())>=self.width_strand_spinbox_.singleStep()):
00479 self.width_strand_spinbox_.setValue(value)
00480
00481 def UpdateStrandThicknessGui(self, value):
00482 value = round(value, 2)
00483 if(abs(value*10.0 - self.thickness_strand_slider_.value())>=self.thickness_strand_slider_.singleStep()):
00484 self.thickness_strand_slider_.setValue(value*10.0)
00485 if(abs(value - self.thickness_strand_spinbox_.value())>=self.thickness_strand_spinbox_.singleStep()):
00486 self.thickness_strand_spinbox_.setValue(value)
00487
00488 def UpdateStrandEccGui(self, value):
00489 value = round(value, 2)
00490 if(abs(value*10.0 - self.ecc_strand_slider_.value())>=self.ecc_strand_slider_.singleStep()):
00491 self.ecc_strand_slider_.setValue(value*10.0)
00492 if(abs(value - self.ecc_strand_spinbox_.value())>=self.ecc_strand_spinbox_.singleStep()):
00493 self.ecc_strand_spinbox_.setValue(value)
00494
00495 def GetText(self):
00496 return self.text_
00497
00498 def GetRenderMode(self):
00499 return self.mode_