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


Python QSplitter.setOrientation方法代码示例

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


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

示例1: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import setOrientation [as 别名]
    def __init__(self, parent, toolbar):
        QSplitter.__init__(self, parent)
        # QTabWidget.__init__(self, parent)
        self.setContentsMargins(10, 10, 10, 10)
        self.setOrientation(Qt.Vertical)

        linelistwithproperties = LineListWithProperties(self)
        # self.addWidget(linelistwithproperties)
        self.lineList = linelistwithproperties.lineList
        self.connect(self.lineList, SIGNAL("currentRowChanged(int)"),
                     self.current_item_changed)
        self.connect(self.lineList, SIGNAL("itemSelectionChanged()"),
                     self.selection_changed)
        self.curveProperties = linelistwithproperties.properties
        self.connect(self.curveProperties, SIGNAL("apply_button_clicked()"),
                     self.curve_properties_changed)
        
        self.curvewidget = CurveWidget(self)
        self.curvewidget.register_all_curve_tools()
        self.curve_item = make.curve([], [], color='b')
        self.peak_item = make.curve([],[], markerfacecolor = 'r', marker = 'o', curvestyle="NoCurve")#, alpha = 0.75)
        self.curvewidget.plot.add_item(self.curve_item)
        self.curvewidget.plot.add_item(self.peak_item)
        self.curvewidget.plot.set_antialiasing(True)
        self.addWidget(self.curvewidget)
        
        self.lines = [] # List of ImageParam instances
        self.peaks = []

        
        vSplitter = QSplitter()
        vSplitter.setOrientation(Qt.Vertical)
        daqParamProperties = DAQParamsProperties(self)
        self.daqProperties = daqParamProperties.properties
        self.connect(self.daqProperties, SIGNAL("apply_button_clicked()"), self.daq_properties_changed)
        # daqButton = QPushButton("Upload DAQ Params")
        vSplitter.addWidget(daqParamProperties)
        # vSplitter.addWidget(daqButton)
        tabWidget = QTabWidget()
        tab1 = tabWidget.addTab(linelistwithproperties, "Curve Params")
        tab2 = tabWidget.addTab(vSplitter, "DAQ Params")
        
        self.addWidget(tabWidget)

        self.setStretchFactor(0, 0)
        self.setStretchFactor(1, 1)
        self.setHandleWidth(10)
        self.setSizes([1, 2])
开发者ID:bhclowers,项目名称:WIPYDAQ,代码行数:50,代码来源:wipy_gui_v3.py

示例2: setupMainWidget

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import setOrientation [as 别名]
    def setupMainWidget(self) :
        self.main_dock = QDockWidget(_(''))
        self.addDockWidget(Qt.BottomDockWidgetArea, self.main_dock)
        self.dockTab = QTabWidget()
        dockSplitter = QSplitter()
        dockSplitter.setOrientation(Qt.Vertical)
        #-----
        toolbar = self.addToolBar("Curve")
        self.plotWidget = CentralWidget(self, toolbar)        # Set central widget:
        self.dockTab.addTab(self.plotWidget, "Plot")
        #-----
        self.statusEdit = QTextEdit()
        self.statusEdit.setText("Status updates to go here.")
        self.statusEdit.setEnabled(False)
        self.statusEdit.moveCursor(QTextCursor.End)
        #-----
        self.testButton = QPushButton("Test Button")
        self.testButton.clicked.connect(self.__testClick__)
        dockSplitter.addWidget(self.testButton)
        dockSplitter.addWidget(self.statusEdit)
        self.dockTab.addTab(dockSplitter, "Status Info")

        if DockableConsole is None:
            self.console = None
        else:
            import time, scipy.signal as sps, scipy.ndimage as spi
            import sys, os
            import numpy as np
            ns = {'np': np, 'sps': sps, 'spi': spi,
                  'os': os, 'sys': sys, 'time': time}
            msg = "Example: np.arange(20)\n"\
                  "Modules imported at startup: "\
                  "os, sys, os.path as osp, time, "\
                  "numpy as np, scipy.signal as sps, scipy.ndimage as spi"
            self.console = DockableConsole(self, namespace=ns, message=msg)
            # console_dock = QDockWidget(_('Console'))
            # self.addDockWidget(Qt.BottomDockWidgetArea, console_dock)
            # console_dock.setWidget(self.console)
            self.dockTab.addTab(self.console, "Console")
            # dockSplitter.addWidget(self.console)


        # main_dock.setWidget(dockSplitter)
        self.main_dock.setWidget(self.dockTab)
开发者ID:bhclowers,项目名称:WIPYDAQ,代码行数:46,代码来源:wipy_gui_v3.py

示例3: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import setOrientation [as 别名]
    def __init__(self, parent):
        QSplitter.__init__(self, parent)

        self.name = 'subject'
        self.age = 26
        self.peakL = 559
        self.peakM = 530
        self.ref_LED = 10
        self.LED1 = 15
        self.LED2 = 13.9
        self.LED3 = 40.45
        self.L_OD = 0.35
        self.M_OD = 0.22

        self.setContentsMargins(10, 10, 10, 10)
        self.setOrientation(Qt.Vertical)
        
        line1 = QSplitter()
        line1.setOrientation(Qt.Horizontal)
        line2 = QSplitter()
        line2.setOrientation(Qt.Horizontal)
        line3 = QSplitter()
        line3.setOrientation(Qt.Horizontal)
        line4 = QSplitter()
        line4.setOrientation(Qt.Horizontal)
        line5 = QSplitter()
        line5.setOrientation(Qt.Horizontal)
        line6 = QSplitter()
        line6.setOrientation(Qt.Horizontal)
        line7 = QSplitter()
        line7.setOrientation(Qt.Horizontal)
        line8 = QSplitter()
        line8.setOrientation(Qt.Horizontal)

        self.txt1 = QLineEdit(str(self.name))
        self.txt1.setMaximumWidth(100)
        self.txt2 = QLineEdit(str(self.age))
        self.txt2.setMaximumWidth(100)
        self.txt3 = QLineEdit(str(self.peakL))
        self.txt3.setMaximumWidth(100)
        self.txt4 = QLineEdit(str(self.peakM))
        self.txt4.setMaximumWidth(100)
        self.txt5 = QLineEdit(str(self.ref_LED))
        self.txt5.setMaximumWidth(100)
        self.txt6 = QLineEdit()
        self.txt6.setMaximumWidth(100)
        self.txt7 = QLineEdit()
        self.txt7.setMaximumWidth(100)
        self.txt8 = QLineEdit()
        self.txt8.setMaximumWidth(100)

        label1 = QLabel('ID')
        label2 = QLabel('age')
        label3 = QLabel('peak L')
        label4 = QLabel('peak M')
        label5 = QLabel('ref LED')
        label6 = QLabel('LED1')
        label7 = QLabel('LED2')
        label8 = QLabel('LED3')

        line1.addWidget(label1)
        line2.addWidget(label2)
        line3.addWidget(label3)
        line4.addWidget(label4)
        line5.addWidget(label5)
        line6.addWidget(label6)
        line7.addWidget(label7)
        line8.addWidget(label8)

        line1.addWidget(self.txt1)
        line2.addWidget(self.txt2)
        line3.addWidget(self.txt3)
        line4.addWidget(self.txt4)
        line5.addWidget(self.txt5)
        line6.addWidget(self.txt6)
        line7.addWidget(self.txt7)
        line8.addWidget(self.txt8)

        self.load_button = QPushButton('load data')
        self.load_button.clicked.connect(self.load) 

        self.analyze_button = QPushButton('analyze')
        self.analyze_button.clicked.connect(self.analyze) 

        # add left side of the bottom panel
        left_side = QSplitter()
        left_side.setOrientation(Qt.Vertical)
        left_side.addWidget(self.load_button)
        left_side.addWidget(line1)
        left_side.addWidget(line2)
        left_side.addWidget(line3)
        left_side.addWidget(line4)
        left_side.addWidget(line5)
        left_side.addWidget(line6)
        left_side.addWidget(line7)
        left_side.addWidget(line8)
        left_side.addWidget(self.analyze_button)


        # set up right side of the bottom panel
#.........这里部分代码省略.........
开发者ID:bps10,项目名称:LM-Ratio,代码行数:103,代码来源:gui_LMratio.py


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