本文整理汇总了C++中GetUniqueID函数的典型用法代码示例。如果您正苦于以下问题:C++ GetUniqueID函数的具体用法?C++ GetUniqueID怎么用?C++ GetUniqueID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetUniqueID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QAction
void Plugin::handleBatteryInfo (BatteryInfo info)
{
if (!Battery2Action_.contains (info.ID_))
{
QAction *act = new QAction (tr ("Battery status"), this);
act->setProperty ("WatchActionIconChange", true);
act->setProperty ("Liznoo/BatteryID", info.ID_);
act->setProperty ("Action/Class", GetUniqueID () + "/BatteryAction");
act->setProperty ("Action/ID", GetUniqueID () + "/" + info.ID_);
emit gotActions (QList<QAction*> () << act, AEPLCTray);
Battery2Action_ [info.ID_] = act;
connect (act,
SIGNAL (triggered ()),
this,
SLOT (handleHistoryTriggered ()));
}
UpdateAction (info);
CheckNotifications (info);
Battery2LastInfo_ [info.ID_] = info;
}
示例2: GetBattIconName
void Plugin::handleBatteryInfo (BatteryInfo info)
{
#if QT_VERSION < 0x050000
const auto& iconName = GetBattIconName (info);
if (!Battery2Action_.contains (info.ID_))
{
QAction *act = new QAction (tr ("Battery status"), this);
act->setProperty ("WatchActionIconChange", true);
act->setProperty ("Liznoo/BatteryID", info.ID_);
act->setProperty ("Action/Class", GetUniqueID () + "/BatteryAction");
act->setProperty ("Action/ID", GetUniqueID () + "/" + info.ID_);
act->setProperty ("ActionIcon", iconName);
emit gotActions ({ act }, ActionsEmbedPlace::LCTray);
Battery2Action_ [info.ID_] = act;
connect (act,
SIGNAL (triggered ()),
this,
SLOT (handleHistoryTriggered ()));
}
else
Battery2Action_ [info.ID_]->setProperty ("ActionIcon", iconName);
#endif
CheckNotifications (info);
Battery2LastInfo_ [info.ID_] = info;
}
示例3: SetContent
void CStringID::SetContentWithExpectedCRC(const char* content, bool noCase, bool resolve, IDType crc)
{
SetContent(content, noCase, resolve);
IDType computedCrc = GetUniqueID();
if (crc != computedCrc)
{
BEHAVIAC_ASSERT(false, "C%sStringID(0x%08X, \"%s\") has wrong CRC (should be 0x%08X!) RETAIL BUILDS WILL USE THE WRONG VALUE, THIS MUST BE FIXED P0!",
noCase ? "NoCase" : "", crc, content, GetUniqueID());
}
}
示例4: Input
/******************************************************************************
Function Name : CBaseEntityTA
Input(s) : CBaseEntityTA& RefObj
Output : -
Functionality : Copy Constructor
Member of : CBaseEntityTA
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
******************************************************************************/
CBaseEntityTA::CBaseEntityTA(const CBaseEntityTA& RefObj)
{
m_dwNextID = RefObj.m_dwNextID;
m_dwID = GetUniqueID();
m_eType = RefObj.m_eType;
m_lDefaultChannelUsed = RefObj.m_lDefaultChannelUsed;
}
示例5: dAssert
void dLineNodeInfo::DrawWireFrame(dSceneRender* const render, dScene* const scene, dScene::dTreeNode* const myNode) const
{
dAssert (myNode == scene->Find(GetUniqueID()));
dAssert (scene->GetInfoFromNode(myNode) == this);
// int displayList = render->GetCachedFlatShadedDisplayList(m_mesh);
// dAssert (displayList > 0);
if (m_curve.GetControlPointArray()) {
dVector savedColor (render->GetColor());
render->PushMatrix(&m_matrix[0][0]);
//render->DrawDisplayList(displayList);
render->BeginLine();
render->SetColor(dVector (1.0f, 1.0f, 1.0f));
dFloat scale = 1.0f / m_renderSegments;
dBigVector p0 (m_curve.CurvePoint(0.0f));
for (int i = 1; i <= m_renderSegments; i ++) {
dFloat u = i * scale;
dBigVector p1 (m_curve.CurvePoint(u));
render->DrawLine (dVector(dFloat(p0.m_x), dFloat(p0.m_y), dFloat(p0.m_z), dFloat(p0.m_w)), dVector(dFloat(p1.m_x), dFloat(p1.m_y), dFloat(p1.m_z), dFloat(p1.m_w)));
p0 = p1;
}
render->End();
render->PopMatrix();
render->SetColor(savedColor);
}
}
示例6: GenerateIDIfNeeded
OP_STATUS SpeedDialData::GenerateIDIfNeeded(BOOL force, BOOL use_hash, INT32 position)
{
// generate a unique id
if(force || GetUniqueID().IsEmpty())
{
if(use_hash && position > 0)
{
// Generate a hash based on the position and url, only call on upgrade from < 11.10
// See https://ssl.opera.com:8008/developerwiki/Opera_Link/Speeddial_2.0#General_notes
OpString8 str8, url, md5;
RETURN_IF_ERROR(url.SetUTF8FromUTF16(GetURL()));
RETURN_IF_ERROR(str8.AppendFormat("%d%s", position, url.CStr()));
RETURN_IF_ERROR(OpMisc::CalculateMD5Checksum(str8.CStr(), str8.Length(), md5));
md5.MakeUpper();
RETURN_IF_ERROR(m_unique_id.Set(md5.CStr()));
}
else
{
// generate a default unique ID
RETURN_IF_ERROR(StringUtils::GenerateClientID(m_unique_id));
}
}
return OpStatus::OK;
}
示例7: SetChunk
AAX_Result IPlugAAX::SetChunk(AAX_CTypeID chunkID, const AAX_SPlugInChunk * iChunk )
{
TRACE;
if (chunkID == GetUniqueID())
{
ByteChunk IPlugChunk;
IPlugChunk.PutBytes(iChunk->fData, iChunk->fSize);
int pos = 0;
//GetIPlugVerFromChunk(&IPlugChunk, &pos);
pos = UnserializeState(&IPlugChunk, pos);
for (int i = 0; i< NParams(); i++)
{
SetParameterNormalizedValue(mParamIDs.Get(i)->Get(), GetParam(i)->GetNormalized() );
}
RedrawParamControls(); //TODO: what about icontrols not linked to params how do they get redrawn - setdirty via UnserializeState()?
mNumPlugInChanges++; // necessary in order to cause CompareActiveChunk() to get called again and turn off the compare light
return AAX_SUCCESS;
}
return AAX_ERROR_INVALID_CHUNK_ID;
}
示例8: FPathFindingQuery
FAsyncPathFindingQuery::FAsyncPathFindingQuery(const UObject* InOwner, const ANavigationData& InNavData, const FVector& Start, const FVector& End, const FNavPathQueryDelegate& Delegate, TSharedPtr<const FNavigationQueryFilter> SourceQueryFilter)
: FPathFindingQuery(InOwner, InNavData, Start, End, SourceQueryFilter)
, QueryID(GetUniqueID())
, OnDoneDelegate(Delegate)
{
}
示例9: tr
void Plugin::NotifyBirthday (ICLEntry *entry, int days)
{
const auto& hrId = entry->GetEntryName ();
const QString& notify = days ?
tr ("%1 has birthday in %n day(s)!", 0, days).arg (hrId) :
tr ("%1 has birthday today!").arg (hrId);
auto e = Util::MakeNotification (tr ("Birthday reminder"), notify, PInfo_);
e.Additional_ ["org.LC.AdvNotifications.SenderID"] = GetUniqueID ();
e.Additional_ ["org.LC.AdvNotifications.EventCategory"] = AN::CatOrganizer;
e.Additional_ ["org.LC.AdvNotifications.EventID"] = "org.LC.Plugins.Azoth.BirthdayNotifier.Birthday/" + entry->GetEntryID ();
e.Additional_ ["org.LC.AdvNotifications.VisualPath"] = QStringList (hrId);
e.Additional_ ["org.LC.AdvNotifications.EventType"] = AN::TypeOrganizerEventDue;
e.Additional_ ["org.LC.AdvNotifications.FullText"] = notify;
e.Additional_ ["org.LC.AdvNotifications.ExtendedText"] = notify;
e.Additional_ ["org.LC.AdvNotifications.Count"] = 1;
const auto& px = QPixmap::fromImage (entry->GetAvatar ());
if (!px.isNull ())
e.Additional_ ["NotificationPixmap"] = px;
emit gotEntity (e);
}
示例10: OnHitEntity
void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos)
{
if (!a_EntityHit.IsMob() && !a_EntityHit.IsMinecart() && !a_EntityHit.IsPlayer() && !a_EntityHit.IsBoat())
{
// Not an entity that interacts with an arrow
return;
}
int Damage = (int)(GetSpeed().Length() / 20 * m_DamageCoeff + 0.5);
if (m_IsCritical)
{
Damage += m_World->GetTickRandomNumber(Damage / 2 + 2);
}
a_EntityHit.TakeDamage(dtRangedAttack, this, Damage, 1);
// Broadcast successful hit sound
m_World->BroadcastSoundEffect(
"random.successful_hit",
(int)std::floor(GetPosX() * 8.0),
(int)std::floor(GetPosY() * 8.0),
(int)std::floor(GetPosZ() * 8.0),
0.5f,
0.75f + ((float)((GetUniqueID() * 23) % 32)) / 64.0f
);
Destroy();
}
示例11: Build
bool VUINodeRotator::Build(TiXmlElement *pNode, const char *szPath, bool bWrite)
{
if ( bWrite == false )
{
return VPushButton::Build( pNode,szPath,bWrite);
}
if ( GetUniqueID() != 0 )
{
VString szID = VGUIManager::GetIDName( (int)GetUniqueID() );
XMLHelper::Exchange_String(pNode,"ID",szID,bWrite);
}
XMLHelper::Exchange_Floats(pNode,"pos",m_vPosition.data,2,bWrite);
XMLHelper::Exchange_Floats(pNode,"size",m_vSize.data,2,bWrite);
VUINodeExportHelperXML::GlobalManager().BuildImageState( &m_ButtonCfg , this , XMLHelper::SubNode(pNode,"image",bWrite) , szPath,bWrite );
VUINodeExportHelperXML::GlobalManager().BuildTextState( &m_TextCfg , this , XMLHelper::SubNode(pNode,"text",bWrite) , szPath,bWrite );
// m_ButtonCfg.SetStretchMode(VImageState::TEXTURE_SIZE);
// get the size of the control
if (m_vSize.x<=0.f)
{
m_vSize = m_ButtonCfg.m_States[VDlgControlBase::NORMAL].GetSize();
float fBoxWidth = m_vSize.x;
hkvVec2 vTextSize = m_TextCfg.m_States[VDlgControlBase::NORMAL].GetSize();
m_vSize.x += vTextSize.x + fBoxWidth;
m_vSize.y = hkvMath::Max(m_vSize.y,vTextSize.y);
// offset the text by the size of the checkbox
for (int i=0;i<VWindowBase::STATE_COUNT;i++)
{
hkvVec2 vNewOfs = m_TextCfg.m_States[i].GetTextOfs();
vNewOfs.x += fBoxWidth;
m_TextCfg.m_States[i].SetTextOfs(vNewOfs);
}
}
// initial checked status (actually same as selected)
bool bChecked = false;
XMLHelper::Exchange_Bool(pNode,"checked",bChecked,bWrite);
return true;
}
示例12: GetUniqueID
QList<EffectInfo> Plugin::GetEffects () const
{
return
{
{
GetUniqueID () + ".Filter",
tr ("Visual effects"),
{},
false,
[this] (const QByteArray&, IPath*) -> IFilterElement*
{
return new VisualFilter
{
GetUniqueID () + ".Filter",
LmpProxy_
};
}
}
};
}
示例13: GetUniqueID
void CVideoInfoTag::SetUniqueIDs(std::map<std::string, std::string> uniqueIDs)
{
for (const auto& uniqueid : uniqueIDs)
{
if (uniqueid.first.empty())
uniqueIDs.erase(uniqueid.first);
}
if (uniqueIDs.find(m_strDefaultUniqueID) == uniqueIDs.end())
uniqueIDs[m_strDefaultUniqueID] = GetUniqueID();
m_uniqueIDs = std::move(uniqueIDs);
}
示例14: GetUniqueID
QList<EffectInfo> Plugin::GetEffects () const
{
return
{
{
GetUniqueID () + ".Filter",
tr ("HTTP streaming"),
{},
false,
[this] (const QByteArray& instance, IPath *path) -> IFilterElement*
{
return new HttpStreamFilter
{
GetUniqueID () + ".Filter",
instance,
path
};
}
}
};
}
示例15:
Actor::Actor ()
{
//_drawable=new Drawable();
//_physics= new BasicPhysics(PhysicsArgu::basicArgu);
_drawable=NULL;
_physics=NULL;
_collider=NULL;
_ID=GetUniqueID();
_position = Vector2D::ZERO;
// _isCollidable = true;
}