X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fsubwindows%2Fdecoder_selector%2Fsubwindow.hpp;h=a1ace196eb66eb3f64ab431270473c850ef82fb4;hb=HEAD;hp=dba6f6deed8f72515d58bcd15df5fa0175e2f836;hpb=a6fab02455b3d9910fe1bcc51ab644f224ee52e1;p=pulseview.git diff --git a/pv/subwindows/decoder_selector/subwindow.hpp b/pv/subwindows/decoder_selector/subwindow.hpp index dba6f6d..a1ace19 100644 --- a/pv/subwindows/decoder_selector/subwindow.hpp +++ b/pv/subwindows/decoder_selector/subwindow.hpp @@ -85,6 +85,12 @@ private: }; +class QCustomSortFilterProxyModel : public QSortFilterProxyModel +{ +protected: + bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const; +}; + class QCustomTreeView : public QTreeView { Q_OBJECT @@ -106,19 +112,19 @@ public: bool has_toolbar() const; QToolBar* create_toolbar(QWidget *parent) const; - const srd_decoder* get_srd_decoder_from_id(QString id) const; + int minimum_width() const; /** * Returns a list of input types that a given protocol decoder requires * ("logic", "uart", etc.) */ - vector decoder_inputs(const srd_decoder* d) const; + vector get_decoder_inputs(const srd_decoder* d) const; /** * Returns a list of protocol decoder IDs which provide a given output * ("uart", "spi", etc.) */ - vector decoders_providing(const char* output) const; + vector get_decoders_providing(const char* output) const; Q_SIGNALS: void new_decoders_selected(vector decoders); @@ -127,6 +133,8 @@ public Q_SLOTS: void on_item_changed(const QModelIndex& index); void on_item_activated(const QModelIndex& index); + void on_filter_changed(const QString& text); + private: QSplitter* splitter_; QCustomTreeView* tree_view_; @@ -135,7 +143,7 @@ private: QLabel* info_label_body_; QLabel* info_label_footer_; DecoderCollectionModel* model_; - QSortFilterProxyModel* sort_filter_model_; + QCustomSortFilterProxyModel* sort_filter_model_; }; } // decoder_selector