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


Python QtGui.QVBoxLayout类代码示例

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


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

示例1: __init__

 def __init__(self, parent, widgetclass, toolbar = None):
     super(myDockableWidget, self).__init__(parent)
     self.toolbar = toolbar
     layout = QVBoxLayout()
     self.widget = widgetclass()
     layout.addWidget(self.widget)
     self.setLayout(layout)
开发者ID:darkopetrovic,项目名称:ZephyrApp,代码行数:7,代码来源:gui.py

示例2: __init__

    def __init__(self, wintitle):
        super(Window, self).__init__()
        self.default_tool = None
        self.plots = []
        self.itemlist = PlotItemList(None)
        self.contrast = ContrastAdjustment(None)
        self.xcsw = XCrossSection(None)
        self.ycsw = YCrossSection(None)
        
        self.manager = PlotManager(self)
        self.toolbar = QToolBar(_("Tools"), self)
        self.manager.add_toolbar(self.toolbar, "default")
        self.toolbar.setMovable(True)
        self.toolbar.setFloatable(True)
        self.addToolBar(Qt.TopToolBarArea, self.toolbar)

        frame = QFrame(self)
        self.setCentralWidget(frame)
        self.layout = QGridLayout()
        layout = QVBoxLayout(frame)
        frame.setLayout(layout)
        layout.addLayout(self.layout)
        self.frame = frame

        self.setWindowTitle(wintitle)
        self.setWindowIcon(get_icon('guiqwt.svg'))
开发者ID:stonebig,项目名称:guiqwt-1,代码行数:26,代码来源:pyplot.py

示例3: DataSetShowGroupBox

class DataSetShowGroupBox(QGroupBox):
    """Group box widget showing a read-only DataSet"""
    def __init__(self, label, klass, wordwrap=False, **kwargs):
        QGroupBox.__init__(self, label)
        self.klass = klass
        self.dataset = klass(**kwargs)
        self.layout = QVBoxLayout()
        if self.dataset.get_comment():
            label = QLabel(self.dataset.get_comment())
            label.setWordWrap(wordwrap)
            self.layout.addWidget(label)
        self.grid_layout = QGridLayout()
        self.layout.addLayout(self.grid_layout)
        self.setLayout(self.layout)
        self.edit = self.get_edit_layout()
        
    def get_edit_layout(self):
        """Return edit layout"""
        return DataSetShowLayout(self, self.dataset, self.grid_layout) 

    def get(self):
        """Update group box contents from data item values"""
        for widget in self.edit.widgets:
            widget.build_mode = True
            widget.get()
            widget.build_mode = False
开发者ID:Alwnikrotikz,项目名称:guidata,代码行数:26,代码来源:qtwidgets.py

示例4: __init__

    def __init__(self, parent, new_size, old_size, text="", keep_original_size=False):
        QDialog.__init__(self, parent)

        intfunc = lambda tup: [int(val) for val in tup]
        if intfunc(new_size) == intfunc(old_size):
            self.keep_original_size = True
        else:
            self.keep_original_size = keep_original_size
        self.width, self.height = new_size
        self.old_width, self.old_height = old_size
        self.ratio = self.width / self.height

        layout = QVBoxLayout()
        self.setLayout(layout)

        formlayout = QFormLayout()
        layout.addLayout(formlayout)

        if text:
            label = QLabel(text)
            label.setAlignment(Qt.AlignHCenter)
            formlayout.addRow(label)

        self.w_edit = w_edit = QLineEdit(self)
        w_valid = QIntValidator(w_edit)
        w_valid.setBottom(1)
        w_edit.setValidator(w_valid)

        self.h_edit = h_edit = QLineEdit(self)
        h_valid = QIntValidator(h_edit)
        h_valid.setBottom(1)
        h_edit.setValidator(h_valid)

        zbox = QCheckBox(_("Original size"), self)

        formlayout.addRow(_("Width (pixels)"), w_edit)
        formlayout.addRow(_("Height (pixels)"), h_edit)
        formlayout.addRow("", zbox)

        formlayout.addRow(_("Original size:"), QLabel("%d x %d" % old_size))
        self.z_label = QLabel()
        formlayout.addRow(_("Zoom factor:"), self.z_label)

        # Button box
        self.bbox = bbox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
        bbox.accepted.connect(self.accept)
        bbox.rejected.connect(self.reject)
        layout.addWidget(bbox)

        self.w_edit.setText(str(self.width))
        self.h_edit.setText(str(self.height))
        self.update_widgets()

        self.setWindowTitle(_("Resize"))

        w_edit.textChanged.connect(self.width_changed)
        h_edit.textChanged.connect(self.height_changed)
        zbox.toggled.connect(self.toggled_no_zoom)
        zbox.setChecked(self.keep_original_size)
开发者ID:githubhjz,项目名称:guiqwt,代码行数:59,代码来源:resizedialog.py

示例5: __init__

    def __init__(self, parent, new_size, old_size, text=""):
        QDialog.__init__(self, parent)
        
        self.keep_original_size = False
        self.width, self.height = new_size
        self.old_width, self.old_height = old_size
        self.ratio = self.width/self.height

        layout = QVBoxLayout()
        self.setLayout(layout)
        
        formlayout = QFormLayout()
        layout.addLayout(formlayout)
        
        if text:
            label = QLabel(text)
            label.setAlignment(Qt.AlignHCenter)
            formlayout.addRow(label)
        
        self.w_edit = w_edit = QLineEdit(self)
        w_valid = QIntValidator(w_edit)
        w_valid.setBottom(1)
        w_edit.setValidator(w_valid)
                     
        self.h_edit = h_edit = QLineEdit(self)
        h_valid = QIntValidator(h_edit)
        h_valid.setBottom(1)
        h_edit.setValidator(h_valid)
        
        zbox = QCheckBox(_("Original size"), self)

        formlayout.addRow(_("Width (pixels)"), w_edit)
        formlayout.addRow(_("Height (pixels)"), h_edit)
        formlayout.addRow('', zbox)
        
        formlayout.addRow(_("Original size:"), QLabel("%d x %d" % old_size))
        self.z_label = QLabel()
        formlayout.addRow(_("Zoom factor:"), self.z_label)
        
        # Button box
        self.bbox = bbox = QDialogButtonBox(QDialogButtonBox.Ok|
                                            QDialogButtonBox.Cancel)
        self.connect(bbox, SIGNAL("accepted()"), SLOT("accept()"))
        self.connect(bbox, SIGNAL("rejected()"), SLOT("reject()"))
        layout.addWidget(bbox)

        self.w_edit.setText(str(self.width))
        self.h_edit.setText(str(self.height))
        self.update_widgets()
        
        self.setWindowTitle(_("Resize"))
        
        self.connect(w_edit, SIGNAL("textChanged(QString)"),
                     self.width_changed)
        self.connect(h_edit, SIGNAL("textChanged(QString)"),
                     self.height_changed)
        self.connect(zbox, SIGNAL("toggled(bool)"), self.toggled_no_zoom)
开发者ID:HaMF,项目名称:guiqwt,代码行数:57,代码来源:resizedialog.py

示例6: create_SessionType_Group

 def create_SessionType_Group( self ):
     groupBox = QGroupBox(' Session Type' )
     vbox = QVBoxLayout()
     self.sessiontypes = []
     types = [['Unconscious', 0], ['Mindfull', 1]]
     for t in types:
         self.sessiontypes.append( QRadioButton( t[0] ) )
         vbox.addWidget( self.sessiontypes[-1] )
     self.sessiontypes[0].setChecked(True)
     vbox.addStretch(1)
     groupBox.setLayout(vbox)
     return groupBox
开发者ID:darkopetrovic,项目名称:ZephyrApp,代码行数:12,代码来源:gui.py

示例7: __init__

    def __init__(self, parent, options=None):
        QWidget.__init__(self, parent=parent)

        if options is None:
            options = {}
        self.imagewidget = ImageWidget(self, **options)
        self.imagewidget.register_all_image_tools()

        hlayout = QHBoxLayout()
        self.add_buttons_to_layout(hlayout)
        
        vlayout = QVBoxLayout()
        vlayout.addWidget(self.imagewidget)
        vlayout.addLayout(hlayout)
        self.setLayout(vlayout)
开发者ID:alimuldal,项目名称:guiqwt,代码行数:15,代码来源:base.py

示例8: setup_widget_layout

 def setup_widget_layout(self):
     self.fit_layout = QHBoxLayout()
     self.params_layout = QGridLayout()
     params_group = create_groupbox(self, _("Fit parameters"),
                                    layout=self.params_layout)
     if self.auto_fit_enabled:
         auto_group = self.create_autofit_group()
         self.fit_layout.addWidget(auto_group)
     self.fit_layout.addWidget(params_group)
     self.plot_layout.addLayout(self.fit_layout, 1, 0)
     
     vlayout = QVBoxLayout(self)
     vlayout.addWidget(self.toolbar)
     vlayout.addLayout(self.plot_layout)
     self.setLayout(vlayout)
开发者ID:CaptainAL,项目名称:Spyder,代码行数:15,代码来源:fit.py

示例9: setup_widget

 def setup_widget(self, title):
     #---Create the plot widget:
     self.plot = CurvePlot(self)
     self.curve_item = make.curve([], [], color='b')
     self.plot.add_item(self.curve_item)
     self.plot.set_antialiasing(True)
     #---
     
     button = QPushButton("Test filter: %s" % title)
     button.clicked.connect(self.process_data)
     vlayout = QVBoxLayout()
     vlayout.addWidget(self.plot)
     vlayout.addWidget(button)
     self.setLayout(vlayout)
     
     self.update_curve()
开发者ID:CaptainAL,项目名称:Spyder,代码行数:16,代码来源:filtertest2.py

示例10: setup_widget

 def setup_widget(self, title):
     #---Create the plot widget:
     curvewidget = CurveWidget(self)
     curvewidget.register_all_curve_tools()
     self.curve_item = make.curve([], [], color='b')
     curvewidget.plot.add_item(self.curve_item)
     curvewidget.plot.set_antialiasing(True)
     #---
     
     button = QPushButton("Test filter: %s" % title)
     self.connect(button, SIGNAL('clicked()'), self.process_data)
     vlayout = QVBoxLayout()
     vlayout.addWidget(curvewidget)
     vlayout.addWidget(button)
     self.setLayout(vlayout)
     
     self.update_curve()
开发者ID:HaMF,项目名称:guiqwt,代码行数:17,代码来源:filtertest1.py

示例11: __init__

 def __init__(self):
     QDialog.__init__(self)
     self.setWindowTitle("Data Logger")
     self.groupbox1 = DataSetEditGroupBox("Parametres de lock",Loggerdataset,show_button = False)   
     self.groupbox1.dataset.parent = self
     self.values = self.groupbox1.dataset
     self.groupbox1.dataset.parent = self
     lay = QVBoxLayout()
     lay.addWidget(self.groupbox1)
     self.setLayout(lay)
     self.resize(800,300)
     
     self.timer = QTimer()
     self.timer.timeout.connect(self.log)
     #self.timer.timeout.connect(self.update_values)
     self.timer.setInterval(100) #ms
     self.show()
开发者ID:SamuelDeleglise,项目名称:ScriptsCOM,代码行数:17,代码来源:getAverages.py

示例12: __init__

    def __init__(self, parent):
        QWidget.__init__(self, parent)
        font = QFont(get_family(MONOSPACE), 10, QFont.Normal)

        info_icon = QLabel()
        icon = get_std_icon("MessageBoxInformation").pixmap(24, 24)
        info_icon.setPixmap(icon)
        info_icon.setFixedWidth(32)
        info_icon.setAlignment(Qt.AlignTop)

        self.service_status_label = QLabel()
        self.service_status_label.setWordWrap(True)
        self.service_status_label.setAlignment(Qt.AlignTop)
        self.service_status_label.setFont(font)

        self.desc_label = QLabel()
        self.desc_label.setWordWrap(True)
        self.desc_label.setAlignment(Qt.AlignTop)
        self.desc_label.setFont(font)

        self.group_desc = QGroupBox("Description", self)
        layout = QHBoxLayout()
        layout.addWidget(info_icon)
        layout.addWidget(self.desc_label)
        layout.addStretch()
        layout.addWidget(self.service_status_label)

        self.group_desc.setLayout(layout)

        self.editor = CodeEditor(self)
        self.editor.setup_editor(linenumbers=True, font=font)
        self.editor.setReadOnly(False)
        self.group_code = QGroupBox("Source code", self)
        layout = QVBoxLayout()
        layout.addWidget(self.editor)
        self.group_code.setLayout(layout)

        self.enable_button = QPushButton(get_icon("apply.png"), "Enable", self)

        self.save_button = QPushButton(get_icon("filesave.png"), "Save", self)

        self.disable_button = QPushButton(get_icon("delete.png"), "Disable", self)

        self.refresh_button = QPushButton(get_icon("restart.png"), "Refresh", self)
        hlayout = QHBoxLayout()
        hlayout.addWidget(self.save_button)
        hlayout.addWidget(self.enable_button)
        hlayout.addWidget(self.disable_button)
        hlayout.addWidget(self.refresh_button)

        vlayout = QVBoxLayout()
        vlayout.addWidget(self.group_desc)
        vlayout.addWidget(self.group_code)
        self.html_window = HTMLWindow()
        vlayout.addWidget(self.html_window)

        vlayout.addLayout(hlayout)
        self.setLayout(vlayout)

        self.current_file = None
开发者ID:hutchic,项目名称:dd-agent,代码行数:60,代码来源:gui.py

示例13: __init__

    def __init__(self, parent=None):
        super(ContrastAdjustment, self).__init__(parent)
        
        self.local_manager = None # local manager for the histogram plot
        self.manager = None # manager for the associated image plot
        
        # Storing min/max markers for each active image
        self.min_markers = {}
        self.max_markers = {}
        
        # Select point tools
        self.min_select_tool = None
        self.max_select_tool = None
        
        style = "<span style=\'color: #444444\'><b>%s</b></span>"
        layout, _label = get_image_layout(self.PANEL_ICON,
                                          style % self.PANEL_TITLE,
                                          alignment=Qt.AlignCenter)
        layout.setAlignment(Qt.AlignCenter)
        vlayout = QVBoxLayout()
        vlayout.addLayout(layout)
        self.local_manager = PlotManager(self)
        self.histogram = LevelsHistogram(parent)
        vlayout.addWidget(self.histogram)
        self.local_manager.add_plot(self.histogram)
        hlayout = QHBoxLayout()
        self.setLayout(hlayout)
        hlayout.addLayout(vlayout)
        
        self.toolbar = toolbar = QToolBar(self)
        toolbar.setOrientation(Qt.Vertical)
#        toolbar.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
        hlayout.addWidget(toolbar)
        
        # Add standard plot-related tools to the local manager
        lman = self.local_manager
        lman.add_tool(SelectTool)
        lman.add_tool(BasePlotMenuTool, "item")
        lman.add_tool(BasePlotMenuTool, "axes")
        lman.add_tool(BasePlotMenuTool, "grid")
        lman.add_tool(AntiAliasingTool)
        lman.get_default_tool().activate()
        
        self.outliers_param = EliminateOutliersParam(self.PANEL_TITLE)
开发者ID:HaMF,项目名称:guiqwt,代码行数:44,代码来源:histogram.py

示例14: setup_widget_layout

 def setup_widget_layout(self):
     vlayout = QVBoxLayout(self)
     vlayout.addWidget(self.toolbar)
     vlayout.addLayout(self.plot_layout)
     self.setLayout(vlayout)
     if self.edit:
         self.button_layout = QHBoxLayout()
         self.install_button_layout()
         vlayout.addLayout(self.button_layout)
开发者ID:alimuldal,项目名称:guiqwt,代码行数:9,代码来源:plot.py

示例15: __init__

 def __init__(self, parent):
     QWidget.__init__(self, parent)
     font = QFont(get_family(MONOSPACE), 10, QFont.Normal)
     
     info_icon = QLabel()
     icon = get_std_icon('MessageBoxInformation').pixmap(24, 24)
     info_icon.setPixmap(icon)
     info_icon.setFixedWidth(32)
     info_icon.setAlignment(Qt.AlignTop)
     self.desc_label = QLabel()
     self.desc_label.setWordWrap(True)
     self.desc_label.setAlignment(Qt.AlignTop)
     self.desc_label.setFont(font)
     group_desc = QGroupBox(_("Description"), self)
     layout = QHBoxLayout()
     layout.addWidget(info_icon)
     layout.addWidget(self.desc_label)
     group_desc.setLayout(layout)
     
     self.editor = CodeEditor(self)
     self.editor.setup_editor(linenumbers=True, font=font)
     self.editor.setReadOnly(True)
     group_code = QGroupBox(_("Source code"), self)
     layout = QVBoxLayout()
     layout.addWidget(self.editor)
     group_code.setLayout(layout)
     
     self.run_button = QPushButton(get_icon("apply.png"),
                                   _("Run this script"), self)
     self.quit_button = QPushButton(get_icon("exit.png"), _("Quit"), self)
     hlayout = QHBoxLayout()
     hlayout.addWidget(self.run_button)
     hlayout.addStretch()
     hlayout.addWidget(self.quit_button)
     
     vlayout = QVBoxLayout()
     vlayout.addWidget(group_desc)
     vlayout.addWidget(group_code)
     vlayout.addLayout(hlayout)
     self.setLayout(vlayout)
开发者ID:stonebig,项目名称:guidata,代码行数:40,代码来源:guitest.py


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