projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the first view own the toolbar instead of the main window
[pulseview.git]
/
pv
/
session.hpp
diff --git
a/pv/session.hpp
b/pv/session.hpp
index 96da72d39be2c908ab41b470a151e63ec1b73a61..d6cfdd302c97815daec25bcf19b62e12008c96e2 100644
(file)
--- a/
pv/session.hpp
+++ b/
pv/session.hpp
@@
-72,10
+72,12
@@
namespace devices {
class Device;
}
class Device;
}
+namespace toolbars {
+class MainBar;
+}
+
namespace view {
namespace view {
-class DecodeTrace;
-class LogicSignal;
-class Signal;
+class View;
}
class Session : public QObject
}
class Session : public QObject
@@
-102,6
+104,12
@@
public:
std::shared_ptr<devices::Device> device() const;
std::shared_ptr<devices::Device> device() const;
+ std::shared_ptr<pv::view::View> main_view() const;
+
+ void set_main_bar(std::shared_ptr<pv::toolbars::MainBar> main_bar);
+
+ std::shared_ptr<pv::toolbars::MainBar> main_bar() const;
+
/**
* Sets device instance that will be used in the next capture session.
*/
/**
* Sets device instance that will be used in the next capture session.
*/
@@
-117,16
+125,17
@@
public:
double get_samplerate() const;
double get_samplerate() const;
- const std::unordered_set< std::shared_ptr<view::Signal> >
- signals() const;
+ void register_view(std::shared_ptr<pv::view::View> view);
+
+ void deregister_view(std::shared_ptr<pv::view::View> view);
+
+ const std::unordered_set< std::shared_ptr<data::SignalBase> >
+ signalbases() const;
#ifdef ENABLE_DECODE
bool add_decoder(srd_decoder *const dec);
#ifdef ENABLE_DECODE
bool add_decoder(srd_decoder *const dec);
- std::vector< std::shared_ptr<view::DecodeTrace> >
- get_decode_signals() const;
-
- void remove_decode_signal(view::DecodeTrace *signal);
+ void remove_decode_signal(std::shared_ptr<data::SignalBase> signalbase);
#endif
private:
#endif
private:
@@
-159,16
+168,17
@@
private:
DeviceManager &device_manager_;
std::shared_ptr<devices::Device> device_;
DeviceManager &device_manager_;
std::shared_ptr<devices::Device> device_;
- std::vector< std::shared_ptr<view::DecodeTrace> > decode_traces_;
+ std::unordered_set< std::shared_ptr<pv::view::View> > views_;
+ std::shared_ptr<pv::view::View> main_view_;
+
+ std::shared_ptr<pv::toolbars::MainBar> main_bar_;
mutable std::mutex sampling_mutex_; //!< Protects access to capture_state_.
capture_state capture_state_;
mutable std::mutex sampling_mutex_; //!< Protects access to capture_state_.
capture_state capture_state_;
- mutable boost::shared_mutex signals_mutex_;
- std::unordered_set< std::shared_ptr<view::Signal> > signals_;
- std::set< std::shared_ptr<data::SignalBase> > signalbases_;
- std::set< std::shared_ptr<data::SignalData> > all_signal_data_;
+ std::
unordered_
set< std::shared_ptr<data::SignalBase> > signalbases_;
+ std::
unordered_
set< std::shared_ptr<data::SignalData> > all_signal_data_;
mutable std::recursive_mutex data_mutex_;
std::shared_ptr<data::Logic> logic_data_;
mutable std::recursive_mutex data_mutex_;
std::shared_ptr<data::Logic> logic_data_;