Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
martiert committed Jan 19, 2021
1 parent 555d28b commit 862dad3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/compiler_gnu_gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_definitions(
-pedantic
-Wold-style-cast
-Woverloaded-virtual
-Wno-deprecated-declarations
-Weffc++
)

Expand Down
8 changes: 8 additions & 0 deletions dspdfviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ DSPDFViewer::DSPDFViewer(const RuntimeConfiguration& r):
sconnect( &audienceWindow, SIGNAL(quitRequested()), this, SLOT(exit()));
sconnect( &audienceWindow, SIGNAL(rerenderRequested()), this, SLOT(renderPage()));
sconnect( &audienceWindow, SIGNAL(restartRequested()), this, SLOT(goToStartAndResetClocks()));
sconnect( &audienceWindow, SIGNAL(restartTimer()), this, SLOT(resetClocks()));

sconnect( &audienceWindow, SIGNAL(screenSwapRequested()), this, SLOT(swapScreens()) );

Expand All @@ -102,6 +103,7 @@ DSPDFViewer::DSPDFViewer(const RuntimeConfiguration& r):
sconnect( &secondaryWindow, SIGNAL(quitRequested()), this, SLOT(exit()));
sconnect( &secondaryWindow, SIGNAL(rerenderRequested()), this, SLOT(renderPage()));
sconnect( &secondaryWindow, SIGNAL(restartRequested()), this, SLOT(goToStartAndResetClocks()));
sconnect( &secondaryWindow, SIGNAL(restartTimer()), this, SLOT(resetClocks()));

sconnect( &secondaryWindow, SIGNAL(screenSwapRequested()), this, SLOT(swapScreens()) );

Expand Down Expand Up @@ -249,6 +251,12 @@ void DSPDFViewer::goToStartAndResetClocks()
gotoPage(0);
}

void DSPDFViewer::resetClocks()
{
presentationClockRunning=false;
sendAllClockSignals();
}

QTime DSPDFViewer::presentationClock() const
{
if ( ! presentationClockRunning )
Expand Down
1 change: 1 addition & 0 deletions dspdfviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public slots:
void goBackward();

void goToStartAndResetClocks();
void resetClocks();

void swapScreens();

Expand Down
3 changes: 3 additions & 0 deletions pdfviewerwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ void PDFViewerWindow::keyPressEvent(QKeyEvent* e)
case Qt::Key_H: //Home
emit restartRequested();
break;
case Qt::Key_R: //Restart Timer
emit restartTimer();
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions pdfviewerwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public slots:
void previousPageRequested();
void pageRequested(unsigned requestedPageNumber);
void restartRequested();
void restartTimer();

void screenSwapRequested();

Expand Down

0 comments on commit 862dad3

Please sign in to comment.