OpendTect  7.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
FlatView::AuxDataEditor Class Reference

Editor for FlatView::AuxData. Allows the end-user to click-drag-release the points in data. Users of the class have the choice if the editor should do the changes for them, or if they want to do changes themself, driven by the callback. More...

Inheritance diagram for FlatView::AuxDataEditor:
[legend]

Public Member Functions

 AuxDataEditor (Viewer &, MouseEventHandler &)
 
virtual ~AuxDataEditor ()
 
int addAuxData (FlatView::AuxData *, bool doedit)
 
void enableEdit (int id, bool allowadd, bool allowmove, bool allowdelete)
 
void enablePolySel (int id, bool allowsel)
 
int getAddAuxData () const
 
const ObjectSet< AuxData > & getAuxData () const
 
const TypeSet< int > & getIds () const
 
MenuHandlergetMenuHandler ()
 
const Geom::PixRectangle< int > & getMouseArea () const
 
void getPointSelections (TypeSet< int > &ids, TypeSet< int > &idxs) const
 
const OD::LineStylegetSelectionPolygonLineStyle () const
 
bool getSelectionPolygonRectangle () const
 If not rectangle, it's a polygon. More...
 
int getSelPtDataID () const
 
const TypeSet< int > & getSelPtIdx () const
 
const PointgetSelPtPos () const
 
Rect getWorldRect (int dataid) const
 
bool isDragging () const
 
bool isSelActive () const
 
void limitMovement (const Rect *)
 
const PointmarkerPosAt (const Geom::Point2D< int > &mousepos) const
 
MouseEventHandlermouseEventHandler ()
 
void removeAuxData (int id)
 
void removePolygonSelected (int dataid)
 If dataid ==-1, all pts inside polygon is removed. More...
 
void setAddAuxData (int id)
 Added points will be added to this set. More...
 
void setMenuHandler (MenuHandler *)
 
void setSelActive (bool yn)
 
void setSelectionPolygonLineStyle (const OD::LineStyle &)
 
void setSelectionPolygonRectangle (bool)
 If not rectangle, it's a polygon. More...
 
void setSelectionPolygonVisible (bool)
 
void setView (const Rect &wv, const Geom::Rectangle< int > &mouserect)
 
Sowersower ()
 
Viewerviewer ()
 
const Viewerviewer () const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Public Attributes

Notifier< AuxDataEditoraddAuxDataChange
 
Notifier< AuxDataEditormovementFinished
 
Notifier< AuxDataEditormovementStarted
 
Notifier< AuxDataEditorreleaseSelection
 
CNotifier< AuxDataEditor, bool > removeSelected
 

Protected Member Functions

int dataSetIdxAt (const Geom::Point2D< int > &) const
 
void findSelection (const Geom::Point2D< int > &, int &seldatasetidx, TypeSet< int > *selptidxlist) const
 
void getPointSelections (const ObjectSet< AuxData > &polygon, TypeSet< int > &ids, TypeSet< int > &idxs) const
 
void mouseMoveCB (CallBacker *)
 
void mousePressCB (CallBacker *)
 
void mouseReleaseCB (CallBacker *)
 
bool removeSelectionPolygon ()
 Returns true if viewer must be notified. More...
 
bool updateSelection (const Geom::Point2D< int > &)
 

Protected Attributes

int addauxdataid_
 
BoolTypeSet allowadd_
 
BoolTypeSet allowmove_
 
BoolTypeSet allowpolysel_
 
BoolTypeSet allowremove_
 
ObjectSet< AuxDataauxdata_
 
Rect curview_
 
BoolTypeSet doedit_
 
AuxDatafeedback_
 
bool hasmoved_
 
TypeSet< int > ids_
 
bool isselactive_
 
MenuHandlermenuhandler_
 
Geom::PixRectangle< int > mousearea_
 
bool mousedown_
 
MouseEventHandlermousehandler_
 
Rectmovementlimit_
 
ObjectSet< AuxDatapolygonsel_
 
OD::LineStyle polygonsellst_
 
bool polygonselrect_
 
Geom::Point2D< int > prevpt_
 
int seldatasetidx_
 
Point selptcoord_
 
TypeSet< int > selptidx_
 
Sowersower_
 
Viewerviewer_
 

Friends

class Sower
 

Additional Inherited Members

- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Detailed Description

Editor for FlatView::AuxData. Allows the end-user to click-drag-release the points in data. Users of the class have the choice if the editor should do the changes for them, or if they want to do changes themself, driven by the callback.

<>

Constructor & Destructor Documentation

◆ AuxDataEditor()

FlatView::AuxDataEditor::AuxDataEditor ( Viewer ,
MouseEventHandler  
)

◆ ~AuxDataEditor()

virtual FlatView::AuxDataEditor::~AuxDataEditor ( )
virtual

Member Function Documentation

◆ addAuxData()

int FlatView::AuxDataEditor::addAuxData ( FlatView::AuxData ,
bool  doedit 
)
Parameters
doeditsays whether this object should change the auxdata, or if the user of the objects should do it.
Returns
an id of the new set.

◆ dataSetIdxAt()

int FlatView::AuxDataEditor::dataSetIdxAt ( const Geom::Point2D< int > &  ) const
protected

◆ enableEdit()

void FlatView::AuxDataEditor::enableEdit ( int  id,
bool  allowadd,
bool  allowmove,
bool  allowdelete 
)

◆ enablePolySel()

void FlatView::AuxDataEditor::enablePolySel ( int  id,
bool  allowsel 
)

◆ findSelection()

void FlatView::AuxDataEditor::findSelection ( const Geom::Point2D< int > &  ,
int &  seldatasetidx,
TypeSet< int > *  selptidxlist 
) const
protected

◆ getAddAuxData()

int FlatView::AuxDataEditor::getAddAuxData ( ) const
Returns
the id of the set that new points will be added to

◆ getAuxData()

const ObjectSet<AuxData>& FlatView::AuxDataEditor::getAuxData ( ) const

◆ getIds()

const TypeSet<int>& FlatView::AuxDataEditor::getIds ( ) const

◆ getMenuHandler()

MenuHandler* FlatView::AuxDataEditor::getMenuHandler ( )

◆ getMouseArea()

const Geom::PixRectangle<int>& FlatView::AuxDataEditor::getMouseArea ( ) const
inline

◆ getPointSelections() [1/2]

void FlatView::AuxDataEditor::getPointSelections ( const ObjectSet< AuxData > &  polygon,
TypeSet< int > &  ids,
TypeSet< int > &  idxs 
) const
protected

Each point within the limits of the polygons will be put in the typesets.

◆ getPointSelections() [2/2]

void FlatView::AuxDataEditor::getPointSelections ( TypeSet< int > &  ids,
TypeSet< int > &  idxs 
) const

Each point within the limits of the polygons will be put in the typesets.

◆ getSelectionPolygonLineStyle()

const OD::LineStyle& FlatView::AuxDataEditor::getSelectionPolygonLineStyle ( ) const

◆ getSelectionPolygonRectangle()

bool FlatView::AuxDataEditor::getSelectionPolygonRectangle ( ) const

If not rectangle, it's a polygon.

◆ getSelPtDataID()

int FlatView::AuxDataEditor::getSelPtDataID ( ) const

◆ getSelPtIdx()

const TypeSet<int>& FlatView::AuxDataEditor::getSelPtIdx ( ) const

◆ getSelPtPos()

const Point& FlatView::AuxDataEditor::getSelPtPos ( ) const

◆ getWorldRect()

Rect FlatView::AuxDataEditor::getWorldRect ( int  dataid) const

◆ isDragging()

bool FlatView::AuxDataEditor::isDragging ( ) const
inline

◆ isSelActive()

bool FlatView::AuxDataEditor::isSelActive ( ) const
inline

◆ limitMovement()

void FlatView::AuxDataEditor::limitMovement ( const Rect )

When movement starts, the movement is unlimited. Movement can be limited once the movement started by calling limitMovement.

◆ markerPosAt()

const Point* FlatView::AuxDataEditor::markerPosAt ( const Geom::Point2D< int > &  mousepos) const

◆ mouseEventHandler()

MouseEventHandler& FlatView::AuxDataEditor::mouseEventHandler ( )
inline

◆ mouseMoveCB()

void FlatView::AuxDataEditor::mouseMoveCB ( CallBacker )
protected

◆ mousePressCB()

void FlatView::AuxDataEditor::mousePressCB ( CallBacker )
protected

◆ mouseReleaseCB()

void FlatView::AuxDataEditor::mouseReleaseCB ( CallBacker )
protected

◆ removeAuxData()

void FlatView::AuxDataEditor::removeAuxData ( int  id)

◆ removePolygonSelected()

void FlatView::AuxDataEditor::removePolygonSelected ( int  dataid)

If dataid ==-1, all pts inside polygon is removed.

◆ removeSelectionPolygon()

bool FlatView::AuxDataEditor::removeSelectionPolygon ( )
protected

Returns true if viewer must be notified.

◆ setAddAuxData()

void FlatView::AuxDataEditor::setAddAuxData ( int  id)

Added points will be added to this set.

◆ setMenuHandler()

void FlatView::AuxDataEditor::setMenuHandler ( MenuHandler )

◆ setSelActive()

void FlatView::AuxDataEditor::setSelActive ( bool  yn)

◆ setSelectionPolygonLineStyle()

void FlatView::AuxDataEditor::setSelectionPolygonLineStyle ( const OD::LineStyle )

◆ setSelectionPolygonRectangle()

void FlatView::AuxDataEditor::setSelectionPolygonRectangle ( bool  )

If not rectangle, it's a polygon.

◆ setSelectionPolygonVisible()

void FlatView::AuxDataEditor::setSelectionPolygonVisible ( bool  )

◆ setView()

void FlatView::AuxDataEditor::setView ( const Rect wv,
const Geom::Rectangle< int > &  mouserect 
)

User of the class must ensure that both the wv and the mouserect are up to date at all times.

◆ sower()

Sower& FlatView::AuxDataEditor::sower ( )
inline

◆ updateSelection()

bool FlatView::AuxDataEditor::updateSelection ( const Geom::Point2D< int > &  )
protected
Returns
true if something is selected

◆ viewer() [1/2]

Viewer& FlatView::AuxDataEditor::viewer ( )
inline

◆ viewer() [2/2]

const Viewer& FlatView::AuxDataEditor::viewer ( ) const
inline

Friends And Related Function Documentation

◆ Sower

friend class Sower
friend

Member Data Documentation

◆ addAuxDataChange

Notifier<AuxDataEditor> FlatView::AuxDataEditor::addAuxDataChange

◆ addauxdataid_

int FlatView::AuxDataEditor::addauxdataid_
protected

◆ allowadd_

BoolTypeSet FlatView::AuxDataEditor::allowadd_
protected

◆ allowmove_

BoolTypeSet FlatView::AuxDataEditor::allowmove_
protected

◆ allowpolysel_

BoolTypeSet FlatView::AuxDataEditor::allowpolysel_
protected

◆ allowremove_

BoolTypeSet FlatView::AuxDataEditor::allowremove_
protected

◆ auxdata_

ObjectSet<AuxData> FlatView::AuxDataEditor::auxdata_
protected

◆ curview_

Rect FlatView::AuxDataEditor::curview_
protected

◆ doedit_

BoolTypeSet FlatView::AuxDataEditor::doedit_
protected

◆ feedback_

AuxData* FlatView::AuxDataEditor::feedback_
protected

◆ hasmoved_

bool FlatView::AuxDataEditor::hasmoved_
protected

◆ ids_

TypeSet<int> FlatView::AuxDataEditor::ids_
protected

◆ isselactive_

bool FlatView::AuxDataEditor::isselactive_
protected

◆ menuhandler_

MenuHandler* FlatView::AuxDataEditor::menuhandler_
protected

◆ mousearea_

Geom::PixRectangle<int> FlatView::AuxDataEditor::mousearea_
protected

◆ mousedown_

bool FlatView::AuxDataEditor::mousedown_
protected

◆ mousehandler_

MouseEventHandler& FlatView::AuxDataEditor::mousehandler_
protected

◆ movementFinished

Notifier<AuxDataEditor> FlatView::AuxDataEditor::movementFinished

◆ movementlimit_

Rect* FlatView::AuxDataEditor::movementlimit_
protected

◆ movementStarted

Notifier<AuxDataEditor> FlatView::AuxDataEditor::movementStarted

◆ polygonsel_

ObjectSet<AuxData> FlatView::AuxDataEditor::polygonsel_
protected

◆ polygonsellst_

OD::LineStyle FlatView::AuxDataEditor::polygonsellst_
protected

◆ polygonselrect_

bool FlatView::AuxDataEditor::polygonselrect_
protected

◆ prevpt_

Geom::Point2D<int> FlatView::AuxDataEditor::prevpt_
protected

◆ releaseSelection

Notifier<AuxDataEditor> FlatView::AuxDataEditor::releaseSelection

◆ removeSelected

CNotifier<AuxDataEditor,bool> FlatView::AuxDataEditor::removeSelected

if getSelPtDataID==-1 selection polygon changed else If selPtIdx()==-1, position should be added, else point moved. Boolean is true if this is the end of user interaction

◆ seldatasetidx_

int FlatView::AuxDataEditor::seldatasetidx_
protected

◆ selptcoord_

Point FlatView::AuxDataEditor::selptcoord_
protected

◆ selptidx_

TypeSet<int> FlatView::AuxDataEditor::selptidx_
protected

◆ sower_

Sower* FlatView::AuxDataEditor::sower_
protected

◆ viewer_

Viewer& FlatView::AuxDataEditor::viewer_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024