本文整理汇总了C++中EventType::getIntValue方法的典型用法代码示例。如果您正苦于以下问题:C++ EventType::getIntValue方法的具体用法?C++ EventType::getIntValue怎么用?C++ EventType::getIntValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventType
的用法示例。
在下文中一共展示了EventType::getIntValue方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onNavigateComplete
////////////////////////////////////////////////////////////////////////////////
// virtual
void onNavigateComplete(const EventType& event)
{
if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE)
{
if(mInitState < INIT_STATE_RUNNING)
{
setInitState(INIT_STATE_RUNNING);
// Clear the history, so the "back" button doesn't take you back to "about:blank".
LLQtWebKit::getInstance()->clearHistory(mBrowserWindowId);
}
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
message.setValue("uri", event.getEventUri());
message.setValueS32("result_code", event.getIntValue());
message.setValue("result_string", event.getStringValue());
message.setValueBoolean("history_back_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK));
message.setValueBoolean("history_forward_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD));
sendMessage(message);
setStatus(STATUS_LOADED);
}
else if(mInitState == INIT_STATE_NAVIGATING)
{
setInitState(INIT_STATE_NAVIGATE_COMPLETE);
}
}
示例2: onCursorChanged
////////////////////////////////////////////////////////////////////////////////
// virtual
void onCursorChanged(const EventType& event)
{
LLQtWebKit::ECursor llqt_cursor = (LLQtWebKit::ECursor)event.getIntValue();
std::string name;
switch(llqt_cursor)
{
case LLQtWebKit::C_ARROW:
name = "arrow";
break;
case LLQtWebKit::C_IBEAM:
name = "ibeam";
break;
case LLQtWebKit::C_SPLITV:
name = "splitv";
break;
case LLQtWebKit::C_SPLITH:
name = "splith";
break;
case LLQtWebKit::C_POINTINGHAND:
name = "hand";
break;
default:
llwarns << "Unknown cursor ID: " << (int)llqt_cursor << llendl;
break;
}
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "cursor_changed");
message.setValue("name", name);
sendMessage(message);
}
示例3: onNavigateComplete
////////////////////////////////////////////////////////////////////////////////
// virtual
void LLMediaImplLLMozLib::onNavigateComplete( const EventType& eventIn )
{
// force an update when the page is finished
mNeedsUpdate = true;
// pass in url and HTML response code (200/404 etc.)
LLMediaEvent event( this, eventIn.getEventUri(), eventIn.getIntValue() );
mEventEmitter.update( &LLMediaObserver::onNavigateComplete, event );
}
示例4: onUpdateProgress
////////////////////////////////////////////////////////////////////////////////
// virtual
void onUpdateProgress(const EventType& event)
{
if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "progress");
message.setValueS32("percent", event.getIntValue());
sendMessage(message);
}
}
示例5: onNavigateErrorPage
////////////////////////////////////////////////////////////////////////////////
// virtual
void onNavigateErrorPage( const EventType& event )
{
std::cout << "Error page hit with code of " << event.getIntValue() << " - navigating to another URL" << std::endl;
LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "http://bestbuy.com" );
};
示例6: onCookieChanged
////////////////////////////////////////////////////////////////////////////////
// virtual
void onCookieChanged( const EventType& eventIn )
{
int dead = eventIn.getIntValue();
std::cout << (dead?"deleting cookie: ":"setting cookie: ") << eventIn.getStringValue() << std::endl;
}
示例7: onUpdateProgress
////////////////////////////////////////////////////////////////////////////////
// virtual
void onUpdateProgress( const EventType& eventIn )
{
std::cout << "Event: progress value updated to " << eventIn.getIntValue() << std::endl;
};
示例8: onUpdateProgress
////////////////////////////////////////////////////////////////////////////////
// virtual
void LLMediaImplLLMozLib::onUpdateProgress( const EventType& eventIn )
{
LLMediaEvent event( this, eventIn.getIntValue() );
mEventEmitter.update( &LLMediaObserver::onUpdateProgress, event );
}
示例9: onUpdateProgress
////////////////////////////////////////////////////////////////////////////////
// virtual
void LLWebBrowserCtrl::onUpdateProgress( const EventType& eventIn )
{
// chain this event on to observers of an instance of LLWebBrowserCtrl
LLWebBrowserCtrlEvent event( eventIn.getIntValue() );
mEventEmitter.update( &LLWebBrowserCtrlObserver::onUpdateProgress, event );
}