当前位置: 首页>>代码示例>>Python>>正文


Python QtBlissGraph.setSizePolicy方法代码示例

本文整理汇总了Python中PyMca.QtBlissGraph.QtBlissGraph.setSizePolicy方法的典型用法代码示例。如果您正苦于以下问题:Python QtBlissGraph.setSizePolicy方法的具体用法?Python QtBlissGraph.setSizePolicy怎么用?Python QtBlissGraph.setSizePolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyMca.QtBlissGraph.QtBlissGraph的用法示例。


在下文中一共展示了QtBlissGraph.setSizePolicy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: EnergyScanBrickPX2

# 需要导入模块: from PyMca.QtBlissGraph import QtBlissGraph [as 别名]
# 或者: from PyMca.QtBlissGraph.QtBlissGraph import setSizePolicy [as 别名]
class EnergyScanBrickPX2(BlissWidget):
    STATES = {
        'error': QWidget.red,
        'ok': QWidget.green,
        'progress': QWidget.yellow
    }

    def __init__(self, *args):
        BlissWidget.__init__(self, *args)

        self.energyScan = None
        self.scanObject = None
        self.element = None

        self.sessionId = None
        self.blSampleId = None
        self.scanParameters = {}
        self.archive_directory = None

        self.addProperty('mnemonic', 'string', '')
        self.addProperty('icons', 'string', '')
        self.addProperty('formatString', 'formatString', '##.####')
        self.addProperty('decimalPlaces', 'string', '4')

        self.defineSlot('setDirectory', ())
        self.defineSlot('setPrefix', ())
        self.defineSlot('setElement', ())
        self.defineSlot('setSample', ())
        self.defineSlot('setSession', ())

        self.defineSignal('energyScanning', ())
        self.defineSignal('energyScanConnected', ())
        self.defineSignal('energyScanCanMove', ())
        self.defineSignal('edgeScanEnergies', ())
        self.defineSignal('addNewPoint', ())
        self.defineSignal('newScan', ())
        self.defineSignal('setDirectory', ())
        self.defineSignal('setValues', ())

        self.parametersBox = QHGroupBox("Parameters", self)
        # self.parametersBox.hide()
        self.parametersBox.setInsideMargin(4)
        self.parametersBox.setInsideSpacing(2)
        self.parametersBox.setCheckable(True)
#        self.parametersBox.setChecked(False)
        self.parametersBox.setChecked(True)

        QLabel("Prefix:", self.parametersBox)
        self.prefixInput = QLineEdit(self.parametersBox)
        self.prefixInput.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        QObject.connect(
            self.prefixInput,
            SIGNAL('textChanged(const QString &)'),
            self.prefixChanged)
        QLabel("Directory:", self.parametersBox)
        self.directoryInput = QLineEdit(self.parametersBox)
        self.directoryInput.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        QObject.connect(
            self.directoryInput,
            SIGNAL('textChanged(const QString &)'),
            self.directoryChanged)

        self.browseButton = QToolButton(self.parametersBox)
        self.browseButton.setTextLabel("Browse")
        self.browseButton.setUsesTextLabel(True)
        self.browseButton.setTextPosition(QToolButton.BesideIcon)
        QObject.connect(
            self.browseButton,
            SIGNAL("clicked()"),
            self.browseButtonClicked)

        self.scanBox = QHGroupBox("Energy scan", self)
        self.scanBox.setInsideMargin(4)
        self.scanBox.setInsideSpacing(2)
        # self.scanBox.hide()
        self.startScanButton = MenuButton(self.scanBox, "Start scan")
        # self.startScanButton.hide()
        self.connect(
            self.startScanButton,
            PYSIGNAL('executeCommand'),
            self.startEnergyScan)
        self.connect(
            self.startScanButton,
            PYSIGNAL('cancelCommand'),
            self.cancelEnergyScan)

        self.statusBox = QHGroupBox("(no element)", self.scanBox)
        # self.statusBox.hide()
        # self.statusBox.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.MinimumExpanding)
        self.statusBox.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        self.statusBox.setAlignment(QGroupBox.AlignCenter)
        self.scanStatus = QLabel(self.statusBox)
        self.scanStatus.setSizePolicy(
            QSizePolicy.Expanding,
            QSizePolicy.MinimumExpanding)
        self.scanStatus.setAlignment(QLabel.AlignCenter)

        box4 = QVBox(self.scanBox)
        peakLabel = QLabel("Peak:", box4)
        peakLabel.setAlignment(QLabel.AlignHCenter | QLabel.AlignBottom)
#.........这里部分代码省略.........
开发者ID:IvarsKarpics,项目名称:mxcube,代码行数:103,代码来源:EnergyScanBrickPX2.py


注:本文中的PyMca.QtBlissGraph.QtBlissGraph.setSizePolicy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。