projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move run/stop button from the menu bar to the tab widget
[pulseview.git]
/
pv
/
devices
/
sessionfile.cpp
diff --git
a/pv/devices/sessionfile.cpp
b/pv/devices/sessionfile.cpp
index 687c52bdcd5a225a29d1cdfaeffac104b7c4c9a3..8a583eeba0ffb08b8015da6fd5f6890d77488c7f 100644
(file)
--- a/
pv/devices/sessionfile.cpp
+++ b/
pv/devices/sessionfile.cpp
@@
-27,24
+27,27
@@
namespace pv {
namespace devices {
namespace pv {
namespace devices {
-SessionFile::SessionFile(const std::shared_ptr<sigrok::Context>
&
context,
+SessionFile::SessionFile(const std::shared_ptr<sigrok::Context> context,
const std::string &file_name) :
const std::string &file_name) :
- context_(context),
- file_name_(file_name) {
+ File(file_name),
+ context_(context)
+{
}
}
-std::string SessionFile::full_name() const {
- return boost::filesystem::path(file_name_).filename().string();
-}
-
-std::string SessionFile::display_name(const DeviceManager&) const {
- return SessionFile::full_name();
-}
+void SessionFile::open()
+{
+ if (session_)
+ close();
-void SessionFile::create() {
session_ = context_->load_session(file_name_);
device_ = session_->devices()[0];
}
session_ = context_->load_session(file_name_);
device_ = session_->devices()[0];
}
+void SessionFile::close()
+{
+ if (session_)
+ session_->remove_devices();
+}
+
} // namespace devices
} // namespace pv
} // namespace devices
} // namespace pv