1 #ifndef CVVISUAL_RAWVIEWTABLE_HPP
2 #define CVVISUAL_RAWVIEWTABLE_HPP
3 
4 #include <vector>
5 
6 #include <QWidget>
7 #include <QList>
8 
9 #include "../view/rawview.hpp"
10 #include "rawview_table_row.hpp"
11 #include "../stfl/element_group.hpp"
12 #include "../qtutil/accordion.hpp"
13 #include "../util/util.hpp"
14 #include "rawview_group_subtable.hpp"
15 
16 namespace cvv
17 {
18 
19 namespace view
20 {
21 class Rawview;
22 }
23 
24 namespace gui
25 {
26 
27 class RawviewTableCollumn;
28 
29 /**
30  * @brief A table (consisting of subtables) displaying raw match data.
31  */
32 class RawviewTable : public QWidget
33 {
34 	Q_OBJECT
35 
36 public:
37 	/**
38 	 * @brief Constructor of this class.
39 	 * @param parent parent view
40 	 */
41 	RawviewTable(view::Rawview *parent);
42 
43 	/**
44 	 * @brief Update the inherited groups of rows and rebuild the UI fully.
45 	 * @param newGroups new groups for this table
46 	 */
47 	void updateRowGroups(
48 	    const std::vector<stfl::ElementGroup<RawviewTableRow>> newGroups);
49 
50 	/**
51 	 * @brief Updates the UI
52 	 */
53 	void updateUI();
54 
55 	/**
56 	 * @brief Returns the parent view.
57 	 * @return parent view
58 	 */
getParent()59 	view::Rawview *getParent()
60 	{
61 		return parent;
62 	}
63 
64 	std::vector<cv::DMatch> getMatchSelection();
65 
66 	std::vector<cv::KeyPoint> getKeyPointSelection();
67 
68 public slots:
69 
70 	void setMatchSelection(std::vector<cv::DMatch> matches);
71 
72 	void setKeyPointSelection(std::vector<cv::KeyPoint> keyPoints);
73 
74 private:
75 	view::Rawview *parent;
76 	qtutil::Accordion *subtableAccordion;
77 	std::vector<RawviewGroupSubtable *> subTables{};
78 
79 };
80 }
81 }
82 
83 #endif
84