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


Python QtGui.QSpinBox方法代码示例

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


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

示例1: setupUi

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(400, 300)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.sizeSpin = QtGui.QSpinBox(Form)
        self.sizeSpin.setProperty("value", 10)
        self.sizeSpin.setObjectName("sizeSpin")
        self.gridLayout.addWidget(self.sizeSpin, 1, 1, 1, 1)
        self.pixelModeCheck = QtGui.QCheckBox(Form)
        self.pixelModeCheck.setObjectName("pixelModeCheck")
        self.gridLayout.addWidget(self.pixelModeCheck, 1, 3, 1, 1)
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.plot = PlotWidget(Form)
        self.plot.setObjectName("plot")
        self.gridLayout.addWidget(self.plot, 0, 0, 1, 4)
        self.randCheck = QtGui.QCheckBox(Form)
        self.randCheck.setObjectName("randCheck")
        self.gridLayout.addWidget(self.randCheck, 1, 2, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:26,代码来源:ScatterPlotSpeedTestTemplate_pyside.py

示例2: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def __init__(self, name, config, parent=None):
        
        ActionOptionNumeric.__init__(self, name, config)
        QtGui.QSpinBox.__init__(self, parent=parent)

        self.setMaximum(int(self.max))
        self.setMinimum(int(self.min))
        self.setSingleStep(int(self.step))

        self.setToolTip(self.tooltip)
        self.setValue(int(self.default))

        self.valueChanged.connect(lambda v: self.value_changed.emit())

    # ------------------------------------------------------------------------- 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:17,代码来源:options.py

示例3: value

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def value(self):
        return QtGui.QSpinBox.value(self)

# ----------------------------------------------------------------------------- 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:6,代码来源:options.py

示例4: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def __init__(self, *args, **kwargs):
            QtGui.QSpinBox.__init__(self)
            Custom.__init__(self, *args, **kwargs)
            self.pressed = False
            self.installEventFilter(self)
            self.valueChanged.connect(self.interactivechange) 
开发者ID:mwisslead,项目名称:vfp2py,代码行数:8,代码来源:vfpfunc.py

示例5: value

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def value(self):
            return QtGui.QSpinBox.value(self) 
开发者ID:mwisslead,项目名称:vfp2py,代码行数:4,代码来源:vfpfunc.py

示例6: setupUi

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def setupUi(self, onionSkinRendererPreferences):
        onionSkinRendererPreferences.setObjectName("onionSkinRendererPreferences")
        onionSkinRendererPreferences.resize(280, 97)
        self.verticalLayout = QtGui.QVBoxLayout(onionSkinRendererPreferences)
        self.verticalLayout.setObjectName("verticalLayout")
        self.prefs_maxBuffer_layout = QtGui.QHBoxLayout()
        self.prefs_maxBuffer_layout.setObjectName("prefs_maxBuffer_layout")
        self.maxBuffer_label = QtGui.QLabel(onionSkinRendererPreferences)
        self.maxBuffer_label.setObjectName("maxBuffer_label")
        self.prefs_maxBuffer_layout.addWidget(self.maxBuffer_label)
        self.maxBuffer_spinBox = QtGui.QSpinBox(onionSkinRendererPreferences)
        self.maxBuffer_spinBox.setMinimum(1)
        self.maxBuffer_spinBox.setMaximum(10000)
        self.maxBuffer_spinBox.setProperty("value", 200)
        self.maxBuffer_spinBox.setObjectName("maxBuffer_spinBox")
        self.prefs_maxBuffer_layout.addWidget(self.maxBuffer_spinBox)
        self.verticalLayout.addLayout(self.prefs_maxBuffer_layout)
        self.prefs_relativeKeyCount_layout = QtGui.QHBoxLayout()
        self.prefs_relativeKeyCount_layout.setObjectName("prefs_relativeKeyCount_layout")
        self.relativeKeyCount_label = QtGui.QLabel(onionSkinRendererPreferences)
        self.relativeKeyCount_label.setObjectName("relativeKeyCount_label")
        self.prefs_relativeKeyCount_layout.addWidget(self.relativeKeyCount_label)
        self.relativeKeyCount_spinBox = QtGui.QSpinBox(onionSkinRendererPreferences)
        self.relativeKeyCount_spinBox.setMinimum(1)
        self.relativeKeyCount_spinBox.setMaximum(10)
        self.relativeKeyCount_spinBox.setProperty("value", 4)
        self.relativeKeyCount_spinBox.setObjectName("relativeKeyCount_spinBox")
        self.prefs_relativeKeyCount_layout.addWidget(self.relativeKeyCount_spinBox)
        self.verticalLayout.addLayout(self.prefs_relativeKeyCount_layout)
        self.prefs_dialogButtonBox = QtGui.QDialogButtonBox(onionSkinRendererPreferences)
        self.prefs_dialogButtonBox.setOrientation(QtCore.Qt.Horizontal)
        self.prefs_dialogButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.prefs_dialogButtonBox.setObjectName("prefs_dialogButtonBox")
        self.verticalLayout.addWidget(self.prefs_dialogButtonBox)

        self.retranslateUi(onionSkinRendererPreferences)
        QtCore.QObject.connect(self.prefs_dialogButtonBox, QtCore.SIGNAL("accepted()"), onionSkinRendererPreferences.accept)
        QtCore.QObject.connect(self.prefs_dialogButtonBox, QtCore.SIGNAL("rejected()"), onionSkinRendererPreferences.reject)
        QtCore.QMetaObject.connectSlotsByName(onionSkinRendererPreferences) 
开发者ID:Viele,项目名称:onionSkinRenderer,代码行数:41,代码来源:onionSkinRendererPreferences.py

示例7: addAbsoluteFrameFromSpinbox

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def addAbsoluteFrameFromSpinbox(self):
        frame = self.sender().parent().findChild(QtGui.QSpinBox, 'absolute_add_spinBox').value()
        self.addAbsoluteFrame(frame = frame)

    # 
开发者ID:Viele,项目名称:onionSkinRenderer,代码行数:7,代码来源:onionSkinRendererWindow.py

示例8: setupUi

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(186, 154)
        Form.setMaximumSize(QtCore.QSize(200, 16777215))
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 7, 0, 1, 2)
        self.linkCombo = QtGui.QComboBox(Form)
        self.linkCombo.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
        self.linkCombo.setObjectName("linkCombo")
        self.gridLayout.addWidget(self.linkCombo, 7, 2, 1, 2)
        self.autoPercentSpin = QtGui.QSpinBox(Form)
        self.autoPercentSpin.setEnabled(True)
        self.autoPercentSpin.setMinimum(1)
        self.autoPercentSpin.setMaximum(100)
        self.autoPercentSpin.setSingleStep(1)
        self.autoPercentSpin.setProperty("value", 100)
        self.autoPercentSpin.setObjectName("autoPercentSpin")
        self.gridLayout.addWidget(self.autoPercentSpin, 2, 2, 1, 2)
        self.autoRadio = QtGui.QRadioButton(Form)
        self.autoRadio.setChecked(True)
        self.autoRadio.setObjectName("autoRadio")
        self.gridLayout.addWidget(self.autoRadio, 2, 0, 1, 2)
        self.manualRadio = QtGui.QRadioButton(Form)
        self.manualRadio.setObjectName("manualRadio")
        self.gridLayout.addWidget(self.manualRadio, 1, 0, 1, 2)
        self.minText = QtGui.QLineEdit(Form)
        self.minText.setObjectName("minText")
        self.gridLayout.addWidget(self.minText, 1, 2, 1, 1)
        self.maxText = QtGui.QLineEdit(Form)
        self.maxText.setObjectName("maxText")
        self.gridLayout.addWidget(self.maxText, 1, 3, 1, 1)
        self.invertCheck = QtGui.QCheckBox(Form)
        self.invertCheck.setObjectName("invertCheck")
        self.gridLayout.addWidget(self.invertCheck, 5, 0, 1, 4)
        self.mouseCheck = QtGui.QCheckBox(Form)
        self.mouseCheck.setChecked(True)
        self.mouseCheck.setObjectName("mouseCheck")
        self.gridLayout.addWidget(self.mouseCheck, 6, 0, 1, 4)
        self.visibleOnlyCheck = QtGui.QCheckBox(Form)
        self.visibleOnlyCheck.setObjectName("visibleOnlyCheck")
        self.gridLayout.addWidget(self.visibleOnlyCheck, 3, 2, 1, 2)
        self.autoPanCheck = QtGui.QCheckBox(Form)
        self.autoPanCheck.setObjectName("autoPanCheck")
        self.gridLayout.addWidget(self.autoPanCheck, 4, 2, 1, 2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:54,代码来源:axisCtrlTemplate_pyside.py

示例9: _make_frame_range_controls

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def _make_frame_range_controls(self,
        min_time, max_time, start_time, end_time):

        self._frame_start = QtGui.QSpinBox()
        self._frame_start.setMinimum(min_time)
        self._frame_start.setMaximum(max_time)
        self._frame_start.setValue(int(start_time))
        self._frame_start.setFixedWidth(50)

        frame_to = QtGui.QLabel("to")

        self._frame_end = QtGui.QSpinBox()
        self._frame_end.setMinimum(min_time)
        self._frame_end.setMaximum(max_time)
        self._frame_end.setValue(int(end_time))
        self._frame_end.setFixedWidth(50)

        frame_by = QtGui.QLabel("by")

        self._frame_step = QtGui.QSpinBox()
        self._frame_step.setValue(1)
        self._frame_step.setFixedWidth(50)

        auto_frange_layout = QtGui.QHBoxLayout()
        auto_frange_layout.setContentsMargins(0, 0, 0, 0)
        auto_frange_layout.setSpacing(4)
        auto_frange_layout.addWidget(self._frame_start)
        auto_frange_layout.addWidget(frame_to)
        auto_frange_layout.addWidget(self._frame_end)
        auto_frange_layout.addWidget(frame_by)
        auto_frange_layout.addWidget(self._frame_step)

        auto_frange = QtGui.QWidget()
        auto_frange.setLayout(auto_frange_layout)

        self._manual_frange = QtGui.QLineEdit(
            str(int(start_time)) + "-" + str(int(end_time)))
        self._manual_frange.setFixedHeight(22)

        self._frange_stack = QtGui.QStackedWidget()
        self._frange_stack.addWidget(auto_frange)
        self._frange_stack.addWidget(self._manual_frange)

        edit_icon_path = IconFactory().disk_path(
            "icon:///images/icons/edit_32x32.png")

        self._frange_btn = QtGui.QPushButton()
        self._frange_btn_size = QtCore.QSize(22, 22)
        self._frange_btn.setFlat(True)
        self._frange_btn.setCheckable(True)
        self._frange_btn.setFixedSize(self._frange_btn_size)
        self._frange_btn.setIcon(QtGui.QIcon(edit_icon_path))
        self._frange_btn.setIconSize(self._frange_btn_size)
        self._frange_btn.toggled.connect(
            lambda c: self._frange_stack.setCurrentIndex(int(c)))

    # ------------------------------------------------------------------------- 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:59,代码来源:base.py

示例10: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def __init__(self, fig, plot_fun, *args, **kwargs):
        if 'bins' not in kwargs: kwargs.update(bins=np.r_[:10:0.02])
        if 't_max' not in kwargs: kwargs.update(t_max=-1)

        # Save some variables
        self.fig = fig
        self.AX = kwargs['AX']
        self.plot_fun = plot_fun
        self.f_args = args
        self.f_kwargs = kwargs
        self.time_max = args[0].time_max()

        # Some handy shortcut
        self.draw = self.fig.canvas.draw

        # Create the spinboxes for setting the range
        mlabel = QtGui.QLabel()
        mlabel.setText("m:")
        self.m_spinbox = QtGui.QSpinBox()
        self.m_spinbox.setRange(2,500)
        self.m_spinbox.setKeyboardTracking(False)
        self.m_spinbox.setValue(self.f_kwargs['m'])
        self.m_spinbox.valueChanged.connect(self.par_changed)

        blabel = QtGui.QLabel()
        blabel.setText("bin:")
        self.bin_spinbox = QtGui.QDoubleSpinBox()
        self.bin_spinbox.setRange(1e-6,1e6)
        self.bin_spinbox.setDecimals(3)
        self.bin_spinbox.setKeyboardTracking(False)
        bins = self.f_kwargs['bins']
        self.bin_spinbox.setValue(bins[1]-bins[0])
        self.bin_spinbox.valueChanged.connect(self.par_changed)

        tlabel = QtGui.QLabel()
        tlabel.setText("t max (s):")
        self.tmax_spinbox = QtGui.QDoubleSpinBox()
        self.tmax_spinbox.setRange(0,3600)
        self.tmax_spinbox.setKeyboardTracking(False)
        if kwargs['t_max'] <= 0 or kwargs['t_max'] > self.time_max:
            kwargs['t_max'] = self.time_max
        self.tmax_spinbox.setValue(kwargs['t_max'])
        self.tmax_spinbox.valueChanged.connect(self.par_changed)

        addWidget = fig.canvas.toolbar.addWidget
        addWidget(mlabel); addWidget(self.m_spinbox)
        addWidget(blabel); addWidget(self.bin_spinbox)
        addWidget(tlabel); addWidget(self.tmax_spinbox)
        self.draw()
        self.save_params() 
开发者ID:tritemio,项目名称:FRETBursts,代码行数:52,代码来源:scroll_gui.py

示例11: initUI

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def initUI(self):
        fontSize = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/cadquery-freecad-module").GetInt("fontSize")
        keybinding = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/cadquery-freecad-module").GetString("executeKeybinding")
        executeOnSave = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/cadquery-freecad-module").GetBool("executeOnSave")
        showLineNumbers = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/cadquery-freecad-module").GetBool("showLineNumbers")
        allowReload = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/cadquery-freecad-module").GetBool("allowReload")

        font_size = QtGui.QLabel('Font Size')
        self.ui_font_size = QtGui.QSpinBox()
        self.ui_font_size.setValue(fontSize)

        key_binding = QtGui.QLabel('Execute Key-binding')
        self.ui_key_binding = QtGui.QLineEdit()
        self.ui_key_binding.setText(keybinding)

        execute_on_save = QtGui.QLabel('Execute on Save')
        self.execute_on_save = QtGui.QCheckBox()
        self.execute_on_save.setChecked(executeOnSave)

        show_line_numbers = QtGui.QLabel('Show Line Numbers')
        self.show_line_numbers = QtGui.QCheckBox()
        self.show_line_numbers.setChecked(showLineNumbers)

        allow_reload = QtGui.QLabel('Allow Reload')
        self.allow_reload = QtGui.QCheckBox()
        self.allow_reload.setChecked(allowReload)

        self.buttons = QtGui.QDialogButtonBox();
        self.buttons.setOrientation(QtCore.Qt.Horizontal)
        self.buttons.setStandardButtons(QtGui.QDialogButtonBox.Ok|QtGui.QDialogButtonBox.Cancel)
        self.buttons.layout().setDirection(QtGui.QBoxLayout.LeftToRight)
        self.buttons.accepted.connect(self.acceptSettings)
        self.buttons.rejected.connect(self.reject)

        grid = QtGui.QGridLayout()
        grid.setContentsMargins(10, 10, 10, 10)
        grid.addWidget(font_size, 0, 0)
        grid.addWidget(self.ui_font_size, 0, 1)
        grid.addWidget(key_binding, 1, 0)
        grid.addWidget(self.ui_key_binding, 1, 1)
        grid.addWidget(execute_on_save, 2, 0)
        grid.addWidget(self.execute_on_save, 2, 1)
        grid.addWidget(show_line_numbers, 3, 0)
        grid.addWidget(self.show_line_numbers, 3, 1)
        grid.addWidget(allow_reload, 4, 0)
        grid.addWidget(self.allow_reload, 4, 1)
        grid.addWidget(self.buttons, 5, 1)

        self.setLayout(grid) 
开发者ID:jmwright,项目名称:cadquery-freecad-module,代码行数:51,代码来源:SettingsDialog.py

示例12: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def __init__(self):
            QtGui.QWidget.__init__(self)

            # Input Labels
            ID_label = QtGui.QLabel("ID:")
            start_label = QtGui.QLabel("Start Date:")
            blmass_label = QtGui.QLabel("Baseline Mass:")
            minmasspct_label = QtGui.QLabel("% of Baseline Mass:")
            minmass_label = QtGui.QLabel("Minimum Mass:")
            genotype_label = QtGui.QLabel("Genotype:")
            expt_label = QtGui.QLabel("Experiment Tag:")

            # Input widgets
            self.id = QtGui.QLineEdit()
            self.start_date = QtGui.QLineEdit(datetime.date.today().isoformat())
            self.blmass = QtGui.QLineEdit()
            self.blmass.setValidator(QtGui.QDoubleValidator(0.0, 30.0, 1, self.blmass))
            self.minmass_pct = QtGui.QSpinBox()
            self.minmass_pct.setRange(0,100)
            self.minmass_pct.setSingleStep(5)
            self.minmass_pct.setSuffix('%')
            self.minmass_pct.setValue(80)
            self.minmass = QtGui.QLineEdit()
            self.minmass.setValidator(QtGui.QDoubleValidator(0.0, 30.0, 1, self.minmass))
            self.genotype = QtGui.QLineEdit()
            self.expt     = QtGui.QLineEdit()

            # Set return dictionary signals
            self.id.editingFinished.connect(lambda: self.update_return_dict('id', self.id.text()))
            self.start_date.editingFinished.connect(lambda: self.update_return_dict('start_date', self.start_date.text()))
            self.blmass.editingFinished.connect(lambda: self.update_return_dict('baseline_mass', self.blmass.text()))
            self.minmass.editingFinished.connect(lambda: self.update_return_dict('min_mass', self.minmass.text()))
            self.genotype.editingFinished.connect(lambda: self.update_return_dict('genotype', self.genotype.text()))
            self.expt.editingFinished.connect(lambda: self.update_return_dict('experiment', self.expt.text()))

            # Set update minmass signals
            self.blmass.editingFinished.connect(self.calc_minmass)
            self.minmass_pct.valueChanged.connect(self.calc_minmass)

            # Setup Layout
            mainLayout = QtGui.QVBoxLayout()
            mainLayout.addWidget(ID_label)
            mainLayout.addWidget(self.id)
            mainLayout.addWidget(start_label)
            mainLayout.addWidget(self.start_date)
            mainLayout.addWidget(blmass_label)
            mainLayout.addWidget(self.blmass)
            mainLayout.addWidget(minmasspct_label)
            mainLayout.addWidget(self.minmass_pct)
            mainLayout.addWidget(minmass_label)
            mainLayout.addWidget(self.minmass)
            mainLayout.addWidget(genotype_label)
            mainLayout.addWidget(self.genotype)
            mainLayout.addWidget(expt_label)
            mainLayout.addWidget(self.expt)
            mainLayout.addStretch(1)

            self.setLayout(mainLayout)

            # Dictionary to return values
            self.values = {} 
开发者ID:wehr-lab,项目名称:autopilot,代码行数:63,代码来源:gui.py

示例13: __init__

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def __init__(self, tabWidget):
        AbstractTab.__init__(
            self,
            tabWidget,
            Strings.filterTabLoggerName, [0, 1, 2, 3, 4],
            Strings.filterTabPacketTableViewName,
            Strings.filterTabLabelInterfaceValueName,
            allowTablePaste=False)

        #: Noise that will be substracted from the collected data
        self.noiseData = []

        self.snifferProcess = None
        self.dataAdderThread = None

        #: Shared process independent flag to terminate the sniffer process
        self.sharedSnifferEnabledFlag = Value("i", 1)
        #: Shared process independent flag to terminate the data adder
        self.sharedDataAdderEnabledFlag = Value("i", 1)

        # Get all GUI elements
        self.spinBoxFilterTimeCollectNoise = self.tabWidget.findChild(
            QtGui.QSpinBox, "spinBoxFilterTimeCollectNoise")
        self.spinBoxFilterSampleAmount = self.tabWidget.findChild(
            QtGui.QSpinBox, "spinBoxFilterSampleAmount")
        self.buttonFilterInterfaceSettings = self.tabWidget.findChild(
            QtGui.QPushButton, "buttonFilterInterfaceSettings")
        self.buttonFilterStart = self.tabWidget.findChild(
            QtGui.QPushButton, "buttonFilterStart")
        self.buttonFilterDataClear = self.tabWidget.findChild(
            QtGui.QPushButton, "buttonFilterDataClear")

        assert all(GUIElem is not None for GUIElem in [
            self.spinBoxFilterTimeCollectNoise, self.spinBoxFilterSampleAmount,
            self.buttonFilterInterfaceSettings, self.buttonFilterStart, self.
            buttonFilterDataClear
        ]), "GUI Elements not found"

        self.buttonFilterInterfaceSettings.clicked.connect(
            self.handleInterfaceSettingsDialog)
        self.buttonFilterStart.clicked.connect(self.startFilter)
        self.buttonFilterDataClear.clicked.connect(self.clear)

        self.prepareUI() 
开发者ID:schutzwerk,项目名称:CANalyzat0r,代码行数:46,代码来源:FilterTab.py

示例14: generateWidget

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def generateWidget(self, dimensioningProcess):
        self.dimensioningProcess = dimensioningProcess
        groupbox = QtGui.QGroupBox("Grid Options")
        groupbox.setCheckable( True ) 
        groupbox.toggled.connect( self.groupBoxToggled )
        self.groupbox = groupbox
        checked = self.dd_parms.GetBool("show_grid_options",True)
        groupbox.setChecked(checked)
        vbox = QtGui.QVBoxLayout()

        gridOn_checkbox = QtGui.QCheckBox('grid on')
        gridOn_checkbox.setChecked( self.dd_parms.GetBool( 'grid_on', False ))
        gridOn_checkbox.stateChanged.connect( self.gridOn_checkbox_stateChanged )
        vbox.addWidget( gridOn_checkbox )
        self.gridOn_checkbox =  gridOn_checkbox

        spacingSpinbox = QtGui.QDoubleSpinBox()
        spacingSpinbox.setValue( self.dd_parms.GetFloat( 'grid_spacing', default_grid_spacing )  )
        spacingSpinbox.setMinimum( 0.01 )
        spacingSpinbox.setDecimals( 2 )
        spacingSpinbox.setSingleStep( 0.5 )
        spacingSpinbox.setSuffix('mm')
        spacingSpinbox.valueChanged.connect( self.spacingSpinbox_valueChanged )
        vbox.addLayout( DimensioningTaskDialog_generate_row_hbox('spacing', spacingSpinbox) )
        self.spacingSpinbox = spacingSpinbox

        displayPeriodSpinbox = QtGui.QSpinBox()
        displayPeriodSpinbox.setValue( min( self.dd_parms.GetInt( 'grid_display_period', default_grid_display_period  ), 200)  )
        displayPeriodSpinbox.setMinimum( 0 )
        displayPeriodSpinbox.valueChanged.connect( self.displayPeriodSpinbox_valueChanged )
        vbox.addLayout( DimensioningTaskDialog_generate_row_hbox('display period', displayPeriodSpinbox) )
        self.displayPeriodSpinbox = displayPeriodSpinbox

        clr = QtGui.QColor(*unsignedToRGB(self.dd_parms.GetUnsigned( 'grid_color', default_grid_clr )) )
        graphicsScene = QtGui.QGraphicsScene(0,0,30,30)
        pen = QtGui.QPen( QtGui.QColor(0,0,0,0) )
        pen.setWidth(0.0)
        rect = ClickRect(-100, -100, 200, 200)
        rect.setPen(pen)
        rect.clickFun = self.specifyNewGridColor
        graphicsScene.addItem(rect) 
        self.graphicsScene = graphicsScene #protect from garbage collector
        self.colorRect = rect
        self.colorRect.setBrush( QtGui.QBrush( clr ) )
        colorBox = QtGui.QGraphicsView( self.graphicsScene )
        colorBox.setMaximumWidth( 60 )
        colorBox.setMaximumHeight( 30 )
        colorBox.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff )
        colorBox.setVerticalScrollBarPolicy( QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff )
        vbox.addLayout(  DimensioningTaskDialog_generate_row_hbox( 'color', colorBox ) )

        lineWidthSpinbox = QtGui.QDoubleSpinBox()
        lineWidthSpinbox.setValue( self.dd_parms.GetFloat( 'grid_line_width', default_grid_line_width )  )
        lineWidthSpinbox.setMinimum( 0. )
        lineWidthSpinbox.setDecimals( 2 )
        lineWidthSpinbox.setSingleStep( 0.05 )
        lineWidthSpinbox.valueChanged.connect( self.lineWidthSpinbox_valueChanged )
        vbox.addLayout( DimensioningTaskDialog_generate_row_hbox('lineWidth', lineWidthSpinbox) )
        self.lineWidthSpinbox = lineWidthSpinbox
        groupbox.setLayout(vbox)
        return groupbox 
开发者ID:hamish2014,项目名称:FreeCAD_drawing_dimensioning,代码行数:63,代码来源:grid.py

示例15: createMessageGroupBox

# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QSpinBox [as 别名]
def createMessageGroupBox(self):
        self.messageGroupBox = QtGui.QGroupBox("Balloon Message")

        typeLabel = QtGui.QLabel("Type:")

        self.typeComboBox = QtGui.QComboBox()
        self.typeComboBox.addItem("None", QtGui.QSystemTrayIcon.NoIcon)
        self.typeComboBox.addItem(self.style().standardIcon(
                QtGui.QStyle.SP_MessageBoxInformation), "Information",
                QtGui.QSystemTrayIcon.Information)
        self.typeComboBox.addItem(self.style().standardIcon(
                QtGui.QStyle.SP_MessageBoxWarning), "Warning",
                QtGui.QSystemTrayIcon.Warning)
        self.typeComboBox.addItem(self.style().standardIcon(
                QtGui.QStyle.SP_MessageBoxCritical), "Critical",
                QtGui.QSystemTrayIcon.Critical)
        self.typeComboBox.setCurrentIndex(1)

        self.durationLabel = QtGui.QLabel("Duration:")

        self.durationSpinBox = QtGui.QSpinBox()
        self.durationSpinBox.setRange(5, 60)
        self.durationSpinBox.setSuffix(" s")
        self.durationSpinBox.setValue(15)

        durationWarningLabel = QtGui.QLabel("(some systems might ignore this "
                "hint)")
        durationWarningLabel.setIndent(10)

        titleLabel = QtGui.QLabel("Title:")

        self.titleEdit = QtGui.QLineEdit("Cannot connect to network")

        bodyLabel = QtGui.QLabel("Body:")

        self.bodyEdit = QtGui.QTextEdit()
        self.bodyEdit.setPlainText("Don't believe me. Honestly, I don't have "
                "a clue.\nClick this balloon for details.")

        self.showMessageButton = QtGui.QPushButton("Show Message")
        self.showMessageButton.setDefault(True)

        messageLayout = QtGui.QGridLayout()
        messageLayout.addWidget(typeLabel, 0, 0)
        messageLayout.addWidget(self.typeComboBox, 0, 1, 1, 2)
        messageLayout.addWidget(self.durationLabel, 1, 0)
        messageLayout.addWidget(self.durationSpinBox, 1, 1)
        messageLayout.addWidget(durationWarningLabel, 1, 2, 1, 3)
        messageLayout.addWidget(titleLabel, 2, 0)
        messageLayout.addWidget(self.titleEdit, 2, 1, 1, 4)
        messageLayout.addWidget(bodyLabel, 3, 0)
        messageLayout.addWidget(self.bodyEdit, 3, 1, 2, 4)
        messageLayout.addWidget(self.showMessageButton, 5, 4)
        messageLayout.setColumnStretch(3, 1)
        messageLayout.setRowStretch(4, 1)
        self.messageGroupBox.setLayout(messageLayout) 
开发者ID:slush0,项目名称:epycyzm,代码行数:58,代码来源:gui.py


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