本文整理汇总了Python中cdConstants.CDConstants.printOut方法的典型用法代码示例。如果您正苦于以下问题:Python CDConstants.printOut方法的具体用法?Python CDConstants.printOut怎么用?Python CDConstants.printOut使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cdConstants.CDConstants
的用法示例。
在下文中一共展示了CDConstants.printOut方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fatalError
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def fatalError(self, exception):
CDConstants.printOut( "___ - DEBUG ----- CDConstants: fatalError( exception=="+str(exception)+" )" , CDConstants.DebugExcessive )
QtGui.QMessageBox.information(self.treeWidget.window(),
"SAX Bookmarks",
"Parse error at line %d, column %d:\n%s" % (exception.lineNumber(), exception.columnNumber(), exception.message()))
return False
示例2: setImageSequenceDepthLabel
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def setImageSequenceDepthLabel(self, pImageSequenceDepthLabel):
self.imageSequenceDepthLabel.setText(pImageSequenceDepthLabel)
# also update the image selection range in the Image Sequence controls,
# remembering that the index starts at 0 so the max image index should be:
self.setMaxImageIndex(int(pImageSequenceDepthLabel)-1)
# self.controlsForImageSequence.setMaxImageIndex(int(pImageSequenceDepthLabel)-1)
CDConstants.printOut("___ - DEBUG ----- CDControlCellScene: setImageSequenceDepthLabel(pImageSequenceDepthLabel=="+str(pImageSequenceDepthLabel)+"): done", CDConstants.DebugVerbose )
示例3: setFixedRasterWidth
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def setFixedRasterWidth(self, pTheNewValue):
if pTheNewValue != self.thePIFFFixedRasterWidth:
self.thePIFFFixedRasterWidth = pTheNewValue
CDConstants.printOut("the PIFF fixed raster width is now = "+str(self.thePIFFFixedRasterWidth), CDConstants.DebugTODO )
# propagate the signal upstream, for example to parent objects:
self.signalPIFFGenerationModeHasChanged.emit( \
self.thePIFFGenerationMode, self.thePIFFFixedRasterWidth)
示例4: handleScaleZoomChanged
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def handleScaleZoomChanged(self, pValueString):
CDConstants.printOut( "the requested Input Image scale/zoom is = "+str(pValueString), CDConstants.DebugTODO )
lScaleZoom = pValueString
if lScaleZoom != self.theScaleZoom:
self.theScaleZoom = lScaleZoom
CDConstants.printOut( "the new Input Image scale/zoom will be = "+str(self.theScaleZoom), CDConstants.DebugTODO )
# propagate the signal upstream, for example to parent objects:
self.signalImageScaleZoomHasChanged.emit(self.theScaleZoom)
示例5: __handleImageScaleChanged
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def __handleImageScaleChanged(self, pValueString):
CDConstants.printOut( "the requested Input Image scale is = "+str(pValueString), CDConstants.DebugTODO )
lScaleFactor = pValueString
if lScaleFactor != self.__theImageScaleFactor:
self.__theImageScaleFactor = lScaleFactor
CDConstants.printOut( "the new Input Image scale will be = "+str(self.__theImageScaleFactor), CDConstants.DebugTODO )
# propagate the signal upstream, for example to parent objects:
self.signalImageScaleHasChanged.emit(self.__theImageScaleFactor)
示例6: handlePIFFGenerationModeHasChanged
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def handlePIFFGenerationModeHasChanged(self, pNewMode, pNewFixedRasterSize):
if (pNewMode != self.piffGenerationMode) or (pNewFixedRasterSize != self.piffFixedRasterWidth):
CDConstants.printOut("CDPreferences() - handlePIFFGenerationModeHasChanged(pNewMode=="+str(pNewMode)+", pNewFixedRasterSize=="+str(pNewFixedRasterSize)+" )", CDConstants.DebugTODO )
# change global variables AKA preferences:
self.piffGenerationMode = pNewMode
self.piffFixedRasterWidth = pNewFixedRasterSize
# automatically save preferences to disk:
self.writePreferencesToDisk()
示例7: setValue
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def setValue(self, pValue):
self.progressBar.setValue(pValue)
curVal = self.progressBar.value()
maxVal = self.progressBar.maximum()
lPercentage = (float(curVal) / float(maxVal)) * 100.0
self.percentageLabel.setText( QtCore.QString("... %1 %").arg(lPercentage, 0, 'g', 2) )
QtGui.QApplication.processEvents(QtCore.QEventLoop.ExcludeUserInputEvents)
CDConstants.printOut( "___ - DEBUG ----- CDImageNP.setValue( "+str(pValue)+" ) done." , CDConstants.DebugExcessive )
示例8: createChildItem
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def createChildItem(self, tagName):
CDConstants.printOut( "___ - DEBUG ----- CDConstants: createChildItem()" , CDConstants.DebugExcessive )
if self.item:
childItem = QtGui.QTreeWidgetItem(self.item)
else:
childItem = QtGui.QTreeWidgetItem(self.treeWidget)
childItem.setData(0, QtCore.Qt.UserRole, tagName)
return childItem
示例9: __init__
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def __init__(self,pString=None,pParent=None):
if (pString==None):
lString=QtCore.QString("CDControlSceneZoomToolbar QToolBar")
else:
lString=QtCore.QString(pString)
QtGui.QToolBar.__init__(self, lString, pParent)
# the class global keeping track of the current scene zoom value:
self.__theZoomFactor = "100%"
# ----------------------------------------------------------------
#
# QWidget setup (1) - windowing GUI setup for Scene Zoom controls:
#
# ----------------------------------------------------------------
#
# QWidget setup (2) - "Zoom" QGroupBox:
self.__theZoomGroupBox = QtGui.QGroupBox("Zoom Scene")
# self.__theZoomGroupBox.setPalette(QtGui.QPalette(QtGui.QColor(222,222,222)))
# self.__theZoomGroupBox.setAutoFillBackground(True)
# set the position of the QGroupBox's label:
self.__theZoomGroupBox.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom)
self.__theZoomGroupBox.setFlat(False)
self.__theZoomGroupBox.setLayout(QtGui.QHBoxLayout())
self.__theZoomGroupBox.layout().setMargin(0)
self.__theZoomGroupBox.layout().setSpacing(0)
self.__theZoomGroupBox.layout().setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
# a "combo box" pop-up menu to select the Zoom Scene factor:
self.__sceneZoomComboBox = QtGui.QComboBox()
self.__sceneZoomComboBox.addItems(["50%", "75%", "100%", "125%", "150%", "200%", "250%", "300%", "400%", "500%", "1000%", "2000%", "4000%"])
self.__sceneZoomComboBox.setCurrentIndex(2)
self.__sceneZoomComboBox.clearFocus()
self.__sceneZoomComboBox.setStatusTip("Zoom the Cell Scene view")
self.__sceneZoomComboBox.setToolTip("Zoom Cell Scene")
self.__sceneZoomComboBox.setFrame(False)
# call __handleSceneZoomChanged() when __sceneZoomComboBox changes index:
self.__sceneZoomComboBox.currentIndexChanged[str].connect(self.__handleSceneZoomChanged)
# add the combo box to the QGroupBox:
self.__theZoomGroupBox.layout().addWidget(self.__sceneZoomComboBox)
# finally add the QGroupBox to the QToolBar:
# self.addWidget(QtGui.QLabel("["))
self.addWidget(self.__theZoomGroupBox)
# self.addWidget(QtGui.QLabel("]"))
self.show()
CDConstants.printOut( "----- CDControlSceneZoomToolbar.__init__(pString=="+str(pString)+", pParent=="+str(pParent)+") done. -----", CDConstants.DebugExcessive )
示例10: __handleSceneZoomChanged
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def __handleSceneZoomChanged(self, pValueString):
CDConstants.printOut( "the requested Scene zoom is = "+str(pValueString), CDConstants.DebugTODO )
lZoomFactor = pValueString
if lZoomFactor != self.__theZoomFactor:
self.__theZoomFactor = lZoomFactor
CDConstants.printOut( "the new Scene zoom will be = "+str(self.__theZoomFactor), CDConstants.DebugTODO )
# propagate the signal upstream, for example to parent objects:
self.signalZoomFactorHasChanged.emit(self.__theZoomFactor)
示例11: isTheBackgroundAnImage
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def isTheBackgroundAnImage(self):
buttons = self.buttonGroupForBackgrounds.buttons()
for myButton in buttons:
CDConstants.printOut( " 123123123123123 = "+str(myButton)+" button has text "+str(myButton.text())+" ", CDConstants.DebugTODO )
if myButton.isChecked() == True:
lText = myButton.text()
if (lText == "Blue Grid") or (lText == "White Grid") or (lText == "Gray Grid") or (lText == "No Grid"):
return False
else:
return True
示例12: handleAreaOrEdgeButtonGroupClicked
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def handleAreaOrEdgeButtonGroupClicked(self, pChecked):
lImageSequenceProcessingMode = 0
if self.regionSeedsButton.isChecked():
lImageSequenceProcessingMode |= (1 << CDConstants.ImageSequenceUseAreaSeeds)
if self.regionEdgeButton.isChecked():
lImageSequenceProcessingMode |= (1 << CDConstants.ImageSequenceUse2DEdges)
if self.regionContoursButton.isChecked():
lImageSequenceProcessingMode |= (1 << CDConstants.ImageSequenceUse3DContours)
if self.regionVolumeButton.isChecked():
lImageSequenceProcessingMode |= (1 << CDConstants.ImageSequenceUse3DVolume)
if self.discretizeToBWModeButton.isChecked():
lImageSequenceProcessingMode |= (1 << CDConstants.ImageSequenceUseDiscretizedToBWMode)
# TODO add fourth mode here, in the sequence class, and in the rasterizer class:
#
# then TODO change PIFF numbering format printout specifically only for image sequence rasterization:
if lImageSequenceProcessingMode != self.theImageSequenceProcessingMode:
self.theImageSequenceProcessingMode = lImageSequenceProcessingMode
# bin() does not exist in Python 2.5:
if ((sys.version_info[0] >= 2) and (sys.version_info[1] >= 6)) :
CDConstants.printOut( "CDControlImageSequence - handleAreaOrEdgeButtonGroupClicked(), str(type(self.theImageSequenceProcessingMode))==["+str(type(self.theImageSequenceProcessingMode))+"], str(type(self.theImageSequenceProcessingMode).__name__)==["+str(type(self.theImageSequenceProcessingMode).__name__)+"], str(self.theImageSequenceProcessingMode)==["+str(self.theImageSequenceProcessingMode)+"], str(bin(int(self.theImageSequenceProcessingMode)))==["+str(bin(int(self.theImageSequenceProcessingMode)))+"]" , CDConstants.DebugTODO )
CDConstants.printOut("CDControlImageSequence - handleAreaOrEdgeButtonGroupClicked(), theImageSequenceProcessingMode is = " +str(bin(self.theImageSequenceProcessingMode)), CDConstants.DebugVerbose)
else:
CDConstants.printOut( "CDControlImageSequence - handleAreaOrEdgeButtonGroupClicked(), str(type(self.theImageSequenceProcessingMode))==["+str(type(self.theImageSequenceProcessingMode))+"], str(type(self.theImageSequenceProcessingMode).__name__)==["+str(type(self.theImageSequenceProcessingMode).__name__)+"], str(self.theImageSequenceProcessingMode)==["+str(self.theImageSequenceProcessingMode)+"], str(int(self.theImageSequenceProcessingMode))==["+str(int(self.theImageSequenceProcessingMode))+"]" , CDConstants.DebugTODO )
CDConstants.printOut("CDControlImageSequence - handleAreaOrEdgeButtonGroupClicked(), theImageSequenceProcessingMode is = " +str(self.theImageSequenceProcessingMode), CDConstants.DebugVerbose)
# propagate the signal upstream, for example to parent objects:
self.signalImageSequenceProcessingModeHasChanged.emit(self.theImageSequenceProcessingMode)
示例13: addActionToControlsForSceneItemEdit
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def addActionToControlsForSceneItemEdit(self, pAction):
# add an action to the QGroupBox:
lToolButton = QtGui.QToolButton(self)
lToolButton.setDefaultAction(pAction)
lToolButton.setCheckable(pAction.isCheckable())
lToolButton.setChecked(pAction.isChecked())
lToolButton.setIcon(pAction.icon())
lToolButton.setIconSize(QtCore.QSize(24, 24))
lToolButton.setToolTip(pAction.toolTip())
lToolButton.setStatusTip(pAction.toolTip() + " Scene Item")
self.itemEditGroupBox.layout().addWidget(lToolButton)
CDConstants.printOut( "___ - DEBUG ----- CDControlSceneItemEdit: addActionToControlsForSceneItemEdit("+ str(pAction) + ") done." , CDConstants.DebugTODO )
示例14: handleLayerButtonGroupClicked
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def handleLayerButtonGroupClicked(self, pChecked):
if self.pointerButton.isChecked():
lLayerMode = CDConstants.SceneModeMoveItem
elif self.resizeButton.isChecked():
lLayerMode = CDConstants.SceneModeResizeItem
elif self.imageLayerButton.isChecked():
lLayerMode = CDConstants.SceneModeImageLayer
elif self.imageSequenceButton.isChecked():
lLayerMode = CDConstants.SceneModeImageSequence
elif self.editClusterButton.isChecked():
lLayerMode = CDConstants.SceneModeEditCluster
if lLayerMode != self.theLayerMode:
self.theLayerMode = lLayerMode
CDConstants.printOut("CDControlLayerSelection - handleLayerButtonGroupClicked(), the layer mode is = " +str(self.theLayerMode), CDConstants.DebugVerbose)
# propagate the signal upstream, for example to parent objects:
self.signalLayersSelectionModeHasChanged.emit(self.theLayerMode)
示例15: handleLayerActionGroupTriggered
# 需要导入模块: from cdConstants import CDConstants [as 别名]
# 或者: from cdConstants.CDConstants import printOut [as 别名]
def handleLayerActionGroupTriggered(self, pChecked):
if self.pointerAction.isChecked():
lLayerMode = CDConstants.SceneModeMoveItem
elif self.resizeAction.isChecked():
lLayerMode = CDConstants.SceneModeResizeItem
elif self.imageLayerAction.isChecked():
lLayerMode = CDConstants.SceneModeImageLayer
elif self.imageSequenceAction.isChecked():
lLayerMode = CDConstants.SceneModeImageSequence
# elif self.editClusterAction.isChecked():
# lLayerMode = CDConstants.SceneModeEditCluster
if lLayerMode != self.selectedSceneMode:
self.selectedSceneMode = lLayerMode
CDConstants.printOut("CDModeSelectToolBar - handleLayerActionGroupTriggered(), the layer mode is = " +str(self.selectedSceneMode), CDConstants.DebugVerbose)
# propagate the signal upstream, for example to parent objects:
self.signalModeSelectToolbarChanged.emit(self.selectedSceneMode)