void WidgetSessions::showRelated(const qmf::Data& object, const QString &widget_type, ArrowDirection a) { if (!updateAll) if (this->hasData() && (arrow() != arrowNone)) { //qDebug("showRelated: %s needs an update", this->objectName().toStdString().c_str()); emit needUpdate(); return; } setArrow(a); if (widget_type == "widgetConnections") { qpid::types::Variant value = object.getProperty("address"); std::string name = value.asString(); related->setRelatedData("connectionRef", name); related->clearFilter(); emit needData(); return; } // the object is a subscription qpid::types::Variant value = object.getProperty("sessionRef"); QString name(value.asMap()["_object_name"].asString().c_str()); QString session = name.section(':', -1); related->setRelatedData("name", session.toStdString()); related->clearFilter(); //qDebug("showRelated: %s needs new data", this->objectName().toStdString().c_str()); emit needData(); }
void controlUC::setFixedWidth(int cx) { if( cx < 0 ) return; m_cxyFixed.cx = cx; if( !m_bFloat ) needParentUpdate(); else needUpdate(); }
void controlUC::setFixedHeight(int cy) { if( cy < 0 ) return; m_cxyFixed.cy = cy; if( !m_bFloat ) needParentUpdate(); else needUpdate(); }
//----------------------------------------------------------------------- Node::Node(const String& name) : mParent(0), mNeedParentUpdate(false), mNeedChildUpdate(false), mParentNotified(false), mQueuedForUpdate(false), mName(name), mOrientation(Quaternion::IDENTITY), mPosition(Vector3::ZERO), mScale(Vector3::UNIT_SCALE), mInheritOrientation(true), mInheritScale(true), mDerivedOrientation(Quaternion::IDENTITY), mDerivedPosition(Vector3::ZERO), mDerivedScale(Vector3::UNIT_SCALE), mInitialPosition(Vector3::ZERO), mInitialOrientation(Quaternion::IDENTITY), mInitialScale(Vector3::UNIT_SCALE), mCachedTransformOutOfDate(true), mListener(0), mDebug(0) { needUpdate(); }
void controlUC::setFixedXY(SIZE szXY) { m_cXY.cx = szXY.cx; m_cXY.cy = szXY.cy; if( !m_bFloat ) needParentUpdate(); else needUpdate(); }
//----------------------------------------------------------------------- void Node::translate(const Vector3& d, TransformSpace relativeTo) { switch(relativeTo) { case TS_LOCAL: // position is relative to parent so transform downwards mPosition += mOrientation * d; break; case TS_WORLD: // position is relative to parent so transform upwards if (mParent) { mPosition += (mParent->_getDerivedOrientation().Inverse() * d) / mParent->_getDerivedScale(); } else { mPosition += d; } break; case TS_PARENT: mPosition += d; break; } needUpdate(); }
//----------------------------------------------------------------------- void Node::setOrientation( const Quaternion & q ) { assert(!q.isNaN() && "Invalid orientation supplied as parameter"); mOrientation = q; mOrientation.normalise(); needUpdate(); }
//----------------------------------------------------------------------- Transform::Ptr Transform::SetLocalOrientation(const Quaternion & q) { orientation = q; orientation.Normalise(); needUpdate(true); return ThisPtr(); }
// [7/30/2008 zhangxiang] void sgNode::translate(const Vector3 &aTranslate, int aRelativeTo /* = TS_PARENT */){ Vector3 adjusted; switch(aRelativeTo){ case TS_LOCAL: // position is relative to parent so transform downwards m_RelativePosition += m_RelativeOrientation * aTranslate; break; case TS_WORLD: // position is relative to parent so transform upwards if (m_pParent){ m_RelativePosition += (m_pParent->_getDerivedOrientation().inverse() * aTranslate) / m_pParent->_getDerivedScale(); }else{ m_RelativePosition += aTranslate; } break; case TS_PARENT: m_RelativePosition += aTranslate; break; } needUpdate(); }
double MoviePvp::calcTimeScale(int batchIdx){ if(needUpdate(parent->simulationTime(), parent->getDeltaTime())){ return parent->getTimeScaleMin(); } else{ return HyPerLayer::calcTimeScale(batchIdx); } }
//----------------------------------------------------------------------- Transform::Ptr Transform::Scaled(const Vector3& multScale) { scale[0] *= multScale.x; scale[1] *= multScale.y; scale[0] *= multScale.z; needUpdate(true); return ThisPtr(); }
//----------------------------------------------------------------------- void Node::resetToInitialState(void) { mPosition = mInitialPosition; mOrientation = mInitialOrientation; mScale = mInitialScale; needUpdate(); }
// Dead Code. void TrackEditor::slotSegmentOrderChanged(int section, int fromIdx, int toIdx) { RG_DEBUG << QString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") .arg(section).arg(fromIdx).arg(toIdx) << endl; //!!! how do we get here? need to involve a command emit needUpdate(); }
//----------------------------------------------------------------------- void Node::setOrientation( Real w, Real x, Real y, Real z) { mOrientation.w = w; mOrientation.x = x; mOrientation.y = y; mOrientation.z = z; needUpdate(); }
//----------------------------------------------------------------------- void Node::scale(Real x, Real y, Real z) { mScale.x *= x; mScale.y *= y; mScale.z *= z; needUpdate(); }
//----------------------------------------------------------------------- Transform::Ptr Transform::Scaled(float x, float y, float z) { scale[0] *= x; scale[1] *= y; scale[0] *= z; needUpdate(true); return ThisPtr(); }
//----------------------------------------------------------------------- Transform::Ptr Transform::SetLocalScale(float x, float y, float z) { scale.x = x; scale.y = y; scale.z = z; needUpdate(true); return ThisPtr(); }
int TriggerTestConn::updateState(double time, double dt){ //4 different layers //No trigger, always update if(strcmp(name, "inputToNoTrigger") == 0 || strcmp(name, "inputToNoPeriod") == 0){ assert(needUpdate(time, dt) == true); } //Trigger with offset of 0, assuming display period is 5 else if(strcmp(name, "inputToTrigger0") == 0 || strcmp(name, "inputToPeriod0") == 0){ if(((int)time-1) % 5 == 0){ assert(needUpdate(time, dt) == true); } else{ assert(needUpdate(time, dt) == false); } } //Trigger with offset of 1, assuming display period is 5 else if(strcmp(name, "inputToTrigger1") == 0 || strcmp(name, "inputToPeriod1") == 0){ if(((int)time) % 5 == 0){ assert(needUpdate(time, dt) == true); } else{ assert(needUpdate(time, dt) == false); } } //Trigger with offset of 2, assuming display period is 5 else if(strcmp(name, "inputToTrigger2") == 0 || strcmp(name, "inputToPeriod2") == 0){ if(((int)time+1) % 5 == 0){ assert(needUpdate(time, dt) == true); } else{ assert(needUpdate(time, dt) == false); } } return HyPerConn::updateState(time, dt); }
void controlUC::setMaxHeight(int cy) { if( m_cxyMax.cy == cy ) return; if( cy < 0 ) return; m_cxyMax.cy = cy; if( !m_bFloat ) needParentUpdate(); else needUpdate(); }
// 初始化进度百分比 bool CUpdate::InitMainGauge() { wxInputStream *inputStream = getRemoteVersionFile(); if (!inputStream) return false; wxXmlDocument doc; if (doc.Load(*inputStream) == false) { delete inputStream; return false; } wxXmlNode *root = doc.GetRoot(); wxXmlNode *subRoot; if (root) root = root->GetChildren(); wxString name,gameVersion, gameName; long remoteVersion = 0; // 开始处理 while (root) { name = root->GetName(); if (name.IsSameAs(_("comment"))) { root = root->GetNext(); continue; } gameName = root->GetPropVal(_("name"),wxEmptyString); if (root->GetName() == _("game") && gameName.IsSameAs(_("SHZ"))) { gameVersion = root->GetPropVal(_("version"), _("")); // 获取该更新列表对应的游戏版本 gameVersion.ToLong(&remoteVersion); if (needUpdate(remoteVersion) == false) { root = root->GetNext(); continue; } subRoot = root->GetChildren(); while (subRoot) { // 判断是否是注释或者创建目录 name = subRoot->GetName(); if (name.IsSameAs(_("comment")) || name.IsSameAs(_("dir"))) { subRoot = subRoot->GetNext(); continue; } m_mainAmountValue++; subRoot = subRoot->GetNext(); } } root = root->GetNext(); } delete inputStream; m_updateVersion = remoteVersion; // 获取服务器最新版本 return true; }
void controlUC::setMaxWidth(int cx) { if( m_cxyMax.cx == cx ) return; if( cx < 0 ) return; m_cxyMax.cx = cx; if( !m_bFloat ) needParentUpdate(); else needUpdate(); }
//----------------------------------------------------------------------- Transform::Ptr Transform::SetLocalOrientation(float w, float x, float y, float z) { orientation.w = w; orientation.x = x; orientation.y = y; orientation.z = z; needUpdate(true); return ThisPtr(); }
void KdmPixmap::statusChanged() { KdmItem::statusChanged(); if(!pixmap.active.present && !pixmap.prelight.present) return; if((state == Sprelight && !pixmap.prelight.present) || (state == Sactive && !pixmap.active.present)) return; needUpdate(); }
void KdmRect::statusChanged() { KdmItem::statusChanged(); if (!rect.active.present && !rect.prelight.present) return; if ((state == Sprelight && !rect.prelight.present) || (state == Sactive && !rect.active.present)) return; needUpdate(); }
void KdmLabel::update() { KdmItem::update(); QString text = lookupText( label.text ); if (text != cText) { setCText( text ); needUpdate(); // emit needPlacement() as well? } }
void KdmLabel::statusChanged( bool descend ) { KdmItem::statusChanged( descend ); if (!label.active.present && !label.prelight.present) return; if ((state == Sprelight && !label.prelight.present) || (state == Sactive && !label.active.present)) return; needUpdate(); }
void Node::init(const NodeID& nID, const NodeType& type, const string& nameSuffix) { mNodeID = nID; mName = stringfyNodeID(mNodeID); mNameSuffix = nameSuffix; if (!nameSuffix.empty()) { mName += "_" + nameSuffix; } mNodeType = type; reset(); needUpdate(); }
Transform::Ptr Transform::RemoveAllChildren() { // Remove all children setting their parent pointers to null for ( TransformList::iterator childNode = children.begin(); childNode != children.end(); childNode++) { (*childNode)->parent = nullptr; } children.clear(); needUpdate(); return ThisPtr(); }
//----------------------------------------------------------------------- SceneNode::SceneNode(SceneManager* creator, const String& name) : Node(name) , mWireBoundingBox(0) , mShowBoundingBox(false) , mHideBoundingBox(false) , mCreator(creator) , mYawFixed(false) , mAutoTrackTarget(0) , mIsInSceneGraph(false) { needUpdate(); }
/*! sets the position of this node to pos in 'relativeTo' space. @note using TS_Object for this function yields the same result as calling translate(pos, TS_Object) */ void SLNode::translation(const SLVec3f& pos, SLTransformSpace relativeTo) { if (relativeTo == TS_world && _parent) { // transform position to local space SLVec3f localPos = _parent->updateAndGetWMI() * pos; _om.translation(localPos); } else _om.translation(pos); needUpdate(); }