Changeset View
Changeset View
Standalone View
Standalone View
onscreennotification.cpp
Show First 20 Lines • Show All 204 Lines • ▼ Show 20 Line(s) | 203 | { | |||
---|---|---|---|---|---|
205 | if (auto w = qobject_cast<QQuickWindow*>(m_mainItem.data())) { | 205 | if (auto w = qobject_cast<QQuickWindow*>(m_mainItem.data())) { | ||
206 | m_spy.reset(new OnScreenNotificationInputEventSpy(this)); | 206 | m_spy.reset(new OnScreenNotificationInputEventSpy(this)); | ||
207 | input()->installInputEventSpy(m_spy.data()); | 207 | input()->installInputEventSpy(m_spy.data()); | ||
208 | if (!m_animation) { | 208 | if (!m_animation) { | ||
209 | m_animation = new QPropertyAnimation(w, "opacity", this); | 209 | m_animation = new QPropertyAnimation(w, "opacity", this); | ||
210 | m_animation->setStartValue(1.0); | 210 | m_animation->setStartValue(1.0); | ||
211 | m_animation->setEndValue(0.0); | 211 | m_animation->setEndValue(0.0); | ||
212 | m_animation->setDuration(250); | 212 | m_animation->setDuration(250); | ||
213 | m_animation->setEasingCurve(QEasingCurve::InOutQuad); | 213 | m_animation->setEasingCurve(QEasingCurve::InOutCubic); | ||
214 | } | 214 | } | ||
215 | } | 215 | } | ||
216 | } | 216 | } | ||
217 | 217 | | |||
218 | QRect OnScreenNotification::geometry() const | 218 | QRect OnScreenNotification::geometry() const | ||
219 | { | 219 | { | ||
220 | if (QQuickWindow *w = qobject_cast<QQuickWindow*>(m_mainItem.data())) { | 220 | if (QQuickWindow *w = qobject_cast<QQuickWindow*>(m_mainItem.data())) { | ||
221 | return w->geometry(); | 221 | return w->geometry(); | ||
Show All 23 Lines |