Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QAbstractSpinBox

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.core.QObject
                  com.trolltech.qt.gui.QWidget
                      com.trolltech.qt.gui.QAbstractSpinBox

All Implemented Interfaces:
  QPaintDeviceInterface, QtJambiInterface

Direct Known Subclasses:
  QDateTimeEdit, QDoubleSpinBox, QSpinBox

    public class QAbstractSpinBox

extends QWidget

The `QAbstractSpinBox` class provides a spinbox and a line edit to display values.

The class is designed as a common super class for widgets like `QSpinBox`, `QDoubleSpinBox` and `QDateTimeEdit`

Here are the main properties of the class:

1. text: The text that is displayed in the `QAbstractSpinBox`.
2. alignment: The alignment of the text in the `QAbstractSpinBox`.
3. wrapping: Whether the `QAbstractSpinBox` wraps from the minimum value to the maximum value and vica versa.

`QAbstractSpinBox` provides a virtual `stepBy` function that is called whenever the user triggers a step. This function takes an integer value to signify how many steps were taken. E.g. Pressing Qt::Key_Down will trigger a call to `stepBy`(-1).

`QAbstractSpinBox` also provide a virtual function `stepEnabled` to determine whether stepping up/down is allowed at any point. This function returns a bitset of StepEnabled.

See Also:
  `QAbstractSlider`, `QSpinBox`, `QDoubleSpinBox`, `QDateTimeEdit`, Spin Boxes Example

Nested Class Summary
`static class` | `QAbstractSpinBox.ButtonSymbols` This enum type describes the symbols that can be displayed on the buttons in a spin box.
`static class` | `QAbstractSpinBox.CorrectionMode` This enum type describes the mode the spinbox will use to correct an Intermediate value if editing finishes.
`static class` | `QAbstractSpinBox.StepEnabled` This QFlag class provides flags for the int enum.
`static class` | `QAbstractSpinBox.StepEnabledFlag` Press link for info on QAbstractSpinBox.StepEnabledFlag

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget
`QWidget.RenderFlag, QWidget.RenderFlags`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>`

Field Summary
`QSignalEmitter.Signal0` | `editingFinished` This signal is emitted editing is finished.

Fields inherited from class com.trolltech.qt.gui.QWidget
`customContextMenuRequested`

Constructor Summary
`QAbstractSpinBox()` Equivalent to `QAbstractSpinBox`(0).
`QAbstractSpinBox(QWidget parent)` Constructs an abstract spinbox with the given `parent` with default wrapping, and alignment properties.

Method Summary
`Qt.Alignment` | `alignment()` Returns the alignment of the spin box.
`QAbstractSpinBox.ButtonSymbols` | `buttonSymbols()` Returns the current button symbol mode.
`protected void` | `changeEvent(QEvent event)` This function is reimplemented for internal reasons.
`void` | `clear()` Clears the lineedit of all text but prefix and suffix.
`protected void` | `closeEvent(QCloseEvent event)` This function is reimplemented for internal reasons.
`protected void` | `contextMenuEvent(QContextMenuEvent event)` This function is reimplemented for internal reasons.
`QAbstractSpinBox.CorrectionMode` | `correctionMode()` Returns the mode to correct an Intermediate value if editing finishes.
`boolean` | `event(QEvent event)` This function is reimplemented for internal reasons.
`java.lang.String` | `fixup(java.lang.String input)` This virtual function is called by the `QAbstractSpinBox` if the `input` is not validated to QValidator::Acceptable when Return is pressed or `interpretText` is called.
`protected void` | `focusInEvent(QFocusEvent event)` This function is reimplemented for internal reasons.
`protected void` | `focusOutEvent(QFocusEvent event)` This function is reimplemented for internal reasons.
`static QAbstractSpinBox` | `fromNativePointer(QNativePointer nativePointer)` This function returns the QAbstractSpinBox instance pointed to by nativePointer
`boolean` | `hasAcceptableInput()` Returns whether the input satisfies the current validation.
`boolean` | `hasFrame()` Returns whether the spin box draws itself with a frame.
`protected void` | `hideEvent(QHideEvent event)` This function is reimplemented for internal reasons.
`protected void` | `initStyleOption(QStyleOptionSpinBox option)` Initialize `option` with the values from this QSpinBox.
`void` | `interpretText()` This function interprets the text of the spin box.
`boolean` | `isAccelerated()` Returns whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons..
`boolean` | `isReadOnly()` Returns whether the spin box is read only..
`boolean` | `keyboardTracking()` Returns whether keyboard tracking is enabled for the spinbox..
`protected void` | `keyPressEvent(QKeyEvent event)` This function is reimplemented for internal reasons.
`protected void` | `keyReleaseEvent(QKeyEvent event)` This function is reimplemented for internal reasons.
`protected QLineEdit` | `lineEdit()` This function returns a pointer to the line edit of the spin box.
`QSize` | `minimumSizeHint()` This function is reimplemented for internal reasons.
`protected void` | `mouseMoveEvent(QMouseEvent event)` This function is reimplemented for internal reasons.
`protected void` | `mousePressEvent(QMouseEvent event)` This function is reimplemented for internal reasons.
`protected void` | `mouseReleaseEvent(QMouseEvent event)` This function is reimplemented for internal reasons.
`protected void` | `paintEvent(QPaintEvent event)` This function is reimplemented for internal reasons.
`protected void` | `resizeEvent(QResizeEvent event)` This function is reimplemented for internal reasons.
`void` | `selectAll()` Selects all the text in the spinbox except the prefix and suffix.
`void` | `setAccelerated(boolean on)` Sets whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.
`void` | `setAlignment(Qt.Alignment flag)` Sets the alignment of the spin box to `flag`.
`void` | `setAlignment(Qt.AlignmentFlag... flag)` Sets the alignment of the spin box to `flag`.
`void` | `setButtonSymbols(QAbstractSpinBox.ButtonSymbols bs)` Sets the current button symbol mode to `bs`.
`void` | `setCorrectionMode(QAbstractSpinBox.CorrectionMode cm)` Sets the mode to correct an Intermediate value if editing finishes to `cm`.
`void` | `setFrame(boolean arg__1)` Sets whether the spin box draws itself with a frame to `arg__1`.
`void` | `setKeyboardTracking(boolean kt)` Sets whether keyboard tracking is enabled for the spinbox.
`protected void` | `setLineEdit(QLineEdit edit)` Sets the line edit of the spinbox to be `edit` instead of the current line edit widget.
`void` | `setReadOnly(boolean r)` Sets whether the spin box is read only.
`void` | `setSpecialValueText(java.lang.String txt)` Sets the special-value text to `txt`.
`void` | `setWrapping(boolean w)` Sets whether the spin box is circular.
`protected void` | `showEvent(QShowEvent event)` This function is reimplemented for internal reasons.
`QSize` | `sizeHint()` This function is reimplemented for internal reasons.
`java.lang.String` | `specialValueText()` Returns the special-value text.
`void` | `stepBy(int steps)` Virtual function that is called whenever the user triggers a step.
`void` | `stepDown()` Steps down by one linestep Calling this slot is analogous to calling `stepBy`(-1);
`protected QAbstractSpinBox.StepEnabled` | `stepEnabled()` Virtual function that determines whether stepping up and down is legal at any given time.
`void` | `stepUp()` Steps up by one linestep Calling this slot is analogous to calling `stepBy`(1);
`java.lang.String` | `text()` Returns the spin box's text, including any prefix and suffix.
`protected void` | `timerEvent(QTimerEvent event)` This function is reimplemented for internal reasons.
`QValidator.State` | `validate(QValidator.QValidationData input)` Equivalent to validate(`input`, ).
`protected void` | `wheelEvent(QWheelEvent event)` This function is reimplemented for internal reasons.
`boolean` | `wrapping()` Returns whether the spin box is circular..

Methods inherited from class com.trolltech.qt.gui.QWidget
`acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsRect, contextMenuPolicy, createWinId, cursor, depth, destroy, destroy, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, ensurePolished, enterEvent, focusNextChild, focusNextPrevChild, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabMouse, grabShortcut, grabShortcut, hasFocus, hasMouseTracking, height, heightForWidth, heightMM, hide, inputContext, inputMethodEvent, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, layout, layoutDirection, leaveEvent, locale, logicalDpiX, logicalDpiY, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumWidth, mouseDoubleClickEvent, mouseGrabber, move, move, moveEvent, nextInFocusChain, normalGeometry, numColors, overrideWindowFlags, overrideWindowFlags, overrideWindowState, overrideWindowState, paintEngine, paintingActive, palette, parentWidget, physicalDpiX, physicalDpiY, pos, raise, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, render, render, render, render, repaint, repaint, repaint, repaint, resetInputContext, resize, resize, restoreGeometry, saveGeometry, scroll, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setBaseSize, setContentsMargins, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setLocale, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setParent, setParent, setShortcutAutoRepeat, setShortcutAutoRepeat, setShortcutEnabled, setShortcutEnabled, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFlags, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowState, setWindowTitle, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, underMouse, unsetCursor, unsetLayoutDirection, unsetLocale, update, update, update, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, width, widthMM, window, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y`

Methods inherited from class com.trolltech.qt.core.QObject
`blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`disconnect, disconnect, signalSender`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Field Detail

### editingFinished

    public final QSignalEmitter.Signal0 editingFinished

  This signal is emitted editing is finished. This happens when the spinbox loses focus and when enter is pressed.

  Compatible Slot Signature:
    `void mySlot()`

Constructor Detail

### QAbstractSpinBox

    public QAbstractSpinBox()

  Equivalent to `QAbstractSpinBox`(0).

### QAbstractSpinBox

    public QAbstractSpinBox(QWidget parent)

  Constructs an abstract spinbox with the given `parent` with default wrapping, and alignment properties.

Method Detail

### alignment

    public final Qt.Alignment alignment()

  Returns the alignment of the spin box.

  Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.

  By default, the alignment is Qt::AlignLeft

  Attempting to set the alignment to an illegal flag combination does nothing.

  See Also:
    `setAlignment`, `Qt::Alignment`

### buttonSymbols

    public final QAbstractSpinBox.ButtonSymbols buttonSymbols()

  Returns the current button symbol mode.

  The possible values can be either `UpDownArrows` or `PlusMinus`. The default is `UpDownArrows`.

  Note that some styles might render `PlusMinus` and `UpDownArrows` identically.

  See Also:
    `setButtonSymbols`, `ButtonSymbols`

### correctionMode

    public final QAbstractSpinBox.CorrectionMode correctionMode()

  Returns the mode to correct an Intermediate value if editing finishes.

  The default mode is QAbstractSpinBox::CorrectToPreviousValue.

  See Also:
    `setCorrectionMode`, `acceptableInput`, `validate`, `fixup`

### hasAcceptableInput

    public final boolean hasAcceptableInput()

  Returns whether the input satisfies the current validation.

  See Also:
    `validate`, `fixup`, `correctionMode`

### hasFrame

    public final boolean hasFrame()

  Returns whether the spin box draws itself with a frame.

  If enabled (the default) the spin box draws itself inside a frame, otherwise the spin box draws itself without any frame.

### interpretText

    public final void interpretText()

  This function interprets the text of the spin box. If the value has changed since last interpretation it will emit signals.

### isAccelerated

    public final boolean isAccelerated()

  Returns whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons..

  If enabled the spin box will increase/decrease the value faster the longer you hold the button down.

### isReadOnly

    public final boolean isReadOnly()

  Returns whether the spin box is read only..

  In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.

  The `QLineEdit` in the `QAbstractSpinBox` does not show a cursor in read-only mode.

  See Also:
    `QLineEdit::readOnly`

### keyboardTracking

    public final boolean keyboardTracking()

  Returns whether keyboard tracking is enabled for the spinbox..

  If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() signal while the new value is being entered from the keyboard.

  E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.

  If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() signal while typing. It emits the signal later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.

  See Also:
    `setKeyboardTracking`

### lineEdit

    protected final QLineEdit lineEdit()

  This function returns a pointer to the line edit of the spin box.

  See Also:
    `setLineEdit`

### selectAll

    public final void selectAll()

  Selects all the text in the spinbox except the prefix and suffix.

### setAccelerated

    public final void setAccelerated(boolean on)

  Sets whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons. to `on`.

  If enabled the spin box will increase/decrease the value faster the longer you hold the button down.

  See Also:
    `isAccelerated`

### setAlignment

    public final void setAlignment(Qt.AlignmentFlag... flag)

  Sets the alignment of the spin box to `flag`.

  Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.

  By default, the alignment is Qt::AlignLeft

  Attempting to set the alignment to an illegal flag combination does nothing.

  See Also:
    `alignment`, `Qt::Alignment`

### setAlignment

    public final void setAlignment(Qt.Alignment flag)

  Sets the alignment of the spin box to `flag`.

  Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.

  By default, the alignment is Qt::AlignLeft

  Attempting to set the alignment to an illegal flag combination does nothing.

  See Also:
    `alignment`, `Qt::Alignment`

### setButtonSymbols

    public final void setButtonSymbols(QAbstractSpinBox.ButtonSymbols bs)

  Sets the current button symbol mode to `bs`.

  The possible values can be either `UpDownArrows` or `PlusMinus`. The default is `UpDownArrows`.

  Note that some styles might render `PlusMinus` and `UpDownArrows` identically.

  See Also:
    `buttonSymbols`, `ButtonSymbols`

### setCorrectionMode

    public final void setCorrectionMode(QAbstractSpinBox.CorrectionMode cm)

  Sets the mode to correct an Intermediate value if editing finishes to `cm`.

  The default mode is QAbstractSpinBox::CorrectToPreviousValue.

  See Also:
    `correctionMode`, `acceptableInput`, `validate`, `fixup`

### setFrame

    public final void setFrame(boolean arg__1)

  Sets whether the spin box draws itself with a frame to `arg__1`.

  If enabled (the default) the spin box draws itself inside a frame, otherwise the spin box draws itself without any frame.

  See Also:
    `hasFrame`

### setKeyboardTracking

    public final void setKeyboardTracking(boolean kt)

  Sets whether keyboard tracking is enabled for the spinbox. to `kt`.

  If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() signal while the new value is being entered from the keyboard.

  E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.

  If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() signal while typing. It emits the signal later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.

  See Also:
    `keyboardTracking`

### setLineEdit

    protected final void setLineEdit(QLineEdit edit)

  Sets the line edit of the spinbox to be `edit` instead of the current line edit widget. `edit` can not be 0.

  `QAbstractSpinBox` takes ownership of the new `lineEdit`

  If QLineEdit::validator() for the `edit` returns 0, the internal validator of the spinbox will be set on the line edit.

  See Also:
    `lineEdit`

### setReadOnly

    public final void setReadOnly(boolean r)

  Sets whether the spin box is read only. to `r`.

  In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.

  The `QLineEdit` in the `QAbstractSpinBox` does not show a cursor in read-only mode.

  See Also:
    `isReadOnly`, `QLineEdit::readOnly`

### setSpecialValueText

    public final void setSpecialValueText(java.lang.String txt)

  Sets the special-value text to `txt`.

  If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.

  For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:

              QSpinBox *zoomSpinBox = new QSpinBox;
              zoomSpinBox->setRange(0, 1000);
              zoomSpinBox->setSingleStep(10);
              zoomSpinBox->setSuffix("%");
              zoomSpinBox->setSpecialValueText(tr("Automatic"));
              zoomSpinBox->setValue(100);

  The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.

  All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::valueChanged() signal that passes a `QString`.

  To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.

  If no special-value text is set, `specialValueText` returns an empty string.

  See Also:
    `specialValueText`

### setWrapping

    public final void setWrapping(boolean w)

  Sets whether the spin box is circular. to `w`.

  If wrapping is true stepping up from maximum() value will take you to the minimum() value and vica versa. Wrapping only make sense if you have minimum() and maximum() values set.

          QSpinBox *spinBox = new QSpinBox(this);
          spinBox->setRange(0, 100);
          spinBox->setWrapping(true);
          spinBox->setValue(100);
          spinBox->stepBy(1);
          // value is 0

  See Also:
    `wrapping`, `QSpinBox::minimum`, `QSpinBox::maximum`

### specialValueText

    public final java.lang.String specialValueText()

  Returns the special-value text.

  If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.

  For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:

              QSpinBox *zoomSpinBox = new QSpinBox;
              zoomSpinBox->setRange(0, 1000);
              zoomSpinBox->setSingleStep(10);
              zoomSpinBox->setSuffix("%");
              zoomSpinBox->setSpecialValueText(tr("Automatic"));
              zoomSpinBox->setValue(100);

  The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.

  All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::valueChanged() signal that passes a `QString`.

  To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.

  If no special-value text is set, `specialValueText` returns an empty string.

  See Also:
    `setSpecialValueText`

### stepDown

    public final void stepDown()

  Steps down by one linestep Calling this slot is analogous to calling `stepBy`(-1);

  See Also:
    `stepBy`, `stepUp`

### stepUp

    public final void stepUp()

  Steps up by one linestep Calling this slot is analogous to calling `stepBy`(1);

  See Also:
    `stepBy`, `stepDown`

### text

    public final java.lang.String text()

  Returns the spin box's text, including any prefix and suffix.

  There is no default text.

### wrapping

    public final boolean wrapping()

  Returns whether the spin box is circular..

  If wrapping is true stepping up from maximum() value will take you to the minimum() value and vica versa. Wrapping only make sense if you have minimum() and maximum() values set.

          QSpinBox *spinBox = new QSpinBox(this);
          spinBox->setRange(0, 100);
          spinBox->setWrapping(true);
          spinBox->setValue(100);
          spinBox->stepBy(1);
          // value is 0

  See Also:
    `setWrapping`, `QSpinBox::minimum`, `QSpinBox::maximum`

### changeEvent

    protected void changeEvent(QEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `changeEvent` in class `QWidget`

### clear

    public void clear()

  Clears the lineedit of all text but prefix and suffix.

### closeEvent

    protected void closeEvent(QCloseEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `closeEvent` in class `QWidget`
  See Also:
    `event`, `hide`, `close`, `QCloseEvent`, Application Example

### contextMenuEvent

    protected void contextMenuEvent(QContextMenuEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `contextMenuEvent` in class `QWidget`
  See Also:
    `event`, `QContextMenuEvent`, `customContextMenuRequested`

### event

    public boolean event(QEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `event` in class `QWidget`
  See Also:
    `closeEvent`, `focusInEvent`, `focusOutEvent`, `enterEvent`, `keyPressEvent`, `keyReleaseEvent`, `leaveEvent`, `mouseDoubleClickEvent`, `mouseMoveEvent`, `mousePressEvent`, `mouseReleaseEvent`, `moveEvent`, `paintEvent`, `resizeEvent`, `QObject::event`, `QObject::timerEvent`

### fixup

    public java.lang.String fixup(java.lang.String input)

  This virtual function is called by the `QAbstractSpinBox` if the `input` is not validated to QValidator::Acceptable when Return is pressed or `interpretText` is called. It will try to change the text so it is valid. Reimplemented in the various subclasses.

### focusInEvent

    protected void focusInEvent(QFocusEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `focusInEvent` in class `QWidget`
  See Also:
    `focusOutEvent`, `setFocusPolicy`, `keyPressEvent`, `keyReleaseEvent`, `event`, `QFocusEvent`

### focusOutEvent

    protected void focusOutEvent(QFocusEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `focusOutEvent` in class `QWidget`
  See Also:
    `focusInEvent`, `setFocusPolicy`, `keyPressEvent`, `keyReleaseEvent`, `event`, `QFocusEvent`

### hideEvent

    protected void hideEvent(QHideEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `hideEvent` in class `QWidget`
  See Also:
    `visible`, `event`, `QHideEvent`

### keyPressEvent

    protected void keyPressEvent(QKeyEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `keyPressEvent` in class `QWidget`
  See Also:
    `keyReleaseEvent`, `QKeyEvent::ignore`, `setFocusPolicy`, `focusInEvent`, `focusOutEvent`, `event`, `QKeyEvent`, Tetrix Example

### keyReleaseEvent

    protected void keyReleaseEvent(QKeyEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `keyReleaseEvent` in class `QWidget`
  See Also:
    `keyPressEvent`, `QKeyEvent::ignore`, `setFocusPolicy`, `focusInEvent`, `focusOutEvent`, `event`, `QKeyEvent`

### minimumSizeHint

    public QSize minimumSizeHint()

  This function is reimplemented for internal reasons.

  Overrides:
    `minimumSizeHint` in class `QWidget`
  See Also:
    `QSize::isValid`, `resize`, `setMinimumSize`, `sizePolicy`

### mouseMoveEvent

    protected void mouseMoveEvent(QMouseEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `mouseMoveEvent` in class `QWidget`
  See Also:
    `setMouseTracking`, `mousePressEvent`, `mouseReleaseEvent`, `mouseDoubleClickEvent`, `event`, `QMouseEvent`, `Example`

### mousePressEvent

    protected void mousePressEvent(QMouseEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `mousePressEvent` in class `QWidget`
  See Also:
    `mouseReleaseEvent`, `mouseDoubleClickEvent`, `mouseMoveEvent`, `event`, `QMouseEvent`, `Example`

### mouseReleaseEvent

    protected void mouseReleaseEvent(QMouseEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `mouseReleaseEvent` in class `QWidget`
  See Also:
    `mousePressEvent`, `mouseDoubleClickEvent`, `mouseMoveEvent`, `event`, `QMouseEvent`, `Example`

### paintEvent

    protected void paintEvent(QPaintEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `paintEvent` in class `QWidget`
  See Also:
    `event`, `repaint`, `update`, `QPainter`, `QPixmap`, `QPaintEvent`, Analog Clock Example

### resizeEvent

    protected void resizeEvent(QResizeEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `resizeEvent` in class `QWidget`
  See Also:
    `moveEvent`, `event`, `resize`, `QResizeEvent`, `paintEvent`, `Example`

### showEvent

    protected void showEvent(QShowEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `showEvent` in class `QWidget`
  See Also:
    `visible`, `event`, `QShowEvent`

### sizeHint

    public QSize sizeHint()

  This function is reimplemented for internal reasons.

  Overrides:
    `sizeHint` in class `QWidget`
  See Also:
    `QSize::isValid`, `minimumSizeHint`, `sizePolicy`, `setMinimumSize`, `updateGeometry`

### stepBy

    public void stepBy(int steps)

  Virtual function that is called whenever the user triggers a step. The `steps` parameter indicates how many steps were taken, e.g. Pressing Qt::Key_Down will trigger a call to `stepBy`(-1), whereas pressing Qt::Key_Prior will trigger a call to `stepBy`(10).

  If you subclass `QAbstractSpinBox` you must reimplement this function. Note that this function is called even if the resulting value will be outside the bounds of minimum and maximum. It's this function's job to handle these situations.

### stepEnabled

    protected QAbstractSpinBox.StepEnabled stepEnabled()

  Virtual function that determines whether stepping up and down is legal at any given time.

  The up arrow will be painted as disabled unless (`stepEnabled` & `StepUpEnabled`) != 0.

  The default implementation will return (`StepUpEnabled`| `StepDownEnabled`) if wrapping is turned on. Else it will return `StepDownEnabled` if value is > minimum() or'ed with `StepUpEnabled` if value < maximum().

  If you subclass `QAbstractSpinBox` you will need to reimplement this function.

  See Also:
    `QSpinBox::minimum`, `QSpinBox::maximum`, `wrapping`

### timerEvent

    protected void timerEvent(QTimerEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `timerEvent` in class `QObject`
  See Also:
    `startTimer`, `killTimer`, `event`

### validate

    public QValidator.State validate(QValidator.QValidationData input)

  Equivalent to validate(`input`, ).

### wheelEvent

    protected void wheelEvent(QWheelEvent event)

  This function is reimplemented for internal reasons.

  Overrides:
    `wheelEvent` in class `QWidget`
  See Also:
    `QWheelEvent::ignore`, `QWheelEvent::accept`, `event`, `QWheelEvent`

### fromNativePointer

    public static QAbstractSpinBox fromNativePointer(QNativePointer nativePointer)

  This function returns the QAbstractSpinBox instance pointed to by nativePointer

  Parameters:
    `nativePointer` - the QNativePointer of which object should be returned.

### initStyleOption

    protected void initStyleOption(QStyleOptionSpinBox option)

  Initialize `option` with the values from this QSpinBox. This method is useful for subclasses when they need a QStyleOptionSpinBox, but don't want to fill in all the information themselves.

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD