您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updateCurrentItem函数代码示例

51自学网 2021-06-03 09:13:28
  C++
这篇教程C++ updateCurrentItem函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中updateCurrentItem函数的典型用法代码示例。如果您正苦于以下问题:C++ updateCurrentItem函数的具体用法?C++ updateCurrentItem怎么用?C++ updateCurrentItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了updateCurrentItem函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Q_ASSERT

void FoldersPanel::loadTree(const QUrl& url){    Q_ASSERT(m_controller);    m_updateCurrentItem = false;    QUrl baseUrl;    if (url.isLocalFile()) {        // Use the root directory as base for local URLs (#150941)        baseUrl = QUrl::fromLocalFile(QDir::rootPath());    } else {        // Clear the path for non-local URLs and use it as base        baseUrl = url;        baseUrl.setPath(QString('/'));    }    if (m_model->directory() != baseUrl) {        m_updateCurrentItem = true;        m_model->refreshDirectory(baseUrl);    }    const int index = m_model->index(url);    if (index >= 0) {        updateCurrentItem(index);    } else {        m_updateCurrentItem = true;        m_model->expandParentDirectories(url);        // slotLoadingCompleted() will be invoked after the model has        // expanded the url    }}
开发者ID:emmanuel099,项目名称:dolphin,代码行数:31,


示例2: LOG

void HistoryController::updateForStandardLoad(HistoryUpdateType updateType){    LOG(History, "HistoryController %p updateForStandardLoad: Updating History for standard load in frame %p (main frame %d) %s", this, &m_frame, m_frame.isMainFrame(), m_frame.loader().documentLoader()->url().string().ascii().data());    FrameLoader& frameLoader = m_frame.loader();    bool needPrivacy = m_frame.page()->usesEphemeralSession();    const URL& historyURL = frameLoader.documentLoader()->urlForHistory();    if (!frameLoader.documentLoader()->isClientRedirect()) {        if (!historyURL.isEmpty()) {            if (updateType != UpdateAllExceptBackForwardList)                updateBackForwardListClippedAtTarget(true);            if (!needPrivacy) {                frameLoader.client().updateGlobalHistory();                frameLoader.documentLoader()->setDidCreateGlobalHistoryEntry(true);                if (frameLoader.documentLoader()->unreachableURL().isEmpty())                    frameLoader.client().updateGlobalHistoryRedirectLinks();            }            m_frame.loader().client().updateGlobalHistoryItemForPage();        }    } else {        // The client redirect replaces the current history item.        updateCurrentItem();    }    if (!historyURL.isEmpty() && !needPrivacy) {        if (Page* page = m_frame.page())            addVisitedLink(*page, historyURL);        if (!frameLoader.documentLoader()->didCreateGlobalHistoryEntry() && frameLoader.documentLoader()->unreachableURL().isEmpty() && !m_frame.document()->url().isEmpty())            frameLoader.client().updateGlobalHistoryRedirectLinks();    }}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:35,


示例3: LOG

void HistoryController::updateForBackForwardNavigation(){#if !LOG_DISABLED    LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame->document()->title().utf8().data());#endif    saveScrollPositionAndViewStateToItem(m_previousItem.get());    // When traversing history, we may end up redirecting to a different URL    // this time (e.g., due to cookies).  See http://webkit.org/b/49654.    updateCurrentItem();}
开发者ID:halton,项目名称:blink-crosswalk,代码行数:12,


示例4: updateCurrentItem

Database_Items::~Database_Items(){	if (itemRef != NULL)	{		updateCurrentItem();		delete itemRef;		itemRef = NULL;	}	if (animRef != NULL)	{		delete animRef;		animRef = NULL;	}}
开发者ID:timdetering,项目名称:openrpgmaker,代码行数:14,


示例5: LOG

void HistoryController::updateForBackForwardNavigation(){#if !LOG_DISABLED    if (m_frame.loader().documentLoader())        LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame.loader().documentLoader()->title().string().utf8().data());#endif    // Must grab the current scroll position before disturbing it    if (!m_frameLoadComplete)        saveScrollPositionAndViewStateToItem(m_previousItem.get());    // When traversing history, we may end up redirecting to a different URL    // this time (e.g., due to cookies).  See http://webkit.org/b/49654.    updateCurrentItem();}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:15,


示例6: SLOT

void FoldersPanel::slotLoadingCompleted(){    if (m_controller->view()->opacity() == 0) {        // The loading of the initial tree after opening the Folders panel        // has been finished. Trigger the increasing of the opacity after        // a short delay to give the view the chance to finish its internal        // animations.        // TODO: Check whether it makes sense to allow accessing the        // view-internal delay for usecases like this.        QTimer::singleShot(250, this, SLOT(startFadeInAnimation()));    }    if (!m_updateCurrentItem) {        return;    }    const int index = m_model->index(url());    updateCurrentItem(index);    m_updateCurrentItem = false;}
开发者ID:emmanuel099,项目名称:dolphin,代码行数:20,


示例7: updateCurrentItem

int AmPlaylist::put(unsigned int user_ts, unsigned char* buffer, unsigned int size){  int ret = -1;  cur_mut.lock();  updateCurrentItem();  while(cur_item && 	cur_item->record &&	(ret = cur_item->record->put(user_ts,buffer,size)) < 0){    DBG("put: gotoNextItem/n");    gotoNextItem();  }  if(!cur_item || !cur_item->record)    ret = size;      cur_mut.unlock();  return ret;}
开发者ID:BackupTheBerlios,项目名称:sems-svn,代码行数:20,


示例8: LOG

void HistoryController::updateForRedirectWithLockedBackForwardList(){#if !LOG_DISABLED    if (m_frame->loader()->documentLoader())        LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());#endif        Settings* settings = m_frame->settings();    bool needPrivacy = !settings || settings->privateBrowsingEnabled();    const KURL& historyURL = m_frame->loader()->documentLoader()->urlForHistory();    if (m_frame->loader()->documentLoader()->isClientRedirect()) {        if (!m_currentItem && !m_frame->tree()->parent()) {            if (!historyURL.isEmpty()) {                updateBackForwardListClippedAtTarget(true);                if (!needPrivacy) {                    m_frame->loader()->client()->updateGlobalHistory();                    m_frame->loader()->documentLoader()->setDidCreateGlobalHistoryEntry(true);                    if (m_frame->loader()->documentLoader()->unreachableURL().isEmpty())                        m_frame->loader()->client()->updateGlobalHistoryRedirectLinks();                }                m_frame->loader()->client()->updateGlobalHistoryItemForPage();            }        }        // The client redirect replaces the current history item.        updateCurrentItem();    } else {        Frame* parentFrame = m_frame->tree()->parent();        if (parentFrame && parentFrame->loader()->history()->m_currentItem)            parentFrame->loader()->history()->m_currentItem->setChildItem(createItem());    }    if (!historyURL.isEmpty() && !needPrivacy) {        if (Page* page = m_frame->page())            addVisitedLink(page, historyURL);        if (!m_frame->loader()->documentLoader()->didCreateGlobalHistoryEntry() && m_frame->loader()->documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())            m_frame->loader()->client()->updateGlobalHistoryRedirectLinks();    }}
开发者ID:gobihun,项目名称:webkit,代码行数:41,


示例9: updateCurrentItem

bool SQLToolWidget::eventFilter(QObject *object, QEvent *event){    if(object==objects_trw && event->type()==QEvent::KeyPress)    {        QKeyEvent *k_event=dynamic_cast<QKeyEvent *>(event);        if(k_event->key()==Qt::Key_Delete || k_event->key()==Qt::Key_F5)        {            if(k_event->key()==Qt::Key_F5)                updateCurrentItem();            else                dropObject(objects_trw->currentItem());            return(true);        }        else            return(false);    }    return(QWidget::eventFilter(object, event));}
开发者ID:rkveluvali,项目名称:pgmodeler,代码行数:21,


示例10: LOG

void HistoryController::updateForReload(){#if !LOG_DISABLED    if (m_frame.loader().documentLoader())        LOG(History, "WebCoreHistory: Updating History for reload in frame %s", m_frame.loader().documentLoader()->title().string().utf8().data());#endif    if (m_currentItem) {        PageCache::singleton().remove(*m_currentItem);            if (m_frame.loader().loadType() == FrameLoadType::Reload || m_frame.loader().loadType() == FrameLoadType::ReloadFromOrigin)            saveScrollPositionAndViewStateToItem(m_currentItem.get());        // Rebuild the history item tree when reloading as trying to re-associate everything is too error-prone.        m_currentItem->clearChildren();    }    // When reloading the page, we may end up redirecting to a different URL    // this time (e.g., due to cookies).  See http://webkit.org/b/4072.    updateCurrentItem();}
开发者ID:cheekiatng,项目名称:webkit,代码行数:21,


示例11: currentAttendee

void KOAttendeeEditor::updateAttendee(){  Attendee *a = currentAttendee();  if ( !a || mDisableItemUpdate ) {    return;  }  QString name;  QString email;  KPIMUtils::extractEmailAddressAndName( mNameEdit->text(), email, name );  bool iAmTheOrganizer = mOrganizerCombo &&                         KOPrefs::instance()->thatIsMe( mOrganizerCombo->currentText() );  if ( iAmTheOrganizer ) {    bool myself = KPIMUtils::compareEmail( email, mOrganizerCombo->currentText(), false );    bool wasMyself =      KPIMUtils::compareEmail( a->email(), mOrganizerCombo->currentText(), false );    if ( myself ) {      mRsvpButton->setChecked( false );      mRsvpButton->setEnabled( false );    } else if ( wasMyself ) {      // this was me, but is no longer, reset      mStatusCombo->setCurrentIndex( KCal::Attendee::NeedsAction );      mRsvpButton->setChecked( true );      mRsvpButton->setEnabled( true );    }  }  a->setName( name );  a->setUid( mUid );  a->setEmail( email );  a->setRole( Attendee::Role( mRoleCombo->currentIndex() ) );  a->setStatus( Attendee::PartStat( mStatusCombo->currentIndex() ) );  a->setRSVP( mRsvpButton->isChecked() );  updateCurrentItem();}
开发者ID:akhuettel,项目名称:kdepim-noakonadi,代码行数:36,


示例12: QWidget

SQLToolWidget::SQLToolWidget(QWidget * parent) : QWidget(parent){    setupUi(this);    sql_cmd_hl=new SyntaxHighlighter(sql_cmd_txt, false, false);    sql_cmd_hl->loadConfiguration(GlobalAttributes::CONFIGURATIONS_DIR +                                  GlobalAttributes::DIR_SEPARATOR +                                  GlobalAttributes::SQL_HIGHLIGHT_CONF +                                  GlobalAttributes::CONFIGURATION_EXT);    h_splitter->setSizes({0, 10000});    h_splitter1->setSizes({1000, 250});    results_parent->setVisible(false);    cmd_history_gb->setVisible(false);    sql_file_dlg.setDefaultSuffix("sql");    sql_file_dlg.setFileMode(QFileDialog::AnyFile);    sql_file_dlg.setNameFilter(tr("SQL file (*.sql);;All files (*.*)"));    sql_file_dlg.setModal(true);    csv_file_dlg.setDefaultSuffix("csv");    csv_file_dlg.setFileMode(QFileDialog::AnyFile);    csv_file_dlg.setWindowTitle(trUtf8("Save CSV file"));    csv_file_dlg.setNameFilter(tr("Comma-separated values file (*.csv);;All files (*.*)"));    csv_file_dlg.setModal(true);    csv_file_dlg.setAcceptMode(QFileDialog::AcceptSave);    copy_action=new QAction(trUtf8("Copy"), &copy_menu);    copy_menu.addAction(copy_action);    drop_action=new QAction(QIcon(":icones/icones/excluir.png"), trUtf8("Drop object"), &handle_menu);    drop_action->setShortcut(QKeySequence(Qt::Key_Delete));    show_data_action=new QAction(QIcon(":icones/icones/result.png"), trUtf8("Show data"), &handle_menu);    refresh_action=new QAction(QIcon(":icones/icones/atualizar.png"), trUtf8("Update"), &handle_menu);    refresh_action->setShortcut(QKeySequence(Qt::Key_F5));    connect(hide_tb, SIGNAL(clicked(void)), this, SLOT(hide(void)));    connect(clear_btn, SIGNAL(clicked(void)), this, SLOT(clearAll(void)));    connect(connect_tb, SIGNAL(clicked(void)), this, SLOT(connectToDatabase(void)));    connect(database_cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(listObjects(void)));    connect(refresh_tb, SIGNAL(clicked(void)), this, SLOT(listObjects(void)));    connect(expand_all_tb, SIGNAL(clicked(bool)), objects_trw, SLOT(expandAll(void)));    connect(collapse_all_tb, SIGNAL(clicked(bool)), objects_trw, SLOT(collapseAll(void)));    connect(sql_cmd_txt, SIGNAL(textChanged(void)), this, SLOT(enableCommandButtons(void)));    connect(run_sql_tb, SIGNAL(clicked(void)), this, SLOT(runSQLCommand(void)));    connect(save_tb, SIGNAL(clicked(void)), this, SLOT(saveCommands(void)));    connect(load_tb, SIGNAL(clicked(void)), this, SLOT(loadCommands(void)));    connect(export_tb, SIGNAL(clicked(void)), this, SLOT(exportResults(void)));    connect(history_tb, SIGNAL(toggled(bool)), cmd_history_gb, SLOT(setVisible(bool)));    connect(results_tbw, SIGNAL(itemPressed(QTableWidgetItem*)), this, SLOT(copySelection(void)));    connect(objects_trw, SIGNAL(itemPressed(QTreeWidgetItem*,int)), this, SLOT(handleObject(QTreeWidgetItem *,int)));    connect(clear_history_btn, SIGNAL(clicked(void)), cmd_history_lst, SLOT(clear(void)));    connect(hide_ext_objs_chk, SIGNAL(toggled(bool)), this, SLOT(listObjects(void)));    connect(hide_sys_objs_chk, SIGNAL(toggled(bool)), this, SLOT(listObjects(void)));    connect(refresh_action, SIGNAL(triggered()), this, SLOT(updateCurrentItem()));    //Signal handling with C++11 lambdas Slots    connect(clear_history_btn, &QPushButton::clicked,    [=]() {        clear_history_btn->setDisabled(true);    });    connect(cmd_history_lst, &QListWidget::itemDoubleClicked,    [=]() {        sql_cmd_txt->setText(cmd_history_lst->currentItem()->data(Qt::UserRole).toString());    });    connect(filter_edt, &QLineEdit::textChanged,    [=]() {        DatabaseImportForm::filterObjects(objects_trw, filter_edt->text(), false);    });    objects_trw->installEventFilter(this);}
开发者ID:rkveluvali,项目名称:pgmodeler,代码行数:76,



注:本文中的updateCurrentItem函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ updateCursor函数代码示例
C++ updateContentSizeWithTextureSize函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。