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


Python QtGui.QHBoxLayout方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def __init__(self,*args,**kwargs):
        super(QuadrotorWin,self).__init__(*args,**kwargs)
        self.toolBar = self.addToolBar('showSetting')
        self.trace_show = QtGui.QAction(QtGui.QIcon(get_source_name('icons/trace.gif')),
                                        'show trace',
                                        self)
        self.trace_show.triggered.connect(self.callback_show_trace)
        self.trace_showed = False
        self.vector_show = QtGui.QAction(QtGui.QIcon(get_source_name('icons/rotor_vector.gif')),
                                         'show rotation speed vector',self)
        self.vector_show.triggered.connect(self.callback_show_vector)
        self.vector_showed = False
        self.toolBar.addAction(self.trace_show)
        self.toolBar.addAction(self.vector_show)
        self.quadrotor_win_main_widget = QtGui.QWidget(self)
        self.quadrotor_win_main_layout = QtGui.QHBoxLayout() 
        self.quadrotor_win_main_widget.setLayout(self.quadrotor_win_main_layout)
        self.quadrotor_widget = QuadrotorWidget(self.quadrotor_win_main_widget)
        self.quadrotor_win_main_layout.addWidget(self.quadrotor_widget)
        self.setCentralWidget(self.quadrotor_win_main_widget)
        self.setWindowTitle("pyFlightAnalysis  Trace plot") 
开发者ID:Marxlp,项目名称:pyFlightAnalysis,代码行数:23,代码来源:widgets.py

示例2: init

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def init(self, width, height):
        self.rect = QtCore.QRect(0, 0, width, height)
        self.imageItem = pg.ImageItem()
        self.imageItem.setImage(None)

        self.graphicsScene = pg.GraphicsScene()
        self.graphicsScene.addItem(self.imageItem)

        self.graphicsView = pg.GraphicsView()
        self.graphicsView.setRenderHint(QtGui.QPainter.Antialiasing)
        self.graphicsView.setScene(self.graphicsScene)

        layout = QtGui.QHBoxLayout()
        layout.addWidget(self.graphicsView)
        self.setLayout(layout)
        self.setMaximumSize(width, height)
        self.setMinimumSize(width-10, height-10) 
开发者ID:FabianIsensee,项目名称:BatchViewer,代码行数:19,代码来源:batchviewer.py

示例3: initMaskFunctionControls

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def initMaskFunctionControls(self):
        self.maskFunctionControlslayout = QtGui.QHBoxLayout()
        labelsLayout = QtGui.QVBoxLayout()
        slidersLayout = QtGui.QVBoxLayout()
        self.maskFunctionControlslayout.addLayout(labelsLayout)
        self.maskFunctionControlslayout.addLayout(slidersLayout)
        def addSlider(label, changedFunction, minimum, maximum, value):
            labelWidget = QtGui.QLabel(label)
            labelsLayout.addWidget(labelWidget)
            slider = QtGui.QSlider(QtCore.Qt.Horizontal)
            slider.setMinimum(minimum)
            slider.setMaximum(maximum)
            slider.setValue(value)
            slider.sliderReleased.connect(changedFunction)
            slidersLayout.addWidget(slider)
            return slider, labelWidget
        
        self.targetModeWindowTDOASlider, self.targetModeWindowTDOALabel = addSlider('Center:', self.tdoaRegionChanged, 0, 100, 50)
        self.targetModeWindowWidthSlider, _ = addSlider('Width:', self.tdoaRegionChanged, 1, 101, 50)
        self.targetModeWindowBetaSlider, _ = addSlider('Shape:', self.tdoaRegionChanged, 0, 100, 50)
        self.targetModeWindowNoiseFloorSlider, _ = addSlider('Floor:', self.tdoaRegionChanged, 0, 100, 0) 
开发者ID:seanwood,项目名称:gcc-nmf,代码行数:23,代码来源:gccNMFInterface.py

示例4: initNMFControls

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def initNMFControls(self):
        self.nmfControlsLayout = QtGui.QHBoxLayout()
        self.nmfControlsLayout.addStretch(1)
        self.nmfControlsLayout.addWidget(QtGui.QLabel('Dictionary Size:'))
        self.dictionarySizeDropDown = QtGui.QComboBox()
        for dictionarySize in self.dictionarySizes:
            self.dictionarySizeDropDown.addItem( str(dictionarySize) )
        self.dictionarySizeDropDown.setMaximumWidth(75)
        self.dictionarySizeDropDown.setCurrentIndex(self.dictionarySizes.index(self.dictionarySize))
        self.dictionarySizeDropDown.currentIndexChanged.connect(self.dictionarySizeChanged)
        self.nmfControlsLayout.addWidget(self.dictionarySizeDropDown)
        self.nmfControlsLayout.addStretch(1)
        
        self.nmfControlsLayout.addWidget(QtGui.QLabel('Num Updates:'))
        self.numHUpdatesSpinBox = QtGui.QSpinBox()
        self.nmfControlsLayout.addWidget(self.numHUpdatesSpinBox)
        self.nmfControlsLayout.addStretch(1) 
开发者ID:seanwood,项目名称:gcc-nmf,代码行数:19,代码来源:gccNMFInterface.py

示例5: initLocalizationControls

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def initLocalizationControls(self):
        self.localizationControlsLayout = QtGui.QHBoxLayout()
        self.localizationControlsLayout.addStretch(3)
        self.localizationCheckBox = QtGui.QCheckBox('Enable Localization')
        self.localizationCheckBox.setChecked(self.localizationEnabled)
        self.localizationCheckBox.stateChanged.connect(self.localizationStateChanged)
        self.localizationControlsLayout.addWidget(self.localizationCheckBox)

        self.localizationControlsLayout.addStretch(1)
        self.localizationWindowSizeLabel = QtGui.QLabel('Sliding Window Size:')
        self.localizationControlsLayout.addWidget(self.localizationWindowSizeLabel)
        self.localziaitonWindowSizeSpinBox = QtGui.QSpinBox()
        self.localziaitonWindowSizeSpinBox.setMinimum(1)
        self.localziaitonWindowSizeSpinBox.setMaximum(128)
        self.localziaitonWindowSizeSpinBox.setValue(self.localizationWindowSize)
        self.localziaitonWindowSizeSpinBox.valueChanged.connect(self.localizationParamsChanged)
        self.localizationControlsLayout.addWidget(self.localziaitonWindowSizeSpinBox)
        self.localizationControlsLayout.addStretch(3) 
开发者ID:seanwood,项目名称:gcc-nmf,代码行数:20,代码来源:gccNMFInterface.py

示例6: initUIControls

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def initUIControls(self):
        self.uiConrolsWidget = QtGui.QWidget()
        buttonBarWidgetLayout = QtGui.QHBoxLayout(spacing=0)
        buttonBarWidgetLayout.setContentsMargins(0, 0, 0, 0)
        buttonBarWidgetLayout.setSpacing(0)
        self.uiConrolsWidget.setLayout(buttonBarWidgetLayout)
        
        def addButton(label, widget=None, function=None):
            button = QtGui.QPushButton(label)
            if function is None:
                button.clicked.connect(lambda: widget.setVisible(widget.isHidden()))
            else:
                button.clicked.connect(function)
            button.setStyleSheet('QPushButton {'
                                 'border-color: black;'
                                 'border-width: 5px;}')
            buttonBarWidgetLayout.addWidget(button)
            return button

        addButton('Info', function=self.toggleInfoViews)
        self.toggleSeparationButton = addButton(self.separationOnIconString, function=self.toggleSeparation)
        self.playPauseButton = addButton(self.playIconString, function=self.togglePlay) 
开发者ID:seanwood,项目名称:gcc-nmf,代码行数:24,代码来源:gccNMFInterface.py

示例7: set_buttons

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def set_buttons(self):
    self.button_layout = QtGui.QHBoxLayout()
    self.prev_button = QtGui.QPushButton('Previous Event')
    self.next_button = QtGui.QPushButton('Next Event')
    # self.catalog_button = QtGui.QPushButton("Save Catalog")
    self.next_button.clicked.connect(self.next_event)
    self.prev_button.clicked.connect(self.prev_event)
    # self.catalog_button.clicked.connect(self.save_catalog)

    self.button_layout.addWidget(self.prev_button)
    self.button_layout.addWidget(self.next_button)
    # self.button_layout.addWidget(self.catalog_button)

    self.layout.addLayout(self.button_layout) 
开发者ID:tperol,项目名称:ConvNetQuake,代码行数:16,代码来源:label_events.py

示例8: drawmain

# 需要导入模块: from pyqtgraph.Qt import QtGui [as 别名]
# 或者: from pyqtgraph.Qt.QtGui import QHBoxLayout [as 别名]
def drawmain(self):
        # the left contains the rows, the right the columns
        leftlayout = QtGui.QVBoxLayout()
        rightlayout = QtGui.QHBoxLayout()
        mainlayout = QtGui.QHBoxLayout()
        mainlayout.addLayout(leftlayout)
        mainlayout.addLayout(rightlayout)
        self.setLayout(mainlayout)

        # the section 'slider' is treated as the first row
        # this is only for backward compatibility
        section = 'slider'
        if config.has_section(section):
            sectionlayout = QtGui.QHBoxLayout()
            self.drawpanel(sectionlayout, config.items(section))
            leftlayout.addLayout(sectionlayout)

        for row in range(0, 16):
            section = 'row%d' % (row + 1)
            if config.has_section(section):
                sectionlayout = QtGui.QHBoxLayout()
                self.drawpanel(sectionlayout, config.items(section))
                leftlayout.addLayout(sectionlayout)

        # the section 'button' is treated as the first column
        # this is only for backward compatibility
        section = 'button'
        if config.has_section(section):
            sectionlayout = QtGui.QVBoxLayout()
            self.drawpanel(sectionlayout, config.items(section))
            rightlayout.addLayout(sectionlayout)

        for column in range(0, 16):
            section = 'column%d' % (column + 1)
            if config.has_section(section):
                sectionlayout = QtGui.QVBoxLayout()
                self.drawpanel(sectionlayout, config.items(section))
                rightlayout.addLayout(sectionlayout) 
开发者ID:eegsynth,项目名称:eegsynth,代码行数:40,代码来源:inputcontrol.py


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