X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Fdecoder_output%2Fview.hpp;h=39869d514b289b8a80d53cd11fd2b743e27b0065;hb=6961eab0d4bf976cee015afacfa7c25795e574b9;hp=a780c2f374d505834298f3a196757d23ef61a12a;hpb=2bdc5796c866b9494b2c40051e973e4385d9c46f;p=pulseview.git diff --git a/pv/views/decoder_output/view.hpp b/pv/views/decoder_output/view.hpp index a780c2f3..39869d51 100644 --- a/pv/views/decoder_output/view.hpp +++ b/pv/views/decoder_output/view.hpp @@ -20,7 +20,13 @@ #ifndef PULSEVIEW_PV_VIEWS_DECODEROUTPUT_VIEW_HPP #define PULSEVIEW_PV_VIEWS_DECODEROUTPUT_VIEW_HPP +#include +#include + #include +#include + +#include "QHexView.hpp" namespace pv { @@ -35,10 +41,12 @@ class View : public ViewBase Q_OBJECT public: - explicit View(Session &session, bool is_main_view=false, QWidget *parent = nullptr); + explicit View(Session &session, bool is_main_view=false, QMainWindow *parent = nullptr); ~View(); + virtual ViewType get_type() const; + /** * Resets the view to its default state after construction. It does however * not reset the signal bases or any other connections with the session. @@ -54,9 +62,30 @@ public: virtual void save_settings(QSettings &settings) const; virtual void restore_settings(QSettings &settings); +private: + void update_data(); + private Q_SLOTS: - void on_signal_name_changed(); + void on_selected_decoder_changed(int index); + void on_selected_class_changed(int index); + void on_signal_name_changed(const QString &name); + void on_new_binary_data(unsigned int segment_id, void* decoder, unsigned int bin_class_id); + + void on_decoder_stacked(void* decoder); + void on_decoder_removed(void* decoder); + + virtual void perform_delayed_view_update(); + +private: + QWidget* parent_; + + QComboBox *decoder_selector_, *format_selector_, *class_selector_; + QStackedWidget *stacked_widget_; + QHexView *hex_view_; + data::DecodeSignal *signal_; + const data::decode::Decoder *decoder_; + uint32_t bin_class_id_; }; } // namespace decoder_output