本文整理汇总了C++中page函数的典型用法代码示例。如果您正苦于以下问题:C++ page函数的具体用法?C++ page怎么用?C++ page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: page
void KinotifyWidget::showEvent (QShowEvent*)
{
DefaultSize_ = page ()->mainFrame ()->contentsSize ();
resize (DefaultSize_);
SetWidgetPlace ();
}
开发者ID:dreamsxin,项目名称:leechcraft,代码行数:6,代码来源:kinotifywidget.cpp
示例2: setPageEnabled
/*!
Returns \c true if the page at \a index is enabled; otherwise \c false.
\sa setPageEnabled()
*/
bool QxtConfigWidget::isPageEnabled(int index) const
{
const QWidget* widget = page(index);
return widget && widget->isEnabled();
}
开发者ID:npsm,项目名称:libqxt,代码行数:10,代码来源:qxtconfigwidget.cpp
示例3: String
void Console::groupEnd()
{
InspectorInstrumentation::addMessageToConsole(page(), JSMessageSource, EndGroupMessageType, LogMessageLevel, String(), 0, String());
}
开发者ID:13W,项目名称:phantomjs,代码行数:4,代码来源:Console.cpp
示例4: page
bool CurrentUrl::wasRedirectedAndNotModifiedByJavascript() {
return !wasRegularLoad() && page()->currentFrame()->url() == page()->history()->currentItem().url();
}
开发者ID:IdeaMarshal,项目名称:capybara-webkit,代码行数:3,代码来源:CurrentUrl.cpp
示例5: markTimeline
void Console::markTimeline(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack>)
{
InspectorInstrumentation::consoleMarkTimeline(page(), arguments);
}
开发者ID:13W,项目名称:phantomjs,代码行数:4,代码来源:Console.cpp
示例6: timeEnd
void Console::timeEnd(const String& title, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack> callStack)
{
InspectorInstrumentation::stopConsoleTiming(page(), title, callStack);
}
开发者ID:13W,项目名称:phantomjs,代码行数:4,代码来源:Console.cpp
示例7: menu
void CustomWebView::contextMenuEvent (QGraphicsSceneContextMenuEvent *e)
{
QPointer<QMenu> menu (new QMenu ());
QWebHitTestResult r = page ()->
mainFrame ()->hitTestContent (e->pos ().toPoint ());
IHookProxy_ptr proxy (new Util::DefaultHookProxy ());
emit hookWebViewContextMenu (proxy, this, e, r,
menu, WVSStart);
if (!r.linkUrl ().isEmpty ())
{
QUrl url = r.linkUrl ();
QString text = r.linkText ();
if (XmlSettingsManager::Instance ()->
property ("TryToDetectRSSLinks").toBool ())
{
bool hasAtom = text.contains ("Atom");
bool hasRSS = text.contains ("RSS");
if (hasAtom || hasRSS)
{
LeechCraft::Entity e;
if (hasAtom)
{
e.Additional_ ["UserVisibleName"] = "Atom";
e.Mime_ = "application/atom+xml";
}
else
{
e.Additional_ ["UserVisibleName"] = "RSS";
e.Mime_ = "application/rss+xml";
}
e.Entity_ = url;
e.Parameters_ = LeechCraft::FromUserInitiated |
LeechCraft::OnlyHandle;
bool ch = false;
emit couldHandle (e, &ch);
if (ch)
{
QList<QVariant> datalist;
datalist << url
<< e.Mime_;
menu->addAction (tr ("Subscribe"),
this,
SLOT (subscribeToLink ()))->setData (datalist);
menu->addSeparator ();
}
}
}
menu->addAction (tr ("Open &here"),
this, SLOT (openLinkHere ()))->setData (url);
menu->addAction (tr ("Open in new &tab"),
this, SLOT (openLinkInNewTab ()))->setData (url);
menu->addSeparator ();
menu->addAction (tr ("&Save link..."),
this, SLOT (saveLink ()));
QList<QVariant> datalist;
datalist << url
<< text;
menu->addAction (tr ("&Bookmark link..."),
this, SLOT (bookmarkLink ()))->setData (datalist);
menu->addSeparator ();
if (!page ()->selectedText ().isEmpty ())
menu->addAction (pageAction (QWebPage::Copy));
menu->addAction (tr ("&Copy link"),
this, SLOT (copyLink ()));
if (page ()->settings ()->testAttribute (QWebSettings::DeveloperExtrasEnabled))
menu->addAction (pageAction (QWebPage::InspectElement));
}
else if (page ()->selectedText ().contains (UrlInText))
{
menu->addAction (tr ("Open as link"),
this, SLOT (openLinkInNewTab ()))->
setData (page ()->selectedText ());
}
emit hookWebViewContextMenu (proxy, this, e, r,
menu, WVSAfterLink);
if (!r.imageUrl ().isEmpty ())
{
if (!menu->isEmpty ())
menu->addSeparator ();
menu->addAction (tr ("Open image here"),
this, SLOT (openImageHere ()))->setData (r.imageUrl ());
menu->addAction (tr ("Open image in new tab"),
this, SLOT (openImageInNewTab ()));
menu->addSeparator ();
menu->addAction (tr ("Save image..."),
this, SLOT (saveImage ()));
QAction *spx = menu->addAction (tr ("Save pixmap..."),
//.........这里部分代码省略.........
开发者ID:panter-dsd,项目名称:leechcraft,代码行数:101,代码来源:customwebview.cpp
示例8: page
void FrameFocus::findFrames() {
frames = page()->currentFrame()->childFrames();
}
开发者ID:arieliten,项目名称:capybara-webkit,代码行数:3,代码来源:FrameFocus.cpp
示例9: Entity_constructPage
void Entity_constructPage( PreferenceGroup& group ){
PreferencesPage page( group.createPage( "Entities", "Entity Display Preferences" ) );
Entity_constructPreferences( page );
}
开发者ID:xonotic,项目名称:netradient,代码行数:4,代码来源:entity.cpp
示例10: page
//! [MainWindow - addJSObject]
void MainWin::addJSObject() {
// Add pAnalyzer to JavaScript Frame as member "imageAnalyzer".
page()->mainFrame()->addToJavaScriptWindowObject(QString("imageAnalyzer"), m_analyzer);
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:5,代码来源:mainwindow.cpp
示例11: page
void WebView::setLinkDelegationPolicy ( QWebPage::LinkDelegationPolicy p )
{
page()->setLinkDelegationPolicy( p );
}
开发者ID:DSastre,项目名称:supercollider,代码行数:4,代码来源:QcWebView.cpp
示例12: page
void AWebView::addJavaScriptObject()
{
//JS object name download access through an object m downLoad
page()->mainFrame()->addToJavaScriptWindowObject("download", m_downLoad);
}
开发者ID:hechaoyuyu,项目名称:SetWallPaper,代码行数:5,代码来源:webview.cpp
示例13: count
void Console::count(PassRefPtr<ScriptArguments> arguments, PassRefPtr<ScriptCallStack> callStack)
{
InspectorInstrumentation::consoleCount(page(), arguments, callStack);
}
开发者ID:13W,项目名称:phantomjs,代码行数:4,代码来源:Console.cpp
示例14: delegateReload
bool WebView::delegateReload() const
{
WebPage *p = qobject_cast<QtCollider::WebPage*>(page());
Q_ASSERT(p);
return p->delegateReload();
}
开发者ID:DSastre,项目名称:supercollider,代码行数:6,代码来源:QcWebView.cpp
示例15: time
void Console::time(const String& title)
{
InspectorInstrumentation::startConsoleTiming(page(), title);
}
开发者ID:13W,项目名称:phantomjs,代码行数:4,代码来源:Console.cpp
示例16: setDelegateReload
void WebView::setDelegateReload( bool flag )
{
WebPage *p = qobject_cast<QtCollider::WebPage*>(page());
Q_ASSERT(p);
p->setDelegateReload( flag );
}
开发者ID:DSastre,项目名称:supercollider,代码行数:6,代码来源:QcWebView.cpp
示例17: chapter
// Output the annotations for the whole chapter nr ch
void chapter(int ch)
{
for (int pg=chapterdata[ch].pgfirst; pg<=chapterdata[ch].pglast; pg++) {
page(ch, pg);
}
}
开发者ID:HopsSplurt,项目名称:Scaliger,代码行数:7,代码来源:xfdfgen.c
示例18: page
void WebView::onFeaturePermissionRequest(const QUrl &securityOrigin, QWebEnginePage::Feature feature)
{
if(Preferences::getInstance()->isPermissionGranted(feature))
{
page()->setFeaturePermission(securityOrigin, feature, QWebEnginePage::PermissionGrantedByUser);
return;
}
if(Preferences::getInstance()->isPermissionDenied(feature))
{
page()->setFeaturePermission(securityOrigin, feature, QWebEnginePage::PermissionDeniedByUser);
return;
}
auto permissionString = [](QWebEnginePage::Feature feature) {
switch(feature)
{
case QWebEnginePage::Geolocation:
return tr("current location");
case QWebEnginePage::MediaAudioVideoCapture:
return tr("camera and microphone");
case QWebEnginePage::MediaAudioCapture:
return tr("microphone");
case QWebEnginePage::MediaVideoCapture:
return tr("camera");
default:
return tr("unknown");
}
};
qDebug() << Q_FUNC_INFO;
qDebug() << securityOrigin << " " << feature;
QMessageBox *box = new QMessageBox(QMessageBox::Question,
tr("Permission Request"),
tr("VRSteam wants to access your %1, do you want to allow that?").arg(permissionString(feature)),
QMessageBox::Yes | QMessageBox::No,
this);
QCheckBox *checkBox = new QCheckBox(tr("Remember this decision"), box);
box->setCheckBox(checkBox);
box->exec();
bool accepted = box->clickedButton() == box->button(QMessageBox::Yes);
if(accepted)
{
qDebug() << "Accepted feature request";
page()->setFeaturePermission(securityOrigin, feature, QWebEnginePage::PermissionGrantedByUser);
}
else
{
qDebug() << "Denied feature request";
page()->setFeaturePermission(securityOrigin, feature, QWebEnginePage::PermissionDeniedByUser);
}
if(checkBox->isChecked())
{
Preferences::getInstance()->setPermission(feature, accepted);
}
}
开发者ID:zhipeng515,项目名称:VRSteam,代码行数:62,代码来源:webview.cpp
示例19: page
/////////////////////////////////////////////////////////////////////////////////
// 函数:SendMsg //
// 说明:通过指定端口,发送短信 //
// 参数: //
// strRecvPhone,接收手机号码 //
// strMsgContent,短信内容 //
// strPortName,串行端口的名称 //
/////////////////////////////////////////////////////////////////////////////////
int CSerialPort::SendMsg(CString strRecvPhone , CString strMsgContent)
{
m_strRecvPhone = strRecvPhone;
m_strMsgContent = strMsgContent;
int i=0 , t=0;
char ans[128]; // 应答串
//char SCA[16]; // 短消息服务中心号码(SMSC地址)
char TPA[16]; // 目标号码或回复号码(TP-DA或TP-RA)
//char TP_PID; // 用户信息协议标识(TP-PID)
//char TP_DCS; // 用户信息编码方式(TP-DCS)
// char TP_UD[161]; // 原始用户信息(编码前或解码后的TP-UD)
char cmd[20];
MsgList *msglist = new MsgList;
int iPage = page(strMsgContent.GetBuffer(strMsgContent.GetLength()),msglist);
t= m_strRecvPhone.GetLength()+2;
for(i=2;i<t;i++)
{
TPA[i]=m_strRecvPhone.GetAt(i-2);
}
TPA[0]='8';
TPA[1]='6';
TPA[t]='\0';
for(int iIndex=0 ;iIndex < iPage;iIndex++)
{
sprintf(cmd , "AT\r");
WritePort(cmd, strlen(cmd));
Sleep(ShortSleepTime);
int nLength = ReadPort(ans, 128);
ans[nLength] = '\0';
sprintf(cmd, "ATE0\r");
WritePort(cmd, strlen(cmd));
Sleep(ShortSleepTime);
nLength = ReadPort(ans, 128);
ans[nLength] = '\0';
sprintf(cmd, "AT+CSMS=0\r");
WritePort(cmd, strlen(cmd));
Sleep(ShortSleepTime);
nLength = ReadPort(ans, 128);
ans[nLength] = '\0';
sprintf(cmd, "AT+CMGF=0\r");
WritePort(cmd, strlen(cmd));
Sleep(ShortSleepTime);
nLength = ReadPort(ans, 128);
ans[nLength] = '\0';
sm_param_temp= new SM_PARAM;
strcpy(sm_param_temp->SCA,m_SmsCenterNum);
sm_param_temp->TP_DCS=0x8;
sm_param_temp->TP_PID=0x0;
strcpy(sm_param_temp->TPA,TPA);
strcpy(sm_param_temp->TP_UD,msglist->chMsg);
if(iPage > 1)
sprintf(sm_param_temp->TP_UD,"%d/%d %s" ,iIndex+1,iPage,msglist->chMsg);
//printf("Msg :%s\n" ,sm_param_temp->TP_UD);
msglist = msglist->pNext;
if(!gsmSendMessage(sm_param_temp))//发送短信
{
printf("Send SMS Failed\n");
return -1;
}
Sleep(5000);
}
return 0;
}
开发者ID:SiteView,项目名称:ecc82Server,代码行数:77,代码来源:SerialPort.cpp
注:本文中的page函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论