当前位置: 首页>>代码示例>>C++>>正文


C++ refreshCache函数代码示例

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


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

示例1: qDebug

void PackageManager::onFinished(PackageKit::Transaction::Exit status, uint runtime)
{
#ifdef PACKAGEMANAGER_LOG
    qDebug() << Q_FUNC_INFO << status << runtime;
#endif
    PackageKit::Transaction *t = qobject_cast<PackageKit::Transaction*>(sender());

    if (sender() == m_getUpdatesTransaction) {
//        delete m_getUpdatesTransaction;
        m_getUpdatesTransaction = 0;
    } else if (sender() == m_getPackagesTransaction) {
//        delete m_getPackagesTransaction;
        m_getPackagesTransaction = 0;
    }

    if (t && t->role() == PackageKit::Transaction::RoleRemovePackages) {
        m_packManContext.setSelectedGroup(PackageKit::Transaction::GroupUnknown);
        refreshUpdate();
        refreshInstalled();
    } else if (t && t->role() == PackageKit::Transaction::RoleUpdatePackages) {
        m_packManContext.setSelectedGroup(PackageKit::Transaction::GroupUnknown);
        refreshUpdate();
        refreshInstalled();
    } else if (t && t->role() == PackageKit::Transaction::RoleInstallPackages) {
        uint group = m_packManContext.selectedGroup();
        refreshCache(); // includes refreshUpdate();
        refreshInstalled();
        if (m_bSimulation == false) {
            refreshAvailable(group);
        }
    }
}
开发者ID:nemomobile,项目名称:qmlpackagemanager,代码行数:32,代码来源:packagemanager.cpp

示例2: sl

  MetaObjectPrivate&  MetaObjectPrivate::operator=(const MetaObjectPrivate &rhs)
  {
    if (this == &rhs)
      return *this;

    {
      boost::recursive_mutex::scoped_lock sl(rhs._methodsMutex);
      _methodsNameToIdx = rhs._methodsNameToIdx;
      _methods          = rhs._methods;
    }
    {
      boost::recursive_mutex::scoped_lock sl(rhs._eventsMutex);
      _eventsNameToIdx = rhs._eventsNameToIdx;
      _events = rhs._events;
    }
    {
      boost::recursive_mutex::scoped_lock sl(rhs._propertiesMutex);
      _properties = rhs._properties;
    }
    _index = rhs._index;
    _description = rhs._description;
    // cache data uses pointers to map entries and must be refreshed
    refreshCache();
    return (*this);
  }
开发者ID:dmerejkowsky,项目名称:libqi,代码行数:25,代码来源:metaobject.cpp

示例3: WFX_CONDITION

ULONG VorticalLayerCtrl::expand(ULONG nItem, BOOL bexpand /*= TRUE*/)
{
	m_bCached = FALSE;
	ULONG nLine = m_pRoot->expand(nItem, TRUE, bexpand);
	if (bexpand)
	{
		WFX_CONDITION(nItem < m_rgCacheInfo.size());
		m_rgCacheInfo[nItem].m_bexpanded = TRUE;
		for (int i = 0; i < nLine; i++)
		{
			WFX_CONDITION(nItem + i + 1 <= m_rgCacheInfo.size());
			CacheInfo chinfo(getLayer(nItem + i + 1), TRUE);
			m_rgCacheInfo.insert(m_rgCacheInfo.begin() + nItem + 1, chinfo);
		}
	}
	else
	{
		m_rgCacheInfo[nItem].m_bexpanded = FALSE;
		for (int i = 0; i < nLine; i++)
		{
			WFX_CONDITION(nItem + i + 1 < m_rgCacheInfo.size());
			m_rgCacheInfo.erase(m_rgCacheInfo.begin() + nItem + 1);
		}
	}
	refreshCache();
	return m_rgCacheInfo.size();
}
开发者ID:wxtnote,项目名称:wfc,代码行数:27,代码来源:wfxListCtrl.cpp

示例4: meridian

char* meridian(time_t t) { // meridian
  refreshCache(t);
  if (isPM())
    return "PM";
  else
    return "AM";
}
开发者ID:jaketesler,项目名称:arduino_libraries,代码行数:7,代码来源:Time.cpp

示例5: hourFormat12

int hourFormat12(time_t t) { // the hour for the given time in 12 hour format
  refreshCache(t);
  if( tm.Hour == 0 )
    return 12; // 12 midnight
  else if( tm.Hour  > 12)
    return tm.Hour - 12 ;
  else
    return tm.Hour ;
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:9,代码来源:Time.cpp

示例6: ThreadSchedulerFIFO

/**
 * Store the simulated events in the given workspace. This clears the calculated
 * values
 * @param resultWS :: An output workspace that has all of its meta-data set up
 * and just needs to
 * be filled with events.
 */
void ResolutionConvolvedCrossSection::storeSimulatedEvents(
    const API::IMDEventWorkspace_sptr &resultWS) {
    auto outputWS = boost::dynamic_pointer_cast<MDEventWorkspace4>(resultWS);
    if (!outputWS) {
        throw std::invalid_argument(
            "ResolutionConvolvedCrossSection currently only supports 4 dimensions");
    }

    auto iterEnd = m_simulatedEvents.end();
    for (auto iter = m_simulatedEvents.begin(); iter != iterEnd; ++iter) {
        outputWS->addEvent(*iter);
    }
    m_simulatedEvents.clear();

    // This splits up all the boxes according to split thresholds and sizes.
    auto threadScheduler = new ThreadSchedulerFIFO();
    ThreadPool threadPool(threadScheduler);
    outputWS->splitAllIfNeeded(threadScheduler);
    threadPool.joinAll();
    outputWS->refreshCache();
}
开发者ID:rosswhitfield,项目名称:mantid,代码行数:28,代码来源:ResolutionConvolvedCrossSection.cpp

示例7: refreshCache

void KStandardItemListWidget::triggerCacheRefreshing()
{
    if ((!m_dirtyContent && !m_dirtyLayout) || index() < 0) {
        return;
    }

    refreshCache();

    const QHash<QByteArray, QVariant> values = data();
    m_isExpandable = m_supportsItemExpanding && values["isExpandable"].toBool();
    m_isHidden = isHidden();
    m_customizedFont = customizedFont(styleOption().font);
    m_customizedFontMetrics = QFontMetrics(m_customizedFont);

    updateExpansionArea();
    updateTextsCache();
    updatePixmapCache();

    m_dirtyLayout = false;
    m_dirtyContent = false;
    m_dirtyContentRoles.clear();
}
开发者ID:theunbelievablerepo,项目名称:dolphin2.1,代码行数:22,代码来源:kstandarditemlistwidget.cpp

示例8: createMDWorkspace

/**
 * Performs centre-point rebinning and produces an MDWorkspace
 * @param inputWs : The workspace you wish to perform centre-point rebinning on.
 * @param boxController : controls how the MDWorkspace will be split
 * @param frame: the md frame for the two MDHistoDimensions
 * @returns An MDWorkspace based on centre-point rebinning of the inputWS
 */
Mantid::API::IMDEventWorkspace_sptr ReflectometryTransform::executeMD(
    Mantid::API::MatrixWorkspace_const_sptr inputWs,
    BoxController_sptr boxController,
    Mantid::Geometry::MDFrame_uptr frame) const {
  auto dim0 = boost::make_shared<MDHistoDimension>(
      m_d0Label, m_d0ID, *frame, static_cast<Mantid::coord_t>(m_d0Min),
      static_cast<Mantid::coord_t>(m_d0Max), m_d0NumBins);
  auto dim1 = boost::make_shared<MDHistoDimension>(
      m_d1Label, m_d1ID, *frame, static_cast<Mantid::coord_t>(m_d1Min),
      static_cast<Mantid::coord_t>(m_d1Max), m_d1NumBins);

  auto ws = createMDWorkspace(dim0, dim1, boxController);

  auto spectraAxis = inputWs->getAxis(1);
  for (size_t index = 0; index < inputWs->getNumberHistograms(); ++index) {
    auto counts = inputWs->readY(index);
    auto wavelengths = inputWs->readX(index);
    auto errors = inputWs->readE(index);
    const size_t nInputBins = wavelengths.size() - 1;
    const double theta_final = spectraAxis->getValue(index);
    m_calculator->setThetaFinal(theta_final);
    // Loop over all bins in spectra
    for (size_t binIndex = 0; binIndex < nInputBins; ++binIndex) {
      const double &wavelength =
          0.5 * (wavelengths[binIndex] + wavelengths[binIndex + 1]);
      double _d0 = m_calculator->calculateDim0(wavelength);
      double _d1 = m_calculator->calculateDim1(wavelength);
      double centers[2] = {_d0, _d1};

      ws->addEvent(MDLeanEvent<2>(float(counts[binIndex]),
                                  float(errors[binIndex] * errors[binIndex]),
                                  centers));
    }
  }
  ws->splitAllIfNeeded(nullptr);
  ws->refreshCache();
  return ws;
}
开发者ID:liyulun,项目名称:mantid,代码行数:45,代码来源:ReflectometryTransform.cpp

示例9: hour

int hour(time_t t) { // the hour for the given time
  refreshCache(t);
  return tm.Hour;  
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:4,代码来源:Time.cpp

示例10: month

int month(time_t t) {  // the month for the given time
  refreshCache(t);
  return tm.Month;
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:4,代码来源:Time.cpp

示例11: year

int year(time_t t) { // the year for the given time
  refreshCache(t);
  return tmYearToCalendar(tm.Year);
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:4,代码来源:Time.cpp

示例12: day

int day(time_t t) { // the day for the given time (0-6)
  refreshCache(t);
  return tm.Day;
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:4,代码来源:Time.cpp

示例13: weekday

int weekday(time_t t) {
  refreshCache(t);
  return tm.Wday;
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:4,代码来源:Time.cpp

示例14: second

int second(time_t t) {  // the second for the given time
  refreshCache(t);
  return tm.Second;
}
开发者ID:2016SNUSATCANSAT,项目名称:2015ARLISSSOURCECODE,代码行数:4,代码来源:Time.cpp

示例15: weekdayStr

char* weekdayStr(time_t t) {
  refreshCache(t);
  return dayShortStr(tm.Wday);
}
开发者ID:jaketesler,项目名称:arduino_libraries,代码行数:4,代码来源:Time.cpp


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