summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterProtocolHandler.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-06 07:47:08 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-06 07:47:54 +0200
commitb1a6a99b9a78689c6d3649ce066fad66912188e2 (patch)
tree6966cac52f89d4a89693e3ed751ef552320dc188 /sdext/source/presenter/PresenterProtocolHandler.cxx
parentcd5906358bed831c3811bcb658eeaf98d5dba9b9 (diff)
presenter console: add 'Restart Timer' button
Use case is that the presentation is started a few minutes in advance, so the audience can check if they are at the correct room, seeing the title side. Then previously the presentation had to be stopped and started again, so the presenter had an idea how much time the talk took so far. The side effect of this workaround was that the audience saw a short flash while the presentation was not running. Fix this by adding a button to just restart the timer, then it's not needed to stop/start the presentation manually. The two icons are just placeholders for now, real design is still needed. Change-Id: Id67e7e53a339ea5672dfb1c261f63d43466e9eff
Diffstat (limited to 'sdext/source/presenter/PresenterProtocolHandler.cxx')
-rw-r--r--sdext/source/presenter/PresenterProtocolHandler.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index 9dbefb239ca3..709a22e66e2d 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -104,6 +104,17 @@ namespace {
rtl::Reference<PresenterController> mpPresenterController;
};
+ /// This command restarts the presentation timer.
+ class RestartTimerCommand : public Command
+ {
+ public:
+ explicit RestartTimerCommand(const rtl::Reference<PresenterController>& rpPresenterController);
+ virtual ~RestartTimerCommand();
+ virtual void Execute() SAL_OVERRIDE;
+ private:
+ rtl::Reference<PresenterController> mpPresenterController;
+ };
+
class SetNotesViewCommand : public Command
{
public:
@@ -408,6 +419,8 @@ Command* PresenterProtocolHandler::Dispatch::CreateCommand (
return new GotoPreviousSlideCommand(rpPresenterController);
if (rsURLPath == "SwitchMonitor")
return new SwitchMonitorCommand(rpPresenterController);
+ if (rsURLPath == "RestartTimer")
+ return new RestartTimerCommand(rpPresenterController);
if (rsURLPath == "ShowNotes")
return new SetNotesViewCommand(true, rpPresenterController);
if (rsURLPath == "ShowSlideSorter")
@@ -612,6 +625,21 @@ void SwitchMonitorCommand::Execute()
mpPresenterController->SwitchMonitors();
}
+RestartTimerCommand::RestartTimerCommand (const rtl::Reference<PresenterController>& rpPresenterController)
+: mpPresenterController(rpPresenterController)
+{
+}
+
+RestartTimerCommand::~RestartTimerCommand()
+{
+}
+
+void RestartTimerCommand::Execute()
+{
+ if (IPresentationTime* pPresentationTime = mpPresenterController->GetPresentationTime())
+ pPresentationTime->restart();
+}
+
//===== SetNotesViewCommand ===================================================
SetNotesViewCommand::SetNotesViewCommand (