projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DecoderSelector: Put body label into a QScrollArea
[pulseview.git]
/
pv
/
subwindows
/
decoder_selector
/
subwindow.hpp
diff --git
a/pv/subwindows/decoder_selector/subwindow.hpp
b/pv/subwindows/decoder_selector/subwindow.hpp
index 4434f0a610bcd2030e867acc598b5417eb3184c4..6bb1439758abfb95776d6b3c51755f0895acd5fa 100644
(file)
--- a/
pv/subwindows/decoder_selector/subwindow.hpp
+++ b/
pv/subwindows/decoder_selector/subwindow.hpp
@@
-24,6
+24,7
@@
#include <QAbstractItemModel>
#include <QLabel>
#include <QAbstractItemModel>
#include <QLabel>
+#include <QSortFilterProxyModel>
#include <QSplitter>
#include <QTreeView>
#include <QSplitter>
#include <QTreeView>
@@
-84,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
class QCustomTreeView : public QTreeView
{
Q_OBJECT
@@
-105,19
+112,17
@@
public:
bool has_toolbar() const;
QToolBar* create_toolbar(QWidget *parent) const;
bool has_toolbar() const;
QToolBar* create_toolbar(QWidget *parent) const;
- const srd_decoder* get_srd_decoder_from_id(QString id) const;
-
/**
* Returns a list of input types that a given protocol decoder requires
* ("logic", "uart", etc.)
*/
/**
* Returns a list of input types that a given protocol decoder requires
* ("logic", "uart", etc.)
*/
- vector<const char*> decoder_inputs(const srd_decoder* d) const;
+ vector<const char*>
get_
decoder_inputs(const srd_decoder* d) const;
/**
* Returns a list of protocol decoder IDs which provide a given output
* ("uart", "spi", etc.)
*/
/**
* Returns a list of protocol decoder IDs which provide a given output
* ("uart", "spi", etc.)
*/
- vector<const srd_decoder*> decoders_providing(const char* output) const;
+ vector<const srd_decoder*>
get_
decoders_providing(const char* output) const;
Q_SIGNALS:
void new_decoders_selected(vector<const srd_decoder*> decoders);
Q_SIGNALS:
void new_decoders_selected(vector<const srd_decoder*> decoders);
@@
-126,6
+131,8
@@
public Q_SLOTS:
void on_item_changed(const QModelIndex& index);
void on_item_activated(const QModelIndex& index);
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_;
private:
QSplitter* splitter_;
QCustomTreeView* tree_view_;
@@
-134,6
+141,7
@@
private:
QLabel* info_label_body_;
QLabel* info_label_footer_;
DecoderCollectionModel* model_;
QLabel* info_label_body_;
QLabel* info_label_footer_;
DecoderCollectionModel* model_;
+ QCustomSortFilterProxyModel* sort_filter_model_;
};
} // decoder_selector
};
} // decoder_selector