void TrainingSet::setTarget(int pattern, int index, double value) { double prevVal = targets[pattern][index]; if(prevVal != value){ targets[pattern][index] = value; emit targetChanged(pattern, index, value); emit targetChanged(pattern, index, prevVal, value); } }
void QQuickDrag::setTarget(QQuickItem *t) { if (_target == t) return; _target = t; emit targetChanged(); }
void Properties::setTarget( QObject* target ) { if ( target != nullptr && target == _target ) // Don't set the same target multiple times return; if ( target != nullptr && target != this ) disconnect( target, 0, this, 0 ); // Disconnect everything from target // Use given target or this if no target is specified _target = ( target == nullptr ? this : target ); emit targetChanged(); if ( _target != nullptr && target != this ) { // Monitor target destruction connect( _target, &QObject::destroyed, this, &qps::Properties::targetDestroyed ); installEventFilter( _target ); } if ( target == this ) _hiddenStaticPropertiesCount = 3; else _hiddenStaticPropertiesCount = 0; resetPropertiesModel(); }
void QchScreenShot::setTarget(QObject *obj) { if (obj != target()) { Q_D(QchScreenShot); d->target = obj; emit targetChanged(); } }
void QQuickDrag::resetTarget() { if (_target == 0) return; _target = 0; emit targetChanged(); }
void QDeclarativeDrag::resetTarget() { if (!_target) return; _target = 0; emit targetChanged(); }
void QDeclarativeDrag::setTarget(QGraphicsObject *t) { if (_target == t) return; _target = t; emit targetChanged(); }
void IrcCommandParser::setTarget(const QString& target) { Q_D(IrcCommandParser); if (d->target != target) { d->target = target; emit targetChanged(target); } }
void Box2DMouseJointItem::setTarget(Entity *target) { if (m_target != target) { m_target = target; emit targetChanged(); } }
void QQuickPathAnimation::setTargetObject(QQuickItem *target) { Q_D(QQuickPathAnimation); if (d->target == target) return; d->target = target; emit targetChanged(); }
void Mpris::setPid(quint64 pid) { if (m_pid != pid) { m_pid = pid; emit targetChanged(); setValid(false); checkConnection(); } }
void ErrorHandler::setTarget(QObject *target){ if (m_target == target) return; if ( m_target && m_engine && m_componentComplete ){ m_engine->removeErrorHandler(m_target); } m_target = target; emit targetChanged(target); }
void Box2DMouseJoint::setTarget(const QPointF &target) { const b2Vec2 targetMeters = toMeters(target); if (mMouseJointDef.target == targetMeters) return; mMouseJointDef.target = targetMeters; if (mouseJoint()) mouseJoint()->SetTarget(targetMeters); emit targetChanged(); }
void QDeclarativeConnections::setTarget(QObject *obj) { Q_D(QDeclarativeConnections); if (d->target == obj) return; foreach (QDeclarativeBoundSignal *s, d->boundsignals) delete s; d->boundsignals.clear(); d->target = obj; connectSignals(); emit targetChanged(); }
QT_BEGIN_NAMESPACE PhraseBookBox::PhraseBookBox(PhraseBook *phraseBook, QWidget *parent) : QDialog(parent), m_phraseBook(phraseBook), m_translationSettingsDialog(0) { // This definition needs to be within class context for lupdate to find it #define NewPhrase tr("(New Entry)") setupUi(this); setWindowTitle(tr("%1[*] - Qt Linguist").arg(m_phraseBook->friendlyPhraseBookName())); setWindowModified(m_phraseBook->isModified()); phrMdl = new PhraseModel(this); m_sortedPhraseModel = new QSortFilterProxyModel(this); m_sortedPhraseModel->setSortCaseSensitivity(Qt::CaseInsensitive); m_sortedPhraseModel->setSortLocaleAware(true); m_sortedPhraseModel->setDynamicSortFilter(true); m_sortedPhraseModel->setSourceModel(phrMdl); phraseList->setModel(m_sortedPhraseModel); phraseList->header()->setDefaultSectionSize(150); phraseList->header()->setSectionResizeMode(QHeaderView::Interactive); connect(sourceLed, SIGNAL(textChanged(QString)), this, SLOT(sourceChanged(QString))); connect(targetLed, SIGNAL(textChanged(QString)), this, SLOT(targetChanged(QString))); connect(definitionLed, SIGNAL(textChanged(QString)), this, SLOT(definitionChanged(QString))); connect(phraseList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(selectionChanged())); connect(newBut, SIGNAL(clicked()), this, SLOT(newPhrase())); connect(removeBut, SIGNAL(clicked()), this, SLOT(removePhrase())); connect(settingsBut, SIGNAL(clicked()), this, SLOT(settings())); connect(saveBut, SIGNAL(clicked()), this, SLOT(save())); connect(m_phraseBook, SIGNAL(modifiedChanged(bool)), this, SLOT(setWindowModified(bool))); sourceLed->installEventFilter(this); targetLed->installEventFilter(this); definitionLed->installEventFilter(this); foreach (Phrase *p, phraseBook->phrases()) phrMdl->addPhrase(p); phraseList->sortByColumn(0, Qt::AscendingOrder); enableDisable(); }
void QDeclarativePinchGenerator::setTarget(QQuickItem* target) { if (target == target_) return; target_ = target; stop(); clear(); if (window_) setState(Idle); else setState(Invalid); emit targetChanged(); }
void FileIO::setTarget(QQuickItem *target) { m_doc = 0; m_highlighter = 0; if(m_target == target){ return; } m_target = target; if (!m_target || m_source.isEmpty()) return; emit targetChanged(); }
void DocumentHandler::setTarget(QQuickItem *target) { m_doc = 0; m_target = target; if (!m_target) return; QVariant doc = m_target->property("textDocument"); if (doc.canConvert<QQuickTextDocument*>()) { QQuickTextDocument *qqdoc = doc.value<QQuickTextDocument*>(); if (qqdoc) m_doc = qqdoc->textDocument(); } emit targetChanged(); }
void StylePropertyChanges::setTarget(QQuickItem *target) { Q_D(StylePropertyChanges); if (d->target != target) { d->target = target; if (target && !d->decoded) { d->decode(); } emit targetChanged(); } }
void QHighlighter::setTarget(QQuickItem *target) { m_highlighter = 0; m_target = target; if (!m_target) { return; } QVariant doc = m_target->property("textDocument"); if (doc.canConvert<QQuickTextDocument*>()) { QQuickTextDocument *qqdoc = doc.value<QQuickTextDocument*>(); if (qqdoc) { m_highlighter = new Highlighter(qqdoc->textDocument()); } } emit targetChanged(); }
void ExtendWidget::setTarget(QWidget *target) { Q_D(ExtendWidget); if (d->target == target) { return; } if (d->enabled && d->target) { d->target->removeEventFilter(this); } if (d->enabled && target) { target->installEventFilter(this); } d->target = target; emit targetChanged(target); }
void Box2DBody::setTarget(QQuickItem *target) { if (mTarget == target) return; if (mTarget) mTarget->disconnect(this); mTarget = target; mTransformDirty = target != 0; if (target) { connect(target, SIGNAL(xChanged()), this, SLOT(markTransformDirty())); connect(target, SIGNAL(yChanged()), this, SLOT(markTransformDirty())); connect(target, SIGNAL(rotationChanged()), this, SLOT(markTransformDirty())); } emit targetChanged(); }
int QQuickDragAttached::drop() { Q_D(QQuickDragAttached); Qt::DropAction acceptedAction = Qt::IgnoreAction; if (d->inEvent) { qmlInfo(this) << "drop() cannot be called from within a drag event handler"; return acceptedAction; } if (d->itemMoved) d->deliverMoveEvent(); if (!d->active) return acceptedAction; d->active = false; QObject *target = 0; if (d->window) { QPoint scenePos = d->attachedItem->mapToScene(d->hotSpot).toPoint(); QDropEvent event( scenePos, d->mimeData->m_supportedActions, d->mimeData, Qt::NoButton, Qt::NoModifier); QQuickDropEventEx::setProposedAction(&event, d->proposedAction); d->deliverEvent(d->window, &event); if (event.isAccepted()) { acceptedAction = event.dropAction(); target = d->dragGrabber.target(); } } if (d->target != target) { d->target = target; emit targetChanged(); } emit activeChanged(); return acceptedAction; }
void QQuickDragAttached::cancel() { Q_D(QQuickDragAttached); if (d->inEvent) { qmlInfo(this) << "cancel() cannot be called from within a drag event handler"; return; } if (!d->active) return; d->active = false; d->deliverLeaveEvent(); if (d->target) { d->target = 0; emit targetChanged(); } emit activeChanged(); }
bool QQuickDragAttached::event(QEvent *event) { Q_D(QQuickDragAttached); if (event->type() == QEvent::User) { d->eventQueued = false; if (d->dragRestarted) { d->deliverLeaveEvent(); d->deliverEnterEvent(); if (d->target != d->dragGrabber.target()) { d->target = d->dragGrabber.target(); emit targetChanged(); } } else if (d->itemMoved) { d->deliverMoveEvent(); } return true; } else { return QObject::event(event); } }
void TargetView::buildTree() { SingleModelView::buildTree(); emit targetChanged(); }
void EventManager::fireTargetChangedEvent(const TargetChangedEvent& event) { emit targetChanged(event); }