本文整理汇总了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();
}
示例2: emitDataChanged
void DivePlannerPointsModel::triggerGFHigh()
{
if (diveplan.gfhigh != tempGFHigh) {
diveplan.gfhigh = tempGFHigh;
emitDataChanged();
}
}
示例3: emitDataChanged
void DivePlannerPointsModel::setVpmbConservatism(int level)
{
if (diveplan.vpmb_conservatism != level) {
diveplan.vpmb_conservatism = level;
emitDataChanged();
}
}
示例4: emitDataChanged
void DivePlannerPointsModel::setStartTime(const QTime &t)
{
startTime.setTime(t);
diveplan.when = startTime.toTime_t();
displayed_dive.when = diveplan.when;
emitDataChanged();
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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));
}
示例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();
}
示例11: updateActivity
void
UserListItem::setHostAddreess(const QHostAddress& address)
{
if (d->host_address_ == address)
return;
d->host_address_ = address;
updateActivity();
emitDataChanged();
}
示例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
}
示例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_;
}
示例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();
}
}
示例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();
}