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


Python QSplitter.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
 def __init__(self, parent):
     QSplitter.__init__(self, parent)
     self.imagelist = QListWidget(self)
     self.addWidget(self.imagelist)
     self.properties = DataSetEditGroupBox(_("Properties"), ImageParam)
     self.properties.setEnabled(False)
     self.addWidget(self.properties)
开发者ID:HaMF,项目名称:guiqwt,代码行数:9,代码来源:simple_window.py

示例2: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
 def __init__(self, parent):
     QSplitter.__init__(self, parent)
     # self.lineList = QListWidget(self)
     # self.addWidget(self.lineList)
     self.properties = DataSetEditGroupBox(_("Properties"), DAQParam)
     self.properties.setEnabled(True)
     self.addWidget(self.properties)
开发者ID:bhclowers,项目名称:WIPYDAQ,代码行数:9,代码来源:wipy_gui_v3.py

示例3: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
 def __init__(self, package, parent=None):
     QSplitter.__init__(self, parent)
     self.setWindowTitle(_("Tests - %s module") % package.__name__)
     self.setWindowIcon(get_icon("%s.svg" % package.__name__, "guidata.svg"))
     
     test_package_name = '%s.tests' % package.__name__
     _temp = __import__(test_package_name)
     test_package = sys.modules[test_package_name]
     
     tests = get_tests(test_package)
     listwidget = QListWidget(self)
     listwidget.addItems([osp.basename(test.filename) for test in tests])
     
     self.properties = TestPropertiesWidget(self)
     
     self.addWidget(listwidget)
     self.addWidget(self.properties)
     
     self.properties.run_button.clicked.connect(
                             lambda: tests[listwidget.currentRow()].run())
     self.properties.quit_button.clicked.connect(self.close)
     listwidget.currentRowChanged.connect(
                         lambda row: self.properties.set_item(tests[row]))
     listwidget.itemActivated.connect(
                         lambda: tests[listwidget.currentRow()].run())
     listwidget.setCurrentRow(0)
     
     QShortcut(QKeySequence("Escape"), self, self.close)
         
     self.setSizes([150, 1])
     self.setStretchFactor(1, 1)
     self.resize(QSize(950, 600))
     self.properties.set_item(tests[0])
开发者ID:stonebig,项目名称:guidata,代码行数:35,代码来源:guitest.py

示例4: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
    def __init__(self, parent=None):
        QSplitter.__init__(self, parent)
        self.setOrientation(Qt.Vertical)
        self.optimization_input = DataSetEditGroupBox("Optimization", OptimizationInput)
        self.addWidget(self.optimization_input)
        self.connect(self.optimization_input, SIGNAL("apply_button_clicked()"), self.start_opt)

        plot.ioff()
        figure = plot.figure()
        self.addWidget(figure.canvas.manager.window)
开发者ID:nicoddemus,项目名称:py4eng-course,代码行数:12,代码来源:gui.py

示例5: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
 def __init__(self, manager, parent=None):
     QSplitter.__init__(self, Qt.Horizontal, parent)
     self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
     self.manager = manager
     self.plots = []
     self.itemlist = None
     main = QWidget()
     self.plotlayout = QGridLayout()
     main.setLayout(self.plotlayout)
     self.addWidget(main)
开发者ID:HaMF,项目名称:guiqwt,代码行数:12,代码来源:plot.py

示例6: __init__

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

        QSplitter.__init__(self, parent)
        self.setWindowTitle(MAIN_WINDOW_TITLE)
        self.setWindowIcon(get_icon("agent.svg"))
        
        self.sysTray = SystemTray(self)

        self.connect(self.sysTray, SIGNAL("activated(QSystemTrayIcon::ActivationReason)"), self.__icon_activated)

        checks = get_checks()
        datadog_conf = DatadogConf(get_config_path(), description="Agent settings file: datadog.conf")
        self.log_file = LogFile()

        listwidget = QListWidget(self)
        listwidget.addItems([osp.basename(check.module_name).replace("_", " ").title() for check in checks])
        
        self.properties = PropertiesWidget(self)
        
        self.addWidget(listwidget)
        self.addWidget(self.properties)
        
        self.connect(self.properties.enable_button, SIGNAL("clicked()"),
                     lambda: enable_check(self.properties))

        self.connect(self.properties.disable_button, SIGNAL("clicked()"),
                     lambda: disable_check(self.properties))

        self.connect(self.properties.save_button, SIGNAL("clicked()"),
                     lambda: save_file(self.properties))

        self.connect(listwidget, SIGNAL('currentRowChanged(int)'),
                     lambda row: self.properties.set_item(checks[row]))

        self.connect(self.properties.edit_datadog_conf_button, SIGNAL('clicked()'),
                     lambda: self.properties.set_datadog_conf(datadog_conf))

        self.connect(self.properties.view_log_button, SIGNAL('clicked()'),
                     lambda: self.properties.set_log_file(self.log_file))

        self.manager_menu = Menu(self)
        self.connect(self.properties.menu_button, SIGNAL("clicked()"),
            lambda: self.manager_menu.popup(self.properties.menu_button.mapToGlobal(QPoint(0,0))))


        listwidget.setCurrentRow(0)
        
        self.setSizes([150, 1])
        self.setStretchFactor(1, 1)
        self.resize(QSize(950, 600))
        self.properties.set_datadog_conf(datadog_conf)

        self.do_refresh()
开发者ID:arthurnn,项目名称:dd-agent,代码行数:55,代码来源:gui.py

示例7: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
    def __init__(self, parent=None):
        QSplitter.__init__(self, parent)
        self.setOrientation(Qt.Vertical)
        self.curve = None
        plot.ioff() # Must call plot.draw to update
        self.figure = plot.figure()
        self.plot = self.figure.gca()

        # Set "num_of_steps" as a trigger to update the plot
        NumericalInput.num_of_steps.set_prop("display", callback=self.plot_callback)
        self.numerical_input = DataSetEditGroupBox("Numerical", NumericalInput, show_button=False)
        self.addWidget(self.numerical_input)
        self.addWidget(self.figure.canvas.manager.window)
开发者ID:ESSS,项目名称:py4eng-course,代码行数:15,代码来源:linconvection1d_gui.py

示例8: __init__

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

        QSplitter.__init__(self, parent)
        self.setWindowTitle(MAIN_WINDOW_TITLE)
        self.setWindowIcon(get_icon("agent.svg"))

        self.sysTray = SystemTray(self)

        self.connect(self.sysTray, SIGNAL("activated(QSystemTrayIcon::ActivationReason)"), self.__icon_activated)

        checks = get_checks()
        datadog_conf = DatadogConf(get_config_path(), description="Agent settings file: datadog.conf")

        self.forwarder_log_file = ForwarderLogFile()
        self.collector_log_file = CollectorLogFile()
        self.dogstatsd_log_file = DogstatsdLogFile()
        self.jmxfetch_log_file = JMXFetchLogFile()

        listwidget = QListWidget(self)
        listwidget.addItems([osp.basename(check.module_name).replace("_", " ").title() for check in checks])

        self.properties = PropertiesWidget(self)

        self.setting_button = QPushButton(get_icon("info.png"), "Logs and Status", self)
        self.menu_button = QPushButton(get_icon("settings.png"), "Actions", self)
        self.settings = [
            (
                "Forwarder Logs",
                lambda: [
                    self.properties.set_log_file(self.forwarder_log_file),
                    self.show_html(self.properties.group_code, self.properties.html_window, False),
                ],
            ),
            (
                "Collector Logs",
                lambda: [
                    self.properties.set_log_file(self.collector_log_file),
                    self.show_html(self.properties.group_code, self.properties.html_window, False),
                ],
            ),
            (
                "Dogstatsd Logs",
                lambda: [
                    self.properties.set_log_file(self.dogstatsd_log_file),
                    self.show_html(self.properties.group_code, self.properties.html_window, False),
                ],
            ),
            (
                "JMX Fetch Logs",
                lambda: [
                    self.properties.set_log_file(self.jmxfetch_log_file),
                    self.show_html(self.properties.group_code, self.properties.html_window, False),
                ],
            ),
            (
                "Agent Status",
                lambda: [
                    self.properties.html_window.setHtml(self.properties.html_window.latest_status()),
                    self.show_html(self.properties.group_code, self.properties.html_window, True),
                    self.properties.set_status(),
                ],
            ),
        ]

        self.agent_settings = QPushButton(get_icon("edit.png"), "Settings", self)
        self.connect(
            self.agent_settings,
            SIGNAL("clicked()"),
            lambda: [
                self.properties.set_datadog_conf(datadog_conf),
                self.show_html(self.properties.group_code, self.properties.html_window, False),
            ],
        )

        self.setting_menu = SettingMenu(self.settings)
        self.connect(
            self.setting_button,
            SIGNAL("clicked()"),
            lambda: self.setting_menu.popup(self.setting_button.mapToGlobal(QPoint(0, 0))),
        )

        self.manager_menu = Menu(self)
        self.connect(
            self.menu_button,
            SIGNAL("clicked()"),
            lambda: self.manager_menu.popup(self.menu_button.mapToGlobal(QPoint(0, 0))),
        )

        holdingBox = QGroupBox("", self)
        Box = QVBoxLayout(self)
        Box.addWidget(self.agent_settings)
        Box.addWidget(self.setting_button)
        Box.addWidget(self.menu_button)
        Box.addWidget(listwidget)
        holdingBox.setLayout(Box)

        self.addWidget(holdingBox)
        self.addWidget(self.properties)

        self.connect(self.properties.enable_button, SIGNAL("clicked()"), lambda: enable_check(self.properties))
#.........这里部分代码省略.........
开发者ID:hutchic,项目名称:dd-agent,代码行数:103,代码来源:gui.py

示例9: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [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

示例10: __init__

# 需要导入模块: from guidata.qt.QtGui import QSplitter [as 别名]
# 或者: from guidata.qt.QtGui.QSplitter import __init__ [as 别名]
    def __init__(self, parent=None, title="",
                 xlabel=("", ""), ylabel=("", ""), zlabel=None,
                 xunit=("", ""), yunit=("", ""), zunit=None, yreverse=True,
                 colormap="jet", aspect_ratio=1.0, lock_aspect_ratio=True,
                 show_contrast=False, show_itemlist=False, show_xsection=False,
                 show_ysection=False, xsection_pos="top", ysection_pos="right",
                 gridparam=None, curve_antialiasing=None, **kwargs):
        if PYQT5:
            super(BaseImageWidget, self).__init__(parent, **kwargs)
            self.setOrientation(Qt.Vertical)
        else:
            QSplitter.__init__(self, Qt.Vertical, parent)
        
        self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        
        self.sub_splitter = QSplitter(Qt.Horizontal, self)
        self.plot = ImagePlot(parent=self, title=title,
                              xlabel=xlabel, ylabel=ylabel, zlabel=zlabel,
                              xunit=xunit, yunit=yunit, zunit=zunit,
                              yreverse=yreverse, aspect_ratio=aspect_ratio,
                              lock_aspect_ratio=lock_aspect_ratio,
                              gridparam=gridparam)
        if curve_antialiasing is not None:
            self.plot.set_antialiasing(curve_antialiasing)

        from guiqwt.cross_section import YCrossSection
        self.ycsw = YCrossSection(self, position=ysection_pos,
                                  xsection_pos=xsection_pos)
        self.ycsw.setVisible(show_ysection)
        
        from guiqwt.cross_section import XCrossSection
        self.xcsw = XCrossSection(self)
        self.xcsw.setVisible(show_xsection)
        
        self.xcsw.SIG_VISIBILITY_CHANGED.connect(self.xcsw_is_visible)
        
        self.xcsw_splitter = QSplitter(Qt.Vertical, self)
        if xsection_pos == "top":
            self.xcsw_splitter.addWidget(self.xcsw)
            self.xcsw_splitter.addWidget(self.plot)
        else:
            self.xcsw_splitter.addWidget(self.plot)
            self.xcsw_splitter.addWidget(self.xcsw)
        self.xcsw_splitter.splitterMoved.connect(
                                 lambda pos, index: self.adjust_ycsw_height())
        
        self.ycsw_splitter = QSplitter(Qt.Horizontal, self)
        if ysection_pos == "left":
            self.ycsw_splitter.addWidget(self.ycsw)
            self.ycsw_splitter.addWidget(self.xcsw_splitter)
        else:
            self.ycsw_splitter.addWidget(self.xcsw_splitter)
            self.ycsw_splitter.addWidget(self.ycsw)
            
        configure_plot_splitter(self.xcsw_splitter,
                                decreasing_size=xsection_pos == "bottom")
        configure_plot_splitter(self.ycsw_splitter,
                                decreasing_size=ysection_pos == "right")
        
        self.sub_splitter.addWidget(self.ycsw_splitter)
        
        self.itemlist = PlotItemList(self)
        self.itemlist.setVisible(show_itemlist)
        self.sub_splitter.addWidget(self.itemlist)
        
        # Contrast adjustment (Levels histogram)
        from guiqwt.histogram import ContrastAdjustment
        self.contrast = ContrastAdjustment(self)
        self.contrast.setVisible(show_contrast)
        self.addWidget(self.contrast)
        
        configure_plot_splitter(self)
        configure_plot_splitter(self.sub_splitter)
开发者ID:alimuldal,项目名称:guiqwt,代码行数:75,代码来源:plot.py


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