Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let the R key reset all clocks #211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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