bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) { Q_UNUSED(obj) Q_D(QDeclarativeApplication); if (event->type() == QEvent::ApplicationActivate || event->type() == QEvent::ApplicationDeactivate) { bool active = d->active; if (event->type() == QEvent::ApplicationActivate) active = true; else if (event->type() == QEvent::ApplicationDeactivate) active = false; if (d->active != active) { d->active = active; emit activeChanged(); } } if (event->type() == QEvent::LayoutDirectionChange) { Qt::LayoutDirection direction = QApplication::layoutDirection(); if (d->layoutDirection != direction) { d->layoutDirection = direction; emit layoutDirectionChanged(); } } return false; }
void QDeclarativeGrid::setLayoutDirection(Qt::LayoutDirection layoutDirection) { if (m_layoutDirection != layoutDirection) { m_layoutDirection = layoutDirection; prePositioning(); emit layoutDirectionChanged(); } }
void QDeclarativeFlow::setLayoutDirection(Qt::LayoutDirection layoutDirection) { Q_D(QDeclarativeFlow); if (d->layoutDirection != layoutDirection) { d->layoutDirection = layoutDirection; prePositioning(); emit layoutDirectionChanged(); } }
QT_BEGIN_NAMESPACE /* This object and its properties are documented as part of the Qt object, in qqmlengine.cpp */ QQuickApplication::QQuickApplication(QObject *parent) : QQmlApplication(parent) { if (qApp) { connect(qApp, SIGNAL(layoutDirectionChanged(Qt::LayoutDirection)), this, SIGNAL(layoutDirectionChanged())); connect(qApp, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SIGNAL(stateChanged(Qt::ApplicationState))); connect(qApp, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SIGNAL(activeChanged())); } }
void HbLayoutDirectionNotifier::notifyLayoutDirectionChange() { // This signal is used to update the new layout directionality in the icon loader // before the other icon classes start loading new icons emit layoutDirectionChangeStarted(); // This signal is handled in icon classes to load new mirrored icons emit layoutDirectionChanged(); // This signal might be required to update the screen after the operation. emit layoutDirectionChangeFinished(); }
void QDeclarativeGrid::setLayoutDirection(Qt::LayoutDirection layoutDirection) { QDeclarativeBasePositionerPrivate *d = static_cast<QDeclarativeBasePositionerPrivate*>(QDeclarativeBasePositionerPrivate::get(this)); if (d->layoutDirection != layoutDirection) { d->layoutDirection = layoutDirection; // For RTL layout the positioning changes when the width changes. if (d->layoutDirection == Qt::RightToLeft) d->addItemChangeListener(d, QDeclarativeItemPrivate::Geometry); else d->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry); prePositioning(); emit layoutDirectionChanged();; } }