MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
MAKLogger::DtLgrAnnotationBar Class Reference

The annotation bar displays Annotation sliders and allows for easy editing. More...

+ Inheritance diagram for MAKLogger::DtLgrAnnotationBar:
+ Collaboration diagram for MAKLogger::DtLgrAnnotationBar:

Classes

struct  LaneEntry
 

Public Slots

virtual void selectAnnotation (DtLgrAnnotation *annotation)
 The slot to select an annotation based on its index in the menu. More...
 
virtual void timesChanged ()
 The slot to act when the first and last times changed. More...
 
virtual void barMoved (DtSliderBar *)
 Slot called when a bar moves. More...
 
virtual void barSizeChanged (DtSliderBar *)
 Slot called when a bar changes size. More...
 
virtual void setOffsets (float left, float right)
 Reflow lanes when the zoom changes. More...
 
- Public Slots inherited from MAKLogger::DtLgrZoomableWidget
virtual void setOffsets (float left, float right)
 
virtual void testForUpdate (DtLgrGuiModel &model)
 

Signals

virtual void attemptModifyAnnotation ()
 
virtual void selectedAnnotationChanged (DtLgrAnnotation *annotation)
 
- Signals inherited from MAKLogger::DtOverlapSlider
void barMoved (DtSliderBar *)
 
void barSizeChanged (DtSliderBar *)
 
- Signals inherited from MAKLogger::DtLgrZoomableWidget
void offsetsChanged (float left, float right)
 

Public Member Functions

 DtLgrAnnotationBar (DtLgrAnnotationComponent *, QWidget *p)
 
virtual ~DtLgrAnnotationBar ()
 DTOR. More...
 
void connectSlots (DtLgrAnnotationSlots *annSlots)
 Connect the bar to any of the slots. More...
 
virtual void addAnnotation (DtLgrAnnotation *annotation)
 Add am annotation to be displayed. More...
 
virtual void removeAnnotation (DtLgrAnnotation *annotation)
 Remove an annotation int the display. More...
 
virtual void updateAnnotation (DtLgrAnnotation *annotation)
 Update an annotation in the display. More...
 
virtual void clearAnnotations ()
 Remove all annotations. More...
 
virtual DtLgrAnnotation * selectedAnnotation ()
 Get the selected annotation. More...
 
virtual void selectBar (DtSliderBar *bar)
 Override default select bar to get selected annotation. More...
 
virtual void selectBox (DtSliderBox *box)
 Select the box's owning bar (and its annotation) first. More...
 
virtual void unselectAll ()
 Override default unselect all to unselect annotation. More...
 
- Public Member Functions inherited from MAKLogger::DtOverlapSlider
 DtOverlapSlider (QWidget *parent)
 CTOR. More...
 
virtual DtSliderBar * addRange (QString name, float start, float end)
 Add a new Range. More...
 
virtual void removeRange (QString name)
 Remove a range by its name. More...
 
virtual void clearRanges ()
 Remove all ranges. More...
 
- Public Member Functions inherited from MAKLogger::DtLgrZoomableWidget
 DtLgrZoomableWidget (QWidget *parent)
 CTOR. More...
 
virtual ~DtLgrZoomableWidget ()
 DTOR. More...
 
QRectF scaledViewport (QRect orignalViewport, QPoint margins) const
 Scale a viewport using the scaled settings and the provided margins. More...
 
void drawCursor (QPainter &painter, double firstVisibleTime, double lastVisibleTime, double cursorTime, int xOffset, bool active)
 Draw A cursor. More...
 
QRect cursorBounds (double firstVisibleTime, double lastVisibleTime, double cursorTime, int xOffset)
 Get the cursor bounds. More...
 
double firstVisibleTime (double firstTime, double lastTime) const
 Get the first visible time, based upon the scale. More...
 
double firstVisibleTime (DtLgrGuiModel &model) const
 Get the first visible time via the models display time. More...
 
double lastVisibleTime (double firstTime, double lastTime) const
 Get the last visible time, based upon the scale. More...
 
double lastVisibleTime (DtLgrGuiModel &model) const
 Get the last visible time via the models display time. More...
 
float leftOffset () const
 Get the left offset (percent 0-100.0), inline for performance reasons. More...
 
float rightOffset () const
 Get the right offset (percent 0-100.0), inline for performance reasons. More...
 
float horizontalMargin () const
 get the horizontal margin. More...
 
void setHorizontalMargin (float margin)
 set the horizontal margin. More...
 
void setDrawTimes (DtLgrGuiModel &model)
 
- Public Member Functions inherited from MAKLogger::DtMultiBoxSlider
 DtMultiBoxSlider ()
 CTOR. More...
 
virtual ~DtMultiBoxSlider ()
 DTOR. More...
 
void addBar (DtSliderBar *bar)
 Add a preexisting bar. More...
 
DtSliderBar * addBar (float start, float end)
 Add a new bar at the positions. More...
 
DtSliderBar * bar (QString name)
 Lookup a slider bar by name. More...
 
void removeBarByName (QString name)
 Lookup a slider bar by name, and then remove it if it is found. More...
 
void removeBar (DtSliderBar *bar)
 Remove a bar (and it's boxes) from the slider. More...
 
virtual float maxBoxWidth () const
 
virtual float minBoxWidth () const
 
virtual float maxBoxHeight () const
 
virtual float minBoxHeight () const
 
virtual float minimumDistance () const
 
virtual void setMinimumDistance (float distance)
 
virtual void saveMinimumDistance ()
 
virtual void restoreMinimumDistance ()
 
virtual void movePressedBoxes (float v)
 
virtual void restorePressedBoxes ()
 
virtual void unpressAll ()
 
virtual void pushToTop (DtSliderBox *box)
 Pushes box and bar to top. More...
 
virtual void pushToTop (DtSliderBar *bar)
 
virtual void pressBox (DtSliderBox *box)
 
virtual void pressBar (DtSliderBar *bar)
 
virtual void releaseBox (DtSliderBox *box)
 
virtual void releaseBar (DtSliderBar *bar)
 
- Public Member Functions inherited from MAKLogger::DtDragComponent
 DtDragComponent ()
 CTOR. More...
 
virtual ~DtDragComponent ()
 DTOR. More...
 
void registerMousePress (const QMouseEvent &e)
 To be called when mouse is pressed. More...
 
void registerMouseRelease (const QMouseEvent &e)
 To be called when mouse is released. More...
 
void registerMouseMove (const QMouseEvent &e)
 To be called when mouse is moved. More...
 
QPoint absolutePosition () const
 Get the absolute position of the mouse. More...
 
QPoint relativePosition () const
 Get the relative position of the mouse from the initial position. More...
 
QPoint relativeVelocity () const
 Get the relative position of the mouse from the last update. More...
 
bool currentlyDragging () const
 Get whether the mouse is currently dragging. More...
 

Protected Types

typedef std::map
< DtLgrAnnotation
*, DtLgrAnnotationSliderBar * > 
AnnotationBarMap
 

Protected Member Functions

virtual void draw (QPainter &painter, QRect boundingRect)
 
virtual void drawBox (QPainter &painter, DtSliderBox *box) const
 Custom box drawing. More...
 
void updateRanges ()
 Update the ranges. More...
 
virtual void showAnnotationActionMenu (QPoint position)
 Show a menu which has all the actions you can perform on the annotation. More...
 
virtual void showSelectAnnotationMenu (QPoint position)
 Show a menu which has all annotations. More...
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 Double click event. More...
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual void drawBar (QPainter &painter, DtSliderBar *bar) const
 Override bar drawing to draw the annotation. More...
 
virtual void drawBars (QPainter &painter) const
 Draw lane separators, then each bar (and its handles) in its lane. More...
 
virtual bool event (QEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void showEvent (QShowEvent *event)
 
virtual void changeEvent (QEvent *event)
 
virtual void barToTimes (const DtSliderBar *bar, DtAbsoluteTime &firstTime, DtAbsoluteTime &lastTime)
 
virtual DtSliderBar * pickBar (QRectF viewport, QPoint pos)
 Lane-aware picking; only the x/width of viewport are used. More...
 
virtual DtSliderBox * pickBox (QRectF viewport, QPoint pos)
 Lane-aware picking; only the x/width of viewport are used. More...
 
- Protected Member Functions inherited from MAKLogger::DtOverlapSlider
virtual void moveBox (DtSliderBox *box, float v)
 Override moveBox to emit signals. More...
 
virtual void enterEvent (QEvent *)
 
virtual void leaveEvent (QEvent *)
 
virtual void paintEvent (QPaintEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void drawBoxes (QPainter &painter) const
 
- Protected Member Functions inherited from MAKLogger::DtMultiBoxSlider
virtual float adjustBoxMoveDelta (DtSliderBox *box, float dv)
 Resolve a requested drag delta to the nearest valid delta for this slider, enforcing overlap/order rules and [0,100] percentage bounds. More...
 
QPointF getBoxPositionBounds (DtSliderBox *box) const
 
void calcMinMax () const
 

Protected Attributes

DtLgrAnnotationComponent * myAnnotationComponent
 
AnnotationBarMap myAnnotationBars
 
DtLgrAnnotation * mySelectedAnnotation
 
DtLgrAnnotationSlots * mySlots
 
- Protected Attributes inherited from MAKLogger::DtOverlapSlider
QMatrix myDrawnMatrix
 
QColor myColorGradTop
 
QColor myColorGradBottom
 
DtSliderBar * myActiveBar
 The bar currently under the mouse. More...
 
- Protected Attributes inherited from MAKLogger::DtLgrZoomableWidget
float myLeftOffset
 
float myRightOffset
 
float myHorizontalMargin
 
double myDrawnFirstVisibleTime
 
double myDrawnLastVisibleTime
 
double myDrawnCurrentVisibleTime
 
- Protected Attributes inherited from MAKLogger::DtMultiBoxSlider
DtSliderBoxList myBoxes
 
DtSliderBarList myBars
 
bool myAllowOverlap
 
float myMinimumDistance
 
float mySavedMinimumDistance
 
bool myMutableListChanged
 
float myMutableMaxWidth
 
float myMutableMinWidth
 
float myMutableMaxHeight
 
float myMutableMinHeight
 
- Protected Attributes inherited from MAKLogger::DtDragComponent
QPoint myFirstPosition
 
QPoint myLastPosition
 
QPoint myCurrentPosition
 
bool myDownFlag
 

Private Member Functions

 DtLgrAnnotationBar (const DtLgrAnnotationBar &)
 Not Implemented. More...
 
DtLgrAnnotationBar & operator= (const DtLgrAnnotationBar &)
 Not Implemented. More...
 
void relayout ()
 Recompute lanes now, or defer it until the drag ends. More...
 
void recomputeLanes ()
 Pack bars into lanes at the current zoom and width. More...
 
bool boxPressed () const
 Whether a bar or handle is pressed (a drag is in progress). More...
 
QRect selectedBarRect () const
 Selected bar's hit rectangle in widget coordinates, or empty. More...
 
QRectF laneViewport () const
 Viewport of a single lane in lane-local coordinates. More...
 
bool toLaneLocal (QPoint pos, int &lane, QPointF &local) const
 Map a widget position to a lane and a lane-local point. More...
 
int laneOf (const DtSliderBar *bar) const
 Lane of bar, or -1 if unknown. More...
 
int maxScroll () const
 Largest valid scroll offset in pixels. More...
 
void ensureLaneVisible (int lane)
 Scroll so lane is fully visible. More...
 
bool handlesVisible (const DtSliderBar *bar) const
 Whether the start/end handles of bar are shown and pickable. More...
 
QRectF handleRect (const DtSliderBox *box, const QRectF &laneViewport) const
 Handle rectangle in lane-local coordinates. More...
 
std::vector< DtLgrAnnotation * > annotationsByStart () const
 Annotations ordered by start time (ties in insertion order). More...
 
DtLgrAnnotation * annotationInAdjacentLane (int laneDelta) const
 Annotation in the lane next to the selected one, nearest in x. More...
 

Private Attributes

std::map< DtSliderBar
*, LaneEntry > 
myLanes
 
unsigned long myNextSeq
 
int myLaneCount
 
bool myLanesDirty
 
int myScrollY
 
int myWheelDelta
 

Additional Inherited Members

- Static Protected Member Functions inherited from MAKLogger::DtMultiBoxSlider
static bool lessPosition (DtSliderBox *box1, DtSliderBox *box2)
 
static bool lessWidth (DtSliderBox *box1, DtSliderBox *box2)
 
static bool lessHeight (DtSliderBox *box1, DtSliderBox *box2)
 
- Properties inherited from MAKLogger::DtOverlapSlider
QColor ColorGradTop
 
QColor ColorGradBottom
 

Detailed Description

The annotation bar displays Annotation sliders and allows for easy editing.

Member Typedef Documentation

Constructor & Destructor Documentation

MAKLogger::DtLgrAnnotationBar::DtLgrAnnotationBar ( DtLgrAnnotationComponent *  ,
QWidget *  p 
)
virtual MAKLogger::DtLgrAnnotationBar::~DtLgrAnnotationBar ( )
virtual

DTOR.

MAKLogger::DtLgrAnnotationBar::DtLgrAnnotationBar ( const DtLgrAnnotationBar &  )
private

Not Implemented.

Member Function Documentation

virtual void MAKLogger::DtLgrAnnotationBar::addAnnotation ( DtLgrAnnotation *  annotation)
virtual

Add am annotation to be displayed.

DtLgrAnnotation* MAKLogger::DtLgrAnnotationBar::annotationInAdjacentLane ( int  laneDelta) const
private

Annotation in the lane next to the selected one, nearest in x.

std::vector<DtLgrAnnotation*> MAKLogger::DtLgrAnnotationBar::annotationsByStart ( ) const
private

Annotations ordered by start time (ties in insertion order).

virtual void MAKLogger::DtLgrAnnotationBar::attemptModifyAnnotation ( )
virtualsignal
virtual void MAKLogger::DtLgrAnnotationBar::barMoved ( DtSliderBar *  )
virtualslot

Slot called when a bar moves.

virtual void MAKLogger::DtLgrAnnotationBar::barSizeChanged ( DtSliderBar *  )
virtualslot

Slot called when a bar changes size.

virtual void MAKLogger::DtLgrAnnotationBar::barToTimes ( const DtSliderBar *  bar,
DtAbsoluteTime &  firstTime,
DtAbsoluteTime &  lastTime 
)
protectedvirtual
bool MAKLogger::DtLgrAnnotationBar::boxPressed ( ) const
private

Whether a bar or handle is pressed (a drag is in progress).

virtual void MAKLogger::DtLgrAnnotationBar::changeEvent ( QEvent *  event)
protectedvirtual
virtual void MAKLogger::DtLgrAnnotationBar::clearAnnotations ( )
virtual

Remove all annotations.

void MAKLogger::DtLgrAnnotationBar::connectSlots ( DtLgrAnnotationSlots *  annSlots)

Connect the bar to any of the slots.

virtual void MAKLogger::DtLgrAnnotationBar::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual
virtual void MAKLogger::DtLgrAnnotationBar::draw ( QPainter &  painter,
QRect  boundingRect 
)
protectedvirtual

Reimplemented from MAKLogger::DtOverlapSlider.

virtual void MAKLogger::DtLgrAnnotationBar::drawBar ( QPainter &  painter,
DtSliderBar *  bar 
) const
protectedvirtual

Override bar drawing to draw the annotation.

Reimplemented from MAKLogger::DtOverlapSlider.

virtual void MAKLogger::DtLgrAnnotationBar::drawBars ( QPainter &  painter) const
protectedvirtual

Draw lane separators, then each bar (and its handles) in its lane.

Reimplemented from MAKLogger::DtOverlapSlider.

virtual void MAKLogger::DtLgrAnnotationBar::drawBox ( QPainter &  painter,
DtSliderBox *  box 
) const
protectedvirtual

Custom box drawing.

Reimplemented from MAKLogger::DtOverlapSlider.

void MAKLogger::DtLgrAnnotationBar::ensureLaneVisible ( int  lane)
private

Scroll so lane is fully visible.

virtual bool MAKLogger::DtLgrAnnotationBar::event ( QEvent *  event)
protectedvirtual
virtual void MAKLogger::DtLgrAnnotationBar::focusInEvent ( QFocusEvent *  event)
protectedvirtual
virtual void MAKLogger::DtLgrAnnotationBar::focusOutEvent ( QFocusEvent *  event)
protectedvirtual
QRectF MAKLogger::DtLgrAnnotationBar::handleRect ( const DtSliderBox *  box,
const QRectF &  laneViewport 
) const
private

Handle rectangle in lane-local coordinates.

bool MAKLogger::DtLgrAnnotationBar::handlesVisible ( const DtSliderBar *  bar) const
private

Whether the start/end handles of bar are shown and pickable.

virtual void MAKLogger::DtLgrAnnotationBar::keyPressEvent ( QKeyEvent *  event)
protectedvirtual
int MAKLogger::DtLgrAnnotationBar::laneOf ( const DtSliderBar *  bar) const
private

Lane of bar, or -1 if unknown.

QRectF MAKLogger::DtLgrAnnotationBar::laneViewport ( ) const
private

Viewport of a single lane in lane-local coordinates.

int MAKLogger::DtLgrAnnotationBar::maxScroll ( ) const
private

Largest valid scroll offset in pixels.

virtual void MAKLogger::DtLgrAnnotationBar::mouseDoubleClickEvent ( QMouseEvent *  )
protectedvirtual

Double click event.

virtual void MAKLogger::DtLgrAnnotationBar::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Reimplemented from MAKLogger::DtOverlapSlider.

virtual void MAKLogger::DtLgrAnnotationBar::mouseReleaseEvent ( QMouseEvent *  event)
protectedvirtual

Reimplemented from MAKLogger::DtOverlapSlider.

DtLgrAnnotationBar& MAKLogger::DtLgrAnnotationBar::operator= ( const DtLgrAnnotationBar &  )
private

Not Implemented.

virtual DtSliderBar* MAKLogger::DtLgrAnnotationBar::pickBar ( QRectF  viewport,
QPoint  pos 
)
protectedvirtual

Lane-aware picking; only the x/width of viewport are used.

Reimplemented from MAKLogger::DtMultiBoxSlider.

virtual DtSliderBox* MAKLogger::DtLgrAnnotationBar::pickBox ( QRectF  viewport,
QPoint  pos 
)
protectedvirtual

Lane-aware picking; only the x/width of viewport are used.

Reimplemented from MAKLogger::DtMultiBoxSlider.

void MAKLogger::DtLgrAnnotationBar::recomputeLanes ( )
private

Pack bars into lanes at the current zoom and width.

void MAKLogger::DtLgrAnnotationBar::relayout ( )
private

Recompute lanes now, or defer it until the drag ends.

virtual void MAKLogger::DtLgrAnnotationBar::removeAnnotation ( DtLgrAnnotation *  annotation)
virtual

Remove an annotation int the display.

virtual void MAKLogger::DtLgrAnnotationBar::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Reimplemented from MAKLogger::DtOverlapSlider.

virtual void MAKLogger::DtLgrAnnotationBar::selectAnnotation ( DtLgrAnnotation *  annotation)
virtualslot

The slot to select an annotation based on its index in the menu.

virtual void MAKLogger::DtLgrAnnotationBar::selectBar ( DtSliderBar *  bar)
virtual

Override default select bar to get selected annotation.

Reimplemented from MAKLogger::DtMultiBoxSlider.

virtual void MAKLogger::DtLgrAnnotationBar::selectBox ( DtSliderBox *  box)
virtual

Select the box's owning bar (and its annotation) first.

Reimplemented from MAKLogger::DtMultiBoxSlider.

virtual DtLgrAnnotation* MAKLogger::DtLgrAnnotationBar::selectedAnnotation ( )
virtual

Get the selected annotation.

Return values
0No annotation is selected.
virtual void MAKLogger::DtLgrAnnotationBar::selectedAnnotationChanged ( DtLgrAnnotation *  annotation)
virtualsignal
QRect MAKLogger::DtLgrAnnotationBar::selectedBarRect ( ) const
private

Selected bar's hit rectangle in widget coordinates, or empty.

virtual void MAKLogger::DtLgrAnnotationBar::setOffsets ( float  left,
float  right 
)
virtualslot

Reflow lanes when the zoom changes.

virtual void MAKLogger::DtLgrAnnotationBar::showAnnotationActionMenu ( QPoint  position)
protectedvirtual

Show a menu which has all the actions you can perform on the annotation.

virtual void MAKLogger::DtLgrAnnotationBar::showEvent ( QShowEvent *  event)
protectedvirtual
virtual void MAKLogger::DtLgrAnnotationBar::showSelectAnnotationMenu ( QPoint  position)
protectedvirtual

Show a menu which has all annotations.

virtual void MAKLogger::DtLgrAnnotationBar::timesChanged ( )
virtualslot

The slot to act when the first and last times changed.

bool MAKLogger::DtLgrAnnotationBar::toLaneLocal ( QPoint  pos,
int &  lane,
QPointF &  local 
) const
private

Map a widget position to a lane and a lane-local point.

virtual void MAKLogger::DtLgrAnnotationBar::unselectAll ( )
virtual

Override default unselect all to unselect annotation.

Reimplemented from MAKLogger::DtMultiBoxSlider.

virtual void MAKLogger::DtLgrAnnotationBar::updateAnnotation ( DtLgrAnnotation *  annotation)
virtual

Update an annotation in the display.

void MAKLogger::DtLgrAnnotationBar::updateRanges ( )
protected

Update the ranges.

virtual void MAKLogger::DtLgrAnnotationBar::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Member Data Documentation

AnnotationBarMap MAKLogger::DtLgrAnnotationBar::myAnnotationBars
protected
DtLgrAnnotationComponent* MAKLogger::DtLgrAnnotationBar::myAnnotationComponent
protected
int MAKLogger::DtLgrAnnotationBar::myLaneCount
private
std::map<DtSliderBar*,LaneEntry> MAKLogger::DtLgrAnnotationBar::myLanes
private
bool MAKLogger::DtLgrAnnotationBar::myLanesDirty
private
unsigned long MAKLogger::DtLgrAnnotationBar::myNextSeq
private
int MAKLogger::DtLgrAnnotationBar::myScrollY
private
DtLgrAnnotation* MAKLogger::DtLgrAnnotationBar::mySelectedAnnotation
protected
DtLgrAnnotationSlots* MAKLogger::DtLgrAnnotationBar::mySlots
protected
int MAKLogger::DtLgrAnnotationBar::myWheelDelta
private

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)