本文整理汇总了C++中KObjectRef::GetString方法的典型用法代码示例。如果您正苦于以下问题:C++ KObjectRef::GetString方法的具体用法?C++ KObjectRef::GetString怎么用?C++ KObjectRef::GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KObjectRef
的用法示例。
在下文中一共展示了KObjectRef::GetString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Configure
void Notification::Configure(KObjectRef properties)
{
this->title = properties->GetString("title");
this->message = properties->GetString("message");
this->iconURL = properties->GetString("icon");
this->timeout = properties->GetInt("timeout", -1);
this->clickedCallback = properties->GetMethod("callback");
}
示例2: GetContextId
static string GetContextId(KObjectRef global)
{
string contextId(global->GetString("__php_module_id__"));
if (contextId.empty())
{
static int nextId = 0;
contextId.append("__kroll__namespace__");
contextId.append(KList::IntToChars(++nextId));
global->SetString("__php_module_id__", contextId);
}
return contextId;
}
示例3: WindowConfig
/*static*/
AutoPtr<WindowConfig> WindowConfig::FromProperties(KObjectRef properties)
{
WindowConfig* c = new WindowConfig();
c->SetID(properties->GetString("id", c->GetID()));
c->SetURL(properties->GetString("url", c->GetURL()));
c->SetURLRegex(properties->GetString("urlRegex", c->GetURLRegex()));
c->SetTitle(properties->GetString("title", c->GetTitle()));
c->SetContents(properties->GetString("contents", c->GetContents()));
c->SetURLRegex(properties->GetString("baseURL", c->GetBaseURL()));
c->SetX(properties->GetInt("x", c->GetX()));
c->SetY(properties->GetInt("y", c->GetY()));
c->SetWidth(properties->GetInt("width", c->GetWidth()));
c->SetMinWidth(properties->GetInt("minWidth", c->GetMinWidth()));
c->SetMaxWidth(properties->GetInt("maxWidth", c->GetMaxWidth()));
c->SetHeight(properties->GetInt("height", c->GetHeight()));
c->SetMinHeight(properties->GetInt("minHeight", c->GetMinHeight()));
c->SetMaxHeight(properties->GetInt("maxHeight", c->GetMaxHeight()));
c->SetMaximizable(CoerceBool(properties, "maximizable", c->IsMaximizable()));
c->SetMinimizable(CoerceBool(properties, "minimizable", c->IsMinimizable()));
c->SetCloseable(CoerceBool(properties, "closeable", c->IsCloseable()));
c->SetResizable(CoerceBool(properties, "resizable", c->IsResizable()));
c->SetFullscreen(CoerceBool(properties, "fullscreen", c->IsFullscreen()));
c->SetMaximized(CoerceBool(properties, "maximized", c->IsMaximized()));
c->SetMinimized(CoerceBool(properties, "minimized", c->IsMinimized()));
c->SetUsingChrome(CoerceBool(properties, "usingChrome", c->IsUsingChrome()));
c->SetToolWindow(CoerceBool(properties, "toolWindow", c->IsToolWindow()));
c->SetTopMost(CoerceBool(properties, "topMost", c->IsTopMost()));
c->SetVisible(CoerceBool(properties, "visible", c->IsVisible()));
c->SetTransparentBackground(CoerceBool(properties,
"transparentBackground", c->HasTransparentBackground()));
c->SetTransparency(properties->GetDouble("transparency", c->GetTransparency()));
#ifdef OS_OSX
c->SetTexturedBackground(properties->GetDouble("texturedBackground", c->HasTexturedBackground()));
#endif
EnforceMaxMinConstraints(c);
EnforceTransparentBackgroundSettings(c);
return c;
}