本文整理汇总了C++中emitDataChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ emitDataChanged函数的具体用法?C++ emitDataChanged怎么用?C++ emitDataChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了emitDataChanged函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: ProvidersListModel
QAbstractListModel* ProvidersModel::createListModel()
{
ProvidersListModel* pListModel = new ProvidersListModel(m_providers, this);
connect(this, SIGNAL(modelAboutToBeReset()), pListModel, SIGNAL(modelAboutToBeReset()));
connect(this, SIGNAL(modelReset()), pListModel, SIGNAL(modelReset()));
connect(this, SIGNAL(layoutAboutToBeChanged()), pListModel, SIGNAL(modelReset()));
connect(this, SIGNAL(layoutChanged()), pListModel, SIGNAL(modelReset()));
connect(this, SIGNAL(dataChanged(QModelIndex,QModelIndex)), pListModel, SLOT(emitDataChanged(QModelIndex,QModelIndex)));
connect(this, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), pListModel, SLOT(emitRowsAboutToBeInserted(QModelIndex,int,int)));
connect(this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), pListModel, SLOT(emitRowsAboutToBeRemoved(QModelIndex,int,int)));
connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)), pListModel, SLOT(emitRowsInserted(QModelIndex,int,int)));
connect(this, SIGNAL(rowsRemoved(QModelIndex,int,int)), pListModel, SLOT(emitRowsRemoved(QModelIndex,int,int)));
return pListModel;
}
开发者ID:emmanuel099,项目名称:kio,代码行数:15,代码来源:ikwsopts.cpp
示例17: free_dps
void DivePlannerPointsModel::loadFromDive(dive *d)
{
int depthsum = 0;
int samplecount = 0;
bool oldRec = recalc;
recalc = false;
CylindersModel::instance()->updateDive();
duration_t lasttime = {};
duration_t newtime = {};
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 = false;
if (d->dc.samples)
hasMarkedSamples = d->dc.sample[0].manually_entered;
// if this dive has more than 100 samples (so it is probably a logged dive),
// average samples so we end up with a total of 100 samples.
int plansamples = d->dc.samples <= 100 ? d->dc.samples : 100;
int j = 0;
for (int i = 0; i < plansamples - 1; i++) {
while (j * plansamples <= i * d->dc.samples) {
const sample &s = d->dc.sample[j];
if (s.time.seconds != 0 && (!hasMarkedSamples || s.manually_entered)) {
depthsum += s.depth.mm;
++samplecount;
newtime = s.time;
}
j++;
}
if (samplecount) {
get_gas_at_time(d, &d->dc, lasttime, &gas);
addStop(depthsum / samplecount, newtime.seconds, &gas, 0, true);
lasttime = newtime;
depthsum = 0;
samplecount = 0;
}
}
recalc = oldRec;
emitDataChanged();
}
开发者ID:JianchunMei,项目名称:subsurface,代码行数:47,代码来源:diveplannermodel.cpp
示例18: YTSingleVideoSource
void MediaView::search(SearchParams *searchParams) {
if (!searchParams->keywords().isEmpty()) {
if (searchParams->keywords().startsWith("http://") ||
searchParams->keywords().startsWith("https://")) {
QString videoId = YTSearch::videoIdFromUrl(searchParams->keywords());
if (!videoId.isEmpty()) {
YTSingleVideoSource *singleVideoSource = new YTSingleVideoSource(this);
singleVideoSource->setVideoId(videoId);
setVideoSource(singleVideoSource);
return;
}
}
}
YTSearch *ytSearch = new YTSearch(searchParams, this);
ytSearch->setAsyncDetails(true);
connect(ytSearch, SIGNAL(gotDetails()), playlistModel, SLOT(emitDataChanged()));
setVideoSource(ytSearch);
}
开发者ID:PatMart,项目名称:minitube,代码行数:18,代码来源:mediaview.cpp
示例19: m_attributes
Entry::Entry()
: m_attributes(new EntryAttributes(this))
, m_attachments(new EntryAttachments(this))
, m_autoTypeAssociations(new AutoTypeAssociations(this))
, m_tmpHistoryItem(Q_NULLPTR)
, m_updateTimeinfo(true)
{
m_data.iconNumber = DefaultIconNumber;
m_data.autoTypeEnabled = true;
m_data.autoTypeObfuscation = 0;
connect(m_attributes, SIGNAL(modified()), this, SIGNAL(modified()));
connect(m_attributes, SIGNAL(defaultKeyModified()), SLOT(emitDataChanged()));
connect(m_attachments, SIGNAL(modified()), this, SIGNAL(modified()));
connect(m_autoTypeAssociations, SIGNAL(modified()), SIGNAL(modified()));
connect(this, SIGNAL(modified()), SLOT(updateTimeinfo()));
connect(this, SIGNAL(modified()), SLOT(updateModifiedSinceBegin()));
}
开发者ID:afontenot,项目名称:keepassx,代码行数:19,代码来源:Entry.cpp
示例20: beginRemoveRows
void DivePlannerPointsModel::setDropStoneMode(bool value)
{
auto planner = SettingsObjectWrapper::instance()->planner_settings;
planner->setDropStoneMode(value);
if (prefs.drop_stone_mode) {
/* Remove the first entry if we enable drop_stone_mode */
if (rowCount() >= 2) {
beginRemoveRows(QModelIndex(), 0, 0);
divepoints.remove(0);
endRemoveRows();
}
} else {
/* Add a first entry if we disable drop_stone_mode */
beginInsertRows(QModelIndex(), 0, 0);
/* Copy the first current point */
divedatapoint p = divepoints.at(0);
p.time = p.depth.mm / prefs.descrate;
divepoints.push_front(p);
endInsertRows();
}
emitDataChanged();
}
开发者ID:ro-ot,项目名称:subsurface,代码行数:22,代码来源:diveplannermodel.cpp
注:本文中的emitDataChanged函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论