* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifdef _WIN32
default_name_(name),
name_(name),
capture_state_(Stopped),
- cur_samplerate_(0)
+ cur_samplerate_(0),
+ data_saved_(true)
{
}
return main_bar_;
}
+bool Session::data_saved() const
+{
+ return data_saved_;
+}
+
void Session::save_settings(QSettings &settings) const
{
map<string, string> dev_info;
assert(0);
}
+ // We now have unsaved data unless we just "captured" from a file
+ shared_ptr<devices::File> file_device =
+ dynamic_pointer_cast<devices::File>(device_);
+
+ if (!file_device)
+ data_saved_ = false;
+
if (out_of_memory_)
error_handler(tr("Out of memory, acquisition stopped."));
}
}
}
+void Session::on_data_saved()
+{
+ data_saved_ = true;
+}
+
} // namespace pv