當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。