Manages annotations. More...
Collaboration diagram for MAKLogger::DtLgrAnnotationManager:Public Types | |
|
typedef std::list < DtLgrAnnotation * > | AnnotationList |
Public Member Functions | |
| virtual void | setAllowChanges (bool allowed) |
| Control whether changes may be made to the annotations. | |
| virtual bool | allowChanges () const |
| Get whether changes may be made to the annotations. | |
| virtual void | addAnnotation (DtLgrAnnotation *annotation) |
| Adds an annotation to the manager. | |
| virtual void | removeAnnotation (DtLgrAnnotation *annotation) |
| Removes the given annotation. The annotation is deallocated. | |
| virtual void | clearAnnotations () |
| Remove all annotations. All annotation are deallocated. | |
| virtual void | deleteTimeRange (const DtAbsoluteTime &start, const DtAbsoluteTime &end) |
| Delete all annotations in the range, or clip those who are partially in the range. | |
| virtual void | moveTimeRange (const DtAbsoluteTime &start, const DtAbsoluteTime &end, const DtRelativeTime &offset) |
| Move all annotations in the range by the offset. | |
| virtual void | annotationsStartingAt (DtAbsoluteTime, AnnotationList &output) |
| Get a list of all annotations starting at the given time. | |
| virtual void | annotationsEndingAt (DtAbsoluteTime, AnnotationList &output) |
| Get a list of all annotations ending at a given time. | |
| virtual void | annotationsDuring (DtAbsoluteTime, AnnotationList &output) |
| Get a list of all annotations which have the given time between their starting and ending points. | |
| virtual const AnnotationList & | annotations () |
| Get a list of all annotations. | |
| virtual void | annotationChanged (DtLgrAnnotation *annotation) |
| Called by annotation when it is modified. | |
| virtual void | annotationsChanged () |
| Called by when annotations in the manager changed. | |
| virtual bool | isAnnotationStateSaved () const |
| Get whether the annotation state is currently saved. | |
| virtual void | saveAnnotationState (DtEnvironment environment) |
| Save the annotations to the provided environment. | |
| virtual void | setAnnotationState (const DtEnvironment environment, bool clear=true) |
| Reads the annotations from the environment. | |
| virtual void | addView (DtLgrAnnotationBaseView *view) |
| Add a view to be notified of changes. | |
| virtual void | removeView (DtLgrAnnotationBaseView *view) |
| Remove a view from the model which stops it from receiving notification of changes. | |
| virtual void | annotationsSaved () |
| Called when annotations have been saved. | |
| virtual bool | autoLoad () const |
| Annotations are automatically loaded when a lgr file is opened. | |
| virtual void | setAutoLoad (bool autoLoad) |
| Set whether annotations are automatically loaded when a lgr file is opened. | |
| virtual bool | empty () const |
| Whether the are no annotations. | |
Protected Types | |
|
typedef std::set < DtLgrAnnotationBaseView * > | ViewSet |
| List type of views. | |
Protected Attributes | |
| AnnotationList | myAnnotations |
| The managers list of annotations. | |
| bool | myAnnotationStateSaved |
| Stores whether the state is considered 'saved'. | |
| bool | myUnlockedState |
| ViewSet | myViews |
| A list of views the model will notify of changes. | |
| bool | myAutoLoadFlag |
Private Member Functions | |
| DtLgrAnnotationManager (const DtLgrAnnotationManager &) | |
| Not Implemented. | |
| DtLgrAnnotationManager & | operator= (const DtLgrAnnotationManager &) |
| Not Implemented. | |
Manages annotations.
| virtual void MAKLogger::DtLgrAnnotationManager::addAnnotation | ( | DtLgrAnnotation * | annotation | ) | [virtual] |
Adds an annotation to the manager.
The manager assumes ownership of the annotation.
| virtual void MAKLogger::DtLgrAnnotationManager::addView | ( | DtLgrAnnotationBaseView * | view | ) | [virtual] |
Add a view to be notified of changes.
All views must be removed before being deallocated.
| virtual void MAKLogger::DtLgrAnnotationManager::annotationChanged | ( | DtLgrAnnotation * | annotation | ) | [virtual] |
Called by annotation when it is modified.
This function is used to track annotation changes.
| virtual void MAKLogger::DtLgrAnnotationManager::annotationsDuring | ( | DtAbsoluteTime | , |
| AnnotationList & | output | ||
| ) | [virtual] |
Get a list of all annotations which have the given time between their starting and ending points.
| virtual void MAKLogger::DtLgrAnnotationManager::deleteTimeRange | ( | const DtAbsoluteTime & | start, |
| const DtAbsoluteTime & | end | ||
| ) | [virtual] |
Delete all annotations in the range, or clip those who are partially in the range.
| virtual void MAKLogger::DtLgrAnnotationManager::removeView | ( | DtLgrAnnotationBaseView * | view | ) | [virtual] |
Remove a view from the model which stops it from receiving notification of changes.
| virtual void MAKLogger::DtLgrAnnotationManager::setAnnotationState | ( | const DtEnvironment | environment, |
| bool | clear = true |
||
| ) | [virtual] |
Reads the annotations from the environment.
Only the root's child annotation objects in the environment will be used. Existing annotations are deleted unless clear is set to false.
| Input | |
| clear | Controls whether the existing annotations are cleared first. |
| virtual void MAKLogger::DtLgrAnnotationManager::setAutoLoad | ( | bool | autoLoad | ) | [virtual] |
Set whether annotations are automatically loaded when a lgr file is opened.
bool MAKLogger::DtLgrAnnotationManager::myAnnotationStateSaved [protected] |
Stores whether the state is considered 'saved'.
Initially the state is not saved. Upon opening a file the state is considered saved until a changes is made. Once a change is made the state will be false until the state is re-saved.