コード例 #1
0
ファイル: trainingset.cpp プロジェクト: marlncpe/INSYDE
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);
	}
}
コード例 #2
0
ファイル: qquickdrag.cpp プロジェクト: venkatarajasekhar/Qt
void QQuickDrag::setTarget(QQuickItem *t)
{
    if (_target == t)
        return;
    _target = t;
    emit targetChanged();
}
コード例 #3
0
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();
}
コード例 #4
0
void QchScreenShot::setTarget(QObject *obj) {
    if (obj != target()) {
        Q_D(QchScreenShot);
        d->target = obj;
        emit targetChanged();
    }
}
コード例 #5
0
ファイル: qquickdrag.cpp プロジェクト: venkatarajasekhar/Qt
void QQuickDrag::resetTarget()
{
    if (_target == 0)
        return;
    _target = 0;
    emit targetChanged();
}
コード例 #6
0
ファイル: qdeclarativemousearea.cpp プロジェクト: Afreeca/qt
void QDeclarativeDrag::resetTarget()
{
    if (!_target)
        return;
    _target = 0;
    emit targetChanged();
}
コード例 #7
0
ファイル: qdeclarativemousearea.cpp プロジェクト: Afreeca/qt
void QDeclarativeDrag::setTarget(QGraphicsObject *t)
{
    if (_target == t)
        return;
    _target = t;
    emit targetChanged();
}
コード例 #8
0
ファイル: irccommandparser.cpp プロジェクト: Mudlet/Mudlet
void IrcCommandParser::setTarget(const QString& target)
{
    Q_D(IrcCommandParser);
    if (d->target != target) {
        d->target = target;
        emit targetChanged(target);
    }
}
コード例 #9
0
void Box2DMouseJointItem::setTarget(Entity *target)
{
    if (m_target != target) {
        m_target = target;

        emit targetChanged();
    }
}
コード例 #10
0
ファイル: qquickitemanimation.cpp プロジェクト: ghjinlei/qt5
void QQuickPathAnimation::setTargetObject(QQuickItem *target)
{
    Q_D(QQuickPathAnimation);
    if (d->target == target)
        return;

    d->target = target;
    emit targetChanged();
}
コード例 #11
0
ファイル: mprisservice.cpp プロジェクト: MDSklaroff/orbital
void Mpris::setPid(quint64 pid)
{
    if (m_pid != pid) {
        m_pid = pid;
        emit targetChanged();
        setValid(false);
        checkConnection();
    }
}
コード例 #12
0
ファイル: errorhandler.cpp プロジェクト: livecv/livecv
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);
}
コード例 #13
0
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();
}
コード例 #14
0
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();
}
コード例 #15
0
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();
}
コード例 #16
0
void QDeclarativePinchGenerator::setTarget(QQuickItem* target)
{
    if (target == target_)
        return;
    target_ = target;
    stop();
    clear();
    if (window_)
        setState(Idle);
    else
        setState(Invalid);
    emit targetChanged();
}
コード例 #17
0
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();
}
コード例 #18
0
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();
}
コード例 #19
0
void StylePropertyChanges::setTarget(QQuickItem *target)
{
    Q_D(StylePropertyChanges);

    if (d->target != target)
    {
        d->target = target;

        if (target && !d->decoded)
        {
            d->decode();
        }

        emit targetChanged();
    }
}
コード例 #20
0
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();
}
コード例 #21
0
ファイル: anchors.cpp プロジェクト: zccrs/Anchors
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);
}
コード例 #22
0
ファイル: box2dbody.cpp プロジェクト: jturcotte/qml-box2d
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();
}
コード例 #23
0
ファイル: qquickdrag.cpp プロジェクト: venkatarajasekhar/Qt
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;
}
コード例 #24
0
ファイル: qquickdrag.cpp プロジェクト: venkatarajasekhar/Qt
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();
}
コード例 #25
0
ファイル: qquickdrag.cpp プロジェクト: venkatarajasekhar/Qt
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);
    }
}
コード例 #26
0
ファイル: TargetView.cpp プロジェクト: ahmidou/aphid
void TargetView::buildTree()
{
	SingleModelView::buildTree();
	emit targetChanged();
}
コード例 #27
0
ファイル: EventManager.cpp プロジェクト: IainCole/Client
void EventManager::fireTargetChangedEvent(const TargetChangedEvent& event)
{
    emit targetChanged(event);
}