X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fviews%2Ftabular_decoder%2Fview.hpp;h=3cdcac18637195d597049a90e6505bac0f6409fb;hb=1ed73ebd60336c7b12ee1807644dca719cb9835b;hp=534e3d9d99eb41cf87d80fc0f281fe1a72a2de4d;hpb=6f43db70c63c683d546566eda0be7f182f614655;p=pulseview.git diff --git a/pv/views/tabular_decoder/view.hpp b/pv/views/tabular_decoder/view.hpp index 534e3d9d..3cdcac18 100644 --- a/pv/views/tabular_decoder/view.hpp +++ b/pv/views/tabular_decoder/view.hpp @@ -17,12 +17,13 @@ * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_VIEWS_TABULARDECODER_VIEW_HPP -#define PULSEVIEW_PV_VIEWS_TABULARDECODER_VIEW_HPP +#ifndef PULSEVIEW_PV_VIEWS_TABULAR_DECODER_VIEW_HPP +#define PULSEVIEW_PV_VIEWS_TABULAR_DECODER_VIEW_HPP #include #include #include +#include #include #include #include @@ -114,11 +115,14 @@ public: void set_sample_range(uint64_t start_sample, uint64_t end_sample); + void enable_range_filtering(bool value); + protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; private: uint64_t range_start_sample_, range_end_sample_; + bool range_filtering_enabled_; }; @@ -127,8 +131,14 @@ class CustomTableView : public QTableView Q_OBJECT public: - QSize minimumSizeHint() const; - QSize sizeHint() const; + virtual QSize minimumSizeHint() const override; + virtual QSize sizeHint() const override; + +protected: + virtual void keyPressEvent(QKeyEvent *event) override; + +Q_SIGNALS: + void activatedByKey(const QModelIndex &index); }; @@ -208,4 +218,4 @@ private: } // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEWS_TABULARDECODER_VIEW_HPP +#endif // PULSEVIEW_PV_VIEWS_TABULAR_DECODER_VIEW_HPP