|
Engauge Digitizer
2
|
Selectable piecewise-defined line that follows a filtered line in the image. More...
#include <Segment.h>


Public Slots | |
| void | slotHover (bool hover) |
| Slot for hover enter/leave events in the associated SegmentLines. More... | |
Signals | |
| void | signalMouseClickOnSegment (QPointF posSegmentStart) |
| Pass mouse press event, with coordinates of first point in the Segment since that info uniquely identifies the owning Segment. More... | |
Public Member Functions | |
| Segment (QGraphicsScene &scene, int yLast, bool isGnuplot) | |
| Single constructor. More... | |
| ~Segment () | |
| void | appendColumn (int x, int y, const DocumentModelSegments &modelSegments) |
| Add some more pixels in a new column to an active segment. More... | |
| QList< QPoint > | fillPoints (const DocumentModelSegments &modelSegments) |
| Create evenly spaced points along the segment. More... | |
| QPointF | firstPoint () const |
| Coordinates of first point in Segment. More... | |
| void | forwardMousePress () |
| Forward mouse press event from a component SegmentLine that was just clicked on. More... | |
| double | length () const |
| Get method for length in pixels. More... | |
| int | lineCount () const |
| Get method for number of lines. More... | |
| void | removeUnneededLines (int *foldedLines) |
| Try to compress a segment that was just completed, by folding together line from point i to point i+1, with the line from i+1 to i+2, then the line from i+2 to i+3, until one of the points is more than a half pixel from the folded line. More... | |
| void | updateModelSegment (const DocumentModelSegments &modelSegments) |
| Update this segment given the new settings. More... | |
Selectable piecewise-defined line that follows a filtered line in the image.
Clicking on a Segment results in the immediate creation of multiple Points along that Segment.
| Segment::Segment | ( | QGraphicsScene & | scene, |
| int | yLast, | ||
| bool | isGnuplot | ||
| ) |
Single constructor.
Definition at line 22 of file Segment.cpp.
| Segment::~Segment | ( | ) |
Definition at line 32 of file Segment.cpp.
| void Segment::appendColumn | ( | int | x, |
| int | y, | ||
| const DocumentModelSegments & | modelSegments | ||
| ) |
Add some more pixels in a new column to an active segment.
Definition at line 42 of file Segment.cpp.
| QList< QPoint > Segment::fillPoints | ( | const DocumentModelSegments & | modelSegments | ) |
Create evenly spaced points along the segment.
Definition at line 205 of file Segment.cpp.
| QPointF Segment::firstPoint | ( | ) | const |
Coordinates of first point in Segment.
This info can be used to uniquely identify a Segment. This method relies on SegmentFactory::removeEmptySegments to guarantee every Segment has at least one line
Definition at line 281 of file Segment.cpp.
| void Segment::forwardMousePress | ( | ) |
Forward mouse press event from a component SegmentLine that was just clicked on.
Definition at line 298 of file Segment.cpp.
| double Segment::length | ( | ) | const |
Get method for length in pixels.
Definition at line 375 of file Segment.cpp.
| int Segment::lineCount | ( | ) | const |
Get method for number of lines.
Definition at line 380 of file Segment.cpp.
| void Segment::removeUnneededLines | ( | int * | foldedLines | ) |
Try to compress a segment that was just completed, by folding together line from point i to point i+1, with the line from i+1 to i+2, then the line from i+2 to i+3, until one of the points is more than a half pixel from the folded line.
this should save memory and improve user interface responsiveness
Definition at line 421 of file Segment.cpp.
|
signal |
|
slot |
Slot for hover enter/leave events in the associated SegmentLines.
Definition at line 528 of file Segment.cpp.
| void Segment::updateModelSegment | ( | const DocumentModelSegments & | modelSegments | ) |
Update this segment given the new settings.
Definition at line 540 of file Segment.cpp.
1.8.14