Engauge Digitizer 2
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
ViewProfileDivider Class Reference

Divider that can be dragged, in a dialog QGraphicsView. More...

#include <ViewProfileDivider.h>

Inheritance diagram for ViewProfileDivider:

Signals

void signalMovedLow (double xSceneOther)
 Signal used when divider is dragged and m_isLowerBoundary is true.
 
void signalMovedHigh (double xSceneOther)
 Signal used when divider is dragged and m_isLowerBoundary is false.
 

Public Member Functions

 ViewProfileDivider (QGraphicsScene &scene, QGraphicsView &view, int sceneWidth, int sceneHeight, int yCenter, bool isLowerBoundary)
 Single constructor.
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 Intercept changes so divider movement can be restricted to horizontal direction only.
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Save paddle position at start of click-and-drag.
 
void setX (double x, double xLow, double xHigh)
 Set the position by specifying the new x coordinate.
 

Detailed Description

Divider that can be dragged, in a dialog QGraphicsView.

Click on the paddle to drag. There are three parts:

  1. Paddle which is the superclass of this class, since we catch its events so dragging works
  2. Divider which is a vertical line
  3. Shaded area that extends from xAnchor to the divider

Definition at line 23 of file ViewProfileDivider.h.

Constructor & Destructor Documentation

◆ ViewProfileDivider()

ViewProfileDivider::ViewProfileDivider ( QGraphicsScene &  scene,
QGraphicsView &  view,
int  sceneWidth,
int  sceneHeight,
int  yCenter,
bool  isLowerBoundary 
)

Single constructor.

Definition at line 30 of file ViewProfileDivider.cpp.

Member Function Documentation

◆ itemChange()

QVariant ViewProfileDivider::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
virtual

Intercept changes so divider movement can be restricted to horizontal direction only.

Definition at line 87 of file ViewProfileDivider.cpp.

◆ mousePressEvent()

void ViewProfileDivider::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
virtual

Save paddle position at start of click-and-drag.

Definition at line 112 of file ViewProfileDivider.cpp.

◆ setX()

void ViewProfileDivider::setX ( double  x,
double  xLow,
double  xHigh 
)

Set the position by specifying the new x coordinate.

Definition at line 128 of file ViewProfileDivider.cpp.


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