From c4ae6bf0381da1adce257503922488fe5ab12b3f Mon Sep 17 00:00:00 2001 From: Dirk Wilden Date: Mon, 20 Oct 2008 10:28:05 +0000 Subject: [PATCH] added scriptable snaphot() function git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3483 383ad7c9-94d9-4d36-a494-682f7c89f535 --- Core/Core.cc | 11 +++++++++++ Core/Core.hh | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/Core/Core.cc b/Core/Core.cc index 1fda3077..57bcc314 100644 --- a/Core/Core.cc +++ b/Core/Core.cc @@ -891,6 +891,17 @@ void Core::slotGetDescription(QString _function, QString& _fnDescript } } +void Core::snapshotBaseFileName(const QString& _fname){ + if ( OpenFlipper::Options::gui() ) + coreWidget_->examiner_widget_->snapshotBaseFileName(_fname); +} + +void Core::snapshot(){ + if ( OpenFlipper::Options::gui() ) + coreWidget_->examiner_widget_->snapshot(); + +} + /// set the descriptions for scriptable slots of the core void Core::setDescriptions(){ diff --git a/Core/Core.hh b/Core/Core.hh index 690aad35..9ed7de09 100644 --- a/Core/Core.hh +++ b/Core/Core.hh @@ -300,6 +300,16 @@ public slots: /// set the maximal framerate ( automatically enables framerate restriction ) void setMaxFrameRate( int _rate ); + /// set the baseFilename for snapshots (a counter is automatically increased when + /// snapshot() is called) + void snapshotBaseFileName(const QString& _fname); + + /** Trigger a snapshot and increase the snapshot counter. + Save snapshot to file determined by snapshotBaseFileName() and + the current snapshot counter. The \a back buffer will be saved. + */ + void snapshot(); + /** @} */ //=========================================================================== -- GitLab