void QRangeModel::setRange(qreal min, qreal max)
{
    Q_D(QRangeModel);

    bool emitMinimumChanged = !qFuzzyCompare(min, d->minimum);
    bool emitMaximumChanged = !qFuzzyCompare(max, d->maximum);

    if (!(emitMinimumChanged || emitMaximumChanged))
        return;

    const qreal oldValue = value();
    const qreal oldPosition = position();

    d->minimum = min;
    d->maximum = qMax(min, max);

    // Update internal position if it was changed. It can occurs if internal value changes, due to range update
    d->pos = d->equivalentPosition(d->value);

    if (emitMinimumChanged)
        emit minimumChanged(d->minimum);
    if (emitMaximumChanged)
        emit maximumChanged(d->maximum);

    d->emitValueAndPositionIfChanged(oldValue, oldPosition);
}
void DeclarativeProgressBar::setMinimum(int minimum)
{
	STYLE_OPTION(QStyleOptionProgressBarV2);
	option->minimum = minimum;
	emit minimumChanged(minimum);
	update();
}
void QRealProperty::setMinimum(qreal minimum)
{
    if (qSafeFuzzyCompare(_minimum, minimum) == false)
    {
        _minimum = minimum;
        emit minimumChanged();
    }
}
void QDeclarativeNdefFilter::setMinimum(int value)
{
    if (m_minimum == value)
        return;

    m_minimum = value;
    emit minimumChanged();
}
Beispiel #5
0
void QQuickDragAxis::setMinimum(qreal minimum)
{
    if (m_minimum == minimum)
        return;

    m_minimum = minimum;
    emit minimumChanged();
}
Beispiel #6
0
Aperture::Aperture(QtCamDevice *dev, QObject *parent) :
  Capability(parent),
  m_aperture(new QtCamAperture(dev, this)) {

  setCapability(m_aperture);

  QObject::connect(m_aperture, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
  QObject::connect(m_aperture, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
  QObject::connect(m_aperture, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
}
Beispiel #7
0
Iso::Iso(QtCamDevice *dev, QObject *parent) :
  Capability(parent),
  m_iso(new QtCamIso(dev, this)) {

  setCapability(m_iso);

  QObject::connect(m_iso, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
  QObject::connect(m_iso, SIGNAL(minimumValueChanged()), this, SIGNAL(minimumChanged()));
  QObject::connect(m_iso, SIGNAL(maximumValueChanged()), this, SIGNAL(maximunmChanged()));
}
Beispiel #8
0
/*!
  Sets the minimum value of the scrollbar to the given \a minimum.
  \sa minimum()
 */
void KScrollBar::setMinimum(qreal minimum)
{
    if (minimum != m_minimum) 
	{
        m_minimum = minimum;
        emit minimumChanged(minimum);
        setValue(m_value);
		updateSlider();
    }
}
void CLSValueSetpointEditor::setMinimum(double newMin)
{
	if (minimum_ != newMin || !minimumSet_) {
		minimumSet_ = true;
		minimum_ = newMin;

		emit minimumChanged(minimum_);
	}

	updateInputStatus();
}
Beispiel #10
0
QStyleItem::QStyleItem(QQuickPaintedItem *parent)
    : QQuickPaintedItem(parent),
    m_styleoption(0),
    m_itemType(Undefined),
    m_sunken(false),
    m_raised(false),
    m_active(true),
    m_selected(false),
    m_focus(false),
    m_hover(false),
    m_on(false),
    m_horizontal(true),
    m_sharedWidget(false),
    m_minimum(0),
    m_maximum(100),
    m_value(0),
    m_step(0),
    m_paintMargins(0),
    m_contentWidth(0),
    m_contentHeight(0)

{
    if (!qApp->style()) {
        qWarning("\nError: No widget style available. \n\nQt Desktop Components "
               "currently depend on the widget module to function. \n"
               "Use QApplication when creating standalone executables.\n\n");
        exit(-1);
    }
    m_font = qApp->font();
    setFlag(QQuickItem::ItemHasContents, true);
    setSmooth(false);

    connect(this, SIGNAL(enabledChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(infoChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(onChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(selectedChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(textChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(raisedChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(sunkenChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(hoverChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(maximumChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(minimumChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(valueChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(horizontalChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeControlChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(hasFocusChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeControlChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(elementTypeChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(textChanged()), this, SLOT(updateSizeHint()));
    connect(this, SIGNAL(contentWidthChanged(int)), this, SLOT(updateSizeHint()));
    connect(this, SIGNAL(contentHeightChanged(int)), this, SLOT(updateSizeHint()));
}
Beispiel #11
0
void KScrollBar::setRange( qreal min, qreal max )
{
	bool bChanged = false;
	if(m_minimum != min)
	{
		m_minimum = min;
		emit minimumChanged(min);
		bChanged = true;
	}
	if(m_maximum != max)
	{
		m_maximum = max;
		emit minimumChanged(max);
		bChanged = true;
	}
	if(bChanged)
	{
		setValue(m_value);
		updateSlider();
	}
}
Beispiel #12
0
QStyleItem::QStyleItem(QDeclarativeItem *parent)
    : QDeclarativeItem(parent),
    m_dummywidget(0),
    m_styleoption(0),
    m_type(Undefined),
    m_sunken(false),
    m_raised(false),
    m_active(true),
    m_selected(false),
    m_focus(false),
    m_on(false),
    m_horizontal(true),
    m_sharedWidget(false),
    m_minimum(0),
    m_maximum(100),
    m_value(0),
    m_paintMargins(0)
{
    setFlag(QGraphicsItem::ItemHasNoContents, false);
    setCacheMode(QGraphicsItem::DeviceCoordinateCache);
    setSmooth(true);

    connect(this, SIGNAL(infoChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(onChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(selectedChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(textChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(raisedChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(sunkenChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(hoverChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(maximumChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(minimumChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(valueChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(horizontalChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeControlChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(focusChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(activeControlChanged()), this, SLOT(updateItem()));
    connect(this, SIGNAL(elementTypeChanged()), this, SLOT(updateItem()));
}
Beispiel #13
0
int QRangeModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: valueChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 1: positionChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 2: stepSizeChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 3: invertedChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 4: minimumChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 5: maximumChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 6: positionAtMinimumChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 7: positionAtMaximumChanged((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 8: toMinimum(); break;
        case 9: toMaximum(); break;
        case 10: setValue((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 11: setPosition((*reinterpret_cast< qreal(*)>(_a[1]))); break;
        case 12: { qreal _r = valueForPosition((*reinterpret_cast< qreal(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< qreal*>(_a[0]) = _r; }  break;
        case 13: { qreal _r = positionForValue((*reinterpret_cast< qreal(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< qreal*>(_a[0]) = _r; }  break;
        default: ;
        }
        _id -= 14;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< qreal*>(_v) = value(); break;
        case 1: *reinterpret_cast< qreal*>(_v) = minimum(); break;
        case 2: *reinterpret_cast< qreal*>(_v) = maximum(); break;
        case 3: *reinterpret_cast< qreal*>(_v) = stepSize(); break;
        case 4: *reinterpret_cast< qreal*>(_v) = position(); break;
        case 5: *reinterpret_cast< qreal*>(_v) = positionAtMinimum(); break;
        case 6: *reinterpret_cast< qreal*>(_v) = positionAtMaximum(); break;
        case 7: *reinterpret_cast< bool*>(_v) = inverted(); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setValue(*reinterpret_cast< qreal*>(_v)); break;
        case 1: setMinimum(*reinterpret_cast< qreal*>(_v)); break;
        case 2: setMaximum(*reinterpret_cast< qreal*>(_v)); break;
        case 3: setStepSize(*reinterpret_cast< qreal*>(_v)); break;
        case 4: setPosition(*reinterpret_cast< qreal*>(_v)); break;
        case 5: setPositionAtMinimum(*reinterpret_cast< qreal*>(_v)); break;
        case 6: setPositionAtMaximum(*reinterpret_cast< qreal*>(_v)); break;
        case 7: setInverted(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 8;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
void VideoJobManager::slotMinimum(int value)
{
		emit minimumChanged(value);
}