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


C++ emitDataChanged函数代码示例

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


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

示例1: free_dps

void DivePlannerPointsModel::loadFromDive(dive *d)
{
	bool oldRec = recalc;
	recalc = false;
	CylindersModel::instance()->updateDive();
	duration_t lasttime = {};
	struct gasmix gas;
	free_dps(&diveplan);
	diveplan.when = d->when;
	// is this a "new" dive where we marked manually entered samples?
	// if yes then the first sample should be marked
	// if it is we only add the manually entered samples as waypoints to the diveplan
	// otherwise we have to add all of them
	bool hasMarkedSamples = d->dc.sample[0].manually_entered;
	for (int i = 0; i < d->dc.samples - 1; i++) {
		const sample &s = d->dc.sample[i];
		if (s.time.seconds == 0 || (hasMarkedSamples && !s.manually_entered))
			continue;
		get_gas_at_time(d, &d->dc, lasttime, &gas);
		plannerModel->addStop(s.depth.mm, s.time.seconds, &gas, 0, true);
		lasttime = s.time;
	}
	recalc = oldRec;
	emitDataChanged();
}
开发者ID:AresDice,项目名称:subsurface,代码行数:25,代码来源:diveplanner.cpp

示例2: emitDataChanged

void DivePlannerPointsModel::triggerGFHigh()
{
	if (diveplan.gfhigh != tempGFHigh) {
		diveplan.gfhigh = tempGFHigh;
		emitDataChanged();
	}
}
开发者ID:pidancier,项目名称:subsurface,代码行数:7,代码来源:diveplannermodel.cpp

示例3: emitDataChanged

void DivePlannerPointsModel::setVpmbConservatism(int level)
{
	if (diveplan.vpmb_conservatism != level) {
		diveplan.vpmb_conservatism = level;
		emitDataChanged();
	}
}
开发者ID:ollie314,项目名称:subsurface,代码行数:7,代码来源:diveplannermodel.cpp

示例4: emitDataChanged

void DivePlannerPointsModel::setStartTime(const QTime &t)
{
	startTime.setTime(t);
		diveplan.when = startTime.toTime_t();
	displayed_dive.when = diveplan.when;
	emitDataChanged();
}
开发者ID:ro-ot,项目名称:subsurface,代码行数:7,代码来源:diveplannermodel.cpp

示例5: setData

void ServerItem::init() {
	// Without this, columncount is wrong.
	setData(0, Qt::DisplayRole, QVariant());
	setData(1, Qt::DisplayRole, QVariant());
	setData(2, Qt::DisplayRole, QVariant());
	emitDataChanged();
}
开发者ID:stumbless,项目名称:mumble,代码行数:7,代码来源:ConnectDialog.cpp

示例6: units_to_sac

void DivePlannerPointsModel::setDecoSac(double sac)
{
	diveplan.decosac = units_to_sac(sac);
	auto planner = SettingsObjectWrapper::instance()->planner_settings;
	planner->setDecoSac(diveplan.decosac);
	emitDataChanged();
}
开发者ID:ro-ot,项目名称:subsurface,代码行数:7,代码来源:diveplannermodel.cpp

示例7: Q_UNUSED

void Buffers::cleanChanged(bool clean) {
    Q_UNUSED(clean);
    const qce::Document *d = qobject_cast<const qce::Document*>(sender());
    int idx = lowerBound(m_buffers, d->fileName());
    Q_ASSERT(idx < m_buffers.count() && m_buffers.at(idx)->document == d);
    emitDataChanged(idx);
}
开发者ID:huguesb,项目名称:rotidecode,代码行数:7,代码来源:buffers.cpp

示例8: while

void DivePlannerPointsModel::gaschange(const QModelIndex &index, int newcylinderid)
{
	int i = index.row(), oldcylinderid = divepoints[i].cylinderid;
	while (i < rowCount() && oldcylinderid == divepoints[i].cylinderid)
		divepoints[i++].cylinderid = newcylinderid;
	emitDataChanged();
}
开发者ID:ro-ot,项目名称:subsurface,代码行数:7,代码来源:diveplannermodel.cpp

示例9: setBaseFont

 void setBaseFont(const QFont &font)
 {
     emit layoutAboutToBeChanged(); // So the view adjust to new item height
     m_baseFont = font;
     emit layoutChanged();
     emitDataChanged(index(0));
 }
开发者ID:raphaelcotty,项目名称:qt-creator,代码行数:7,代码来源:colorschemeedit.cpp

示例10: emitDataChanged

/*!
    setItemMetaData. Set function for item related meta data object
 */
void NmMailboxListModelItem::setItemMetaData(NmMailboxMetaData *mailbox)
{
    NM_FUNCTION;
    
    if (mMailbox) {
        delete mMailbox;
    }
    mMailbox = mailbox;
    emitDataChanged();
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:13,代码来源:nmmailboxlistmodelitem.cpp

示例11: updateActivity

void
UserListItem::setHostAddreess(const QHostAddress& address)
{
  if (d->host_address_ == address)
    return;

  d->host_address_ = address;
  updateActivity();
  emitDataChanged();
}
开发者ID:master-gekus,项目名称:lanchat,代码行数:10,代码来源:user_list_item.cpp

示例12: layoutAboutToBeChanged

void DiagramsModel::emitDataChanged(UMLView *view)
{
#if QT_VERSION < 0x050000
    emit layoutAboutToBeChanged();
#endif
    int index = m_views.indexOf(view);
    emitDataChanged(index);
#if QT_VERSION < 0x050000
    emit layoutChanged();
#endif
}
开发者ID:KDE,项目名称:umbrello,代码行数:11,代码来源:diagramsmodel.cpp

示例13: emitDataChanged

bool UserListItem::updateIcon()
{
  bool new_blinking = false;
  ChatWindow *window = ChatWindow::findWindow(d->uuid_);
  if (0 != window)
    new_blinking = window->hasUnreadMessages();

  if (d->icon_blinking_ != new_blinking)
    {
      d->icon_blinking_ = new_blinking;
      emitDataChanged();
    }
  else
    {
      if (d->icon_blinking_)
        emitDataChanged();
    }

  return d->icon_blinking_;
}
开发者ID:master-gekus,项目名称:lanchat,代码行数:20,代码来源:user_list_item.cpp

示例14: Q_ASSERT

void Entry::setIcon(int iconNumber)
{
    Q_ASSERT(iconNumber >= 0);

    if (m_data.iconNumber != iconNumber || !m_data.customIcon.isNull()) {
        m_data.iconNumber = iconNumber;
        m_data.customIcon = Uuid();

        Q_EMIT modified();
        emitDataChanged();
    }
}
开发者ID:Amazeus-Mozart,项目名称:keepassx,代码行数:12,代码来源:Entry.cpp

示例15: emitDataChanged

void AMTESTSeriesData::addData(const QVector<qreal> &data)
{
	yAxis_.addValues(data);
	int seriesSize = yAxis_.size();

	if (xAxis_.size() != seriesSize){

		xAxis_ = QVector<qreal>(seriesSize, 0);

		for (int i = 0; i < seriesSize; i++)
			xAxis_[i] = -1*(seriesSize-(i+1))/updateRate_;
	}

	emitDataChanged();
}
开发者ID:acquaman,项目名称:acquaman,代码行数:15,代码来源:AMTESTSeriesData.cpp


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