Changeset View
Changeset View
Standalone View
Standalone View
ui/presentationwidget.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
55 | #include "annotationtools.h" | 55 | #include "annotationtools.h" | ||
56 | #include "debug_ui.h" | 56 | #include "debug_ui.h" | ||
57 | #include "drawingtoolactions.h" | 57 | #include "drawingtoolactions.h" | ||
58 | #include "guiutils.h" | 58 | #include "guiutils.h" | ||
59 | #include "pagepainter.h" | 59 | #include "pagepainter.h" | ||
60 | #include "presentationsearchbar.h" | 60 | #include "presentationsearchbar.h" | ||
61 | #include "priorities.h" | 61 | #include "priorities.h" | ||
62 | #include "videowidget.h" | 62 | #include "videowidget.h" | ||
63 | #include "mpris2/mpris2service.h" | ||||
63 | #include "core/action.h" | 64 | #include "core/action.h" | ||
64 | #include "core/annotations.h" | 65 | #include "core/annotations.h" | ||
65 | #include "core/audioplayer.h" | 66 | #include "core/audioplayer.h" | ||
66 | #include "core/document.h" | 67 | #include "core/document.h" | ||
67 | #include "core/generator.h" | 68 | #include "core/generator.h" | ||
68 | #include "core/movie.h" | 69 | #include "core/movie.h" | ||
69 | #include "core/page.h" | 70 | #include "core/page.h" | ||
70 | #include "settings.h" | 71 | #include "settings.h" | ||
▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 265 | { | |||
265 | setCursor( QCursor( Qt::BlankCursor ) ); | 266 | setCursor( QCursor( Qt::BlankCursor ) ); | ||
266 | } | 267 | } | ||
267 | 268 | | |||
268 | setupActions(); | 269 | setupActions(); | ||
269 | 270 | | |||
270 | // inhibit power management | 271 | // inhibit power management | ||
271 | inhibitPowerManagement(); | 272 | inhibitPowerManagement(); | ||
272 | 273 | | |||
274 | m_mpris2Service = new Okular::Mpris2Service(m_document , m_ac, this, this); | ||||
275 | | ||||
273 | show(); | 276 | show(); | ||
274 | 277 | | |||
275 | QTimer::singleShot( 0, this, &PresentationWidget::slotDelayedEvents ); | 278 | QTimer::singleShot( 0, this, &PresentationWidget::slotDelayedEvents ); | ||
276 | 279 | | |||
277 | // setFocus() so KCursor::setAutoHideCursor() goes into effect if it's enabled | 280 | // setFocus() so KCursor::setAutoHideCursor() goes into effect if it's enabled | ||
278 | setFocus( Qt::OtherFocusReason ); | 281 | setFocus( Qt::OtherFocusReason ); | ||
279 | } | 282 | } | ||
280 | 283 | | |||
Show All 23 Lines | 285 | { | |||
304 | delete m_drawingEngine; | 307 | delete m_drawingEngine; | ||
305 | 308 | | |||
306 | // delete frames | 309 | // delete frames | ||
307 | QVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end(); | 310 | QVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end(); | ||
308 | for ( ; fIt != fEnd; ++fIt ) | 311 | for ( ; fIt != fEnd; ++fIt ) | ||
309 | delete *fIt; | 312 | delete *fIt; | ||
310 | } | 313 | } | ||
311 | 314 | | |||
315 | bool PresentationWidget::isAdvancingSlides() const | ||||
316 | { | ||||
317 | return m_advanceSlides; | ||||
318 | } | ||||
312 | 319 | | |||
313 | void PresentationWidget::notifySetup( const QVector< Okular::Page * > & pageSet, int setupFlags ) | 320 | void PresentationWidget::notifySetup( const QVector< Okular::Page * > & pageSet, int setupFlags ) | ||
314 | { | 321 | { | ||
315 | // same document, nothing to change - here we assume the document sets up | 322 | // same document, nothing to change - here we assume the document sets up | ||
316 | // us with the whole document set as first notifySetup() | 323 | // us with the whole document set as first notifySetup() | ||
317 | if ( !( setupFlags & Okular::DocumentObserver::DocumentChanged ) ) | 324 | if ( !( setupFlags & Okular::DocumentObserver::DocumentChanged ) ) | ||
318 | return; | 325 | return; | ||
319 | 326 | | |||
▲ Show 20 Lines • Show All 2127 Lines • ▼ Show 20 Line(s) | 2451 | { | |||
2447 | if ( m_advanceSlides ) | 2454 | if ( m_advanceSlides ) | ||
2448 | { | 2455 | { | ||
2449 | startAutoChangeTimer(); | 2456 | startAutoChangeTimer(); | ||
2450 | } | 2457 | } | ||
2451 | else | 2458 | else | ||
2452 | { | 2459 | { | ||
2453 | m_nextPageTimer->stop(); | 2460 | m_nextPageTimer->stop(); | ||
2454 | } | 2461 | } | ||
2462 | | ||||
2463 | emit advancingSlidesChanged(m_advanceSlides); | ||||
2455 | } | 2464 | } | ||
2456 | 2465 | | |||
2457 | #include "presentationwidget.moc" | 2466 | #include "presentationwidget.moc" |