Remove getter and setter for pointers from CodeMarkerOptions
The following discussion from !119 (merged) should be addressed:
class CodeMarkerOptions : public QObject{
Q_OBJECT
private:
CodeMarkerItem *codeMarkerItem;
int indexOfMarkerDict = 16;
ArucoCodeParams detectorParams;
Control *controlWidget;
Vec2F offsetCropRect2Roi = Vec2F{0,0};
public:
// TODO: Remove getter and setter for pointers;
// cannot properly set these in constructor because of
// bidirectional dependecies
CodeMarkerItem *getCodeMarkerItem() const {return codeMarkerItem;}
Control *getControlWidget() const {return controlWidget;}
...
}
CodeMarkerItem
needs an already constructed CodeMarkerOptions
. to resolve this, we need to save the detected and rejected corners elsewhere. We already discussed that an extendable TrackPoint
might be best suited for this. But since this is quite the task, I think we should do that separately and till then, we have a bidirectional dependency which mandates this (or that either of those constructs the other, which would be weird here...)
Control
can't work, because it needs a finished Recognizer
(which in turn needs a finished CodeMarkerOptions
) to be constructed. This would be resolved by getting rid of the dependency on Control
in findCodeMarker
, which is much to do as well.