/*! \property QGeoMapObject::zValue \brief the z-value of the map object. The z-value determines the order in which the objects are drawn on the screen. Objects with the same value will be drawn in the order that they were added to the map or map object. This is the same behaviour as QGraphicsItem. \since 1.1 */ void QGeoMapObject::setZValue(int zValue) { if (d_ptr->zValue != zValue) { d_ptr->zValue = zValue; emit zValueChanged(d_ptr->zValue); } }
//private void PrivateQGraphicsObject::setMGObj(MapGraphicsObject * mgObj) { _mgObj = mgObj; if (_mgObj == 0) return; //Connect signals/slots for all of the changes in the MapGraphicsObject that we must be able to handle connect(_mgObj, SIGNAL(enabledChanged()), this, SLOT(handleEnabledChanged())); connect(_mgObj, SIGNAL(opacityChanged()), this, SLOT(handleOpacityChanged())); connect(_mgObj, SIGNAL(parentChanged()), this, SLOT(handleParentChanged())); connect(_mgObj, SIGNAL(posChanged()), this, SLOT(handlePosChanged())); connect(_mgObj, SIGNAL(rotationChanged()), this, SLOT(handleRotationChanged())); connect(_mgObj, SIGNAL(visibleChanged()), this, SLOT(handleVisibleChanged())); connect(_mgObj, SIGNAL(zValueChanged()), this, SLOT(handleZValueChanged())); connect(_mgObj, SIGNAL(selectedChanged()), this, SLOT(handleMGSelectedChanged())); connect(_mgObj, SIGNAL(flagsChanged()), this, SLOT(handleMGFlagsChanged())); connect(mgObj, SIGNAL(keyFocusRequested()), this, SLOT(handleKeyFocusRequested())); //Get all of the info about the MGObject this->updateAllFromMG(); connect(mgObj, SIGNAL(destroyed()), this, SLOT(deleteLater())); }
void MapGraphicsObject::setZValue(qreal nZValue) { _zValue = nZValue; if (_constructed) this->zValueChanged(); else QTimer::singleShot(1, this, SIGNAL(zValueChanged())); }
ItemAnimation::ItemAnimation(QGraphicsItem *item, QObject *parent) : QObject(parent),mHide(false),mFade(None) { mMachine = new TransformMachine;//QGraphicsItemAnimation; QTimeLine *timer = new QTimeLine(1000); timer->setEasingCurve(QEasingCurve::OutQuad); timer->setFrameRange(0, 100); mMachine->setTimeLine(timer); connect(mMachine, SIGNAL(transformChanged(QTransform)), this, SLOT(setTransform(QTransform))); connect(mMachine, SIGNAL(zValueChanged(qreal)), this, SLOT(setZValue(qreal))); connect(mMachine, SIGNAL(posChanged(QPointF)), this, SLOT(setItemPos(QPointF))); connect(mMachine->timeLine(), SIGNAL(finished()), this, SLOT(tryHide())); connect(mMachine->timeLine(), SIGNAL(finished()), this, SIGNAL(finished())); setItem(item); }
void Curseurs::on_parametreZSlider_valueChanged(int value) { ui->zLcd->display((float)value * multiplicateur); emit zValueChanged((float)value * multiplicateur ) ; }