projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DecodeSelector: Use custom treeview to hook into selection changes
[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 1b75a6c7d3bc30fd59eed491c3ff59b1bf1f40c7..4434f0a610bcd2030e867acc598b5417eb3184c4 100644
(file)
--- a/
pv/subwindows/decoder_selector/subwindow.hpp
+++ b/
pv/subwindows/decoder_selector/subwindow.hpp
@@
-23,6
+23,7
@@
#include <vector>
#include <QAbstractItemModel>
#include <vector>
#include <QAbstractItemModel>
+#include <QLabel>
#include <QSplitter>
#include <QTreeView>
#include <QSplitter>
#include <QTreeView>
@@
-83,6
+84,17
@@
private:
};
};
+class QCustomTreeView : public QTreeView
+{
+ Q_OBJECT
+
+public:
+ void currentChanged(const QModelIndex& current, const QModelIndex& previous);
+
+Q_SIGNALS:
+ void currentChanged(const QModelIndex& current);
+};
+
class SubWindow : public SubWindowBase
{
Q_OBJECT
class SubWindow : public SubWindowBase
{
Q_OBJECT
@@
-111,11
+123,16
@@
Q_SIGNALS:
void new_decoders_selected(vector<const srd_decoder*> decoders);
public Q_SLOTS:
void new_decoders_selected(vector<const srd_decoder*> decoders);
public Q_SLOTS:
- void on_item_double_clicked(const QModelIndex& index);
+ void on_item_changed(const QModelIndex& index);
+ void on_item_activated(const QModelIndex& index);
private:
QSplitter* splitter_;
private:
QSplitter* splitter_;
- QTreeView* tree_view_;
+ QCustomTreeView* tree_view_;
+ QWidget* info_box_;
+ QLabel* info_label_header_;
+ QLabel* info_label_body_;
+ QLabel* info_label_footer_;
DecoderCollectionModel* model_;
};
DecoderCollectionModel* model_;
};