本文整理汇总了C++中webcore::Page::goToItem方法的典型用法代码示例。如果您正苦于以下问题:C++ Page::goToItem方法的具体用法?C++ Page::goToItem怎么用?C++ Page::goToItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Page
的用法示例。
在下文中一共展示了Page::goToItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: forward
/*!
Sets the current item to be the next item in the history and goes to the
corresponding page; i.e., goes forward one history item.
\sa back(), goToItem()
*/
void QWebHistory::forward()
{
if (canGoForward()) {
WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
page->goToItem(d->lst->forwardItem(), WebCore::FrameLoadTypeIndexedBackForward);
}
}
示例2: WebHistoryRestoreIndex
static void WebHistoryRestoreIndex(JNIEnv* env, jobject obj, jint frame, jint index)
{
LOG_ASSERT(frame, "RestoreState needs a valid Frame pointer!");
WebCore::Frame* pFrame = (WebCore::Frame*)frame;
WebCore::Page* page = pFrame->page();
WebCore::HistoryItem* currentItem =
page->backForwardList()->entries()[index].get();
// load the current page with FrameLoadTypeIndexedBackForward so that it
// will use cache when it is possible
page->goToItem(currentItem, FrameLoadTypeIndexedBackForward);
}
示例3: goToItem
/*!
Sets the current item to be the specified \a item in the history and goes to the page.
\sa back(), forward()
*/
void QWebHistory::goToItem(const QWebHistoryItem &item)
{
WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
page->goToItem(item.d->item, WebCore::FrameLoadTypeIndexedBackForward);
}
示例4: goToItem
/*!
Sets the current item to be the specified \a item in the history and goes to the page.
\sa back(), forward()
*/
void QWebHistory::goToItem(const QWebHistoryItem &item)
{
d->lst->goToItem(item.d->item);
WebCore::Page* page = d->lst->page();
page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
}