Engauge Digitizer 2
|
This class contains all Guideline objects. More...
#include <Guidelines.h>
Public Member Functions | |
Guidelines (MainWindow &mainWindow) | |
Single constructor. | |
~Guidelines () | |
void | clear () |
Remove guidelines since the current Document is about to be closed. | |
ColorPalette | color () const |
Color to be used for guidelines. | |
CoordsType | coordsType () const |
Return cartesian or polar. | |
GuidelineAbstract * | createGuideline (const QString &identifier, GuidelineState stateInitial) |
Factory method for creating a new Guideline. | |
void | createGuidelineR (const QString &identifier, double r) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_R_ACTIVE. | |
void | createGuidelineR (const QString &identifier, const QPointF &posScreen) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_R_ACTIVE. | |
void | createGuidelineT (const QString &identifier, double t) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_T_ACTIVE. | |
void | createGuidelineT (const QString &identifier, const QPointF &posScreen) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_T_ACTIVE. | |
void | createGuidelineX (const QString &identifier, double x) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_X_ACTIVE. | |
void | createGuidelineX (const QString &identifier, const QPointF &posScreen) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_X_ACTIVE. | |
void | createGuidelineY (const QString &identifier, double y) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_ACTIVE. | |
void | createGuidelineY (const QString &identifier, const QPointF &posScreen) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_ACTIVE. | |
void | createReplacementGuideline (const QString &identifierReplaced, double newValue, GuidelineState guidelineStateForReplacement) |
Factory method for creating a new replacement Guideline, which replaces one handle and one visible Guideline after a drag. | |
void | handleActiveChange (bool active) |
DigitizeState change so active status may (or may not) be toggled. | |
void | handleGuidelineMode (bool visible, bool locked) |
User toggled guideline mode. | |
void | initialize (GraphicsScene &scene) |
Initialize Guideline factory. | |
DocumentModelGuidelines | modelGuidelines () const |
Return complete set of guidelines information for Document. | |
void | moveGuidelineXT (const QString &identifier, double valueAfter) |
Move an X/T guideline from one value to another. Closest value wins. | |
void | moveGuidelineYR (const QString &identifier, double valueAfter) |
Move an Y/R guideline from one value to another. Closest value wins. | |
void | removeGuideline (const QString &identifier) |
Remove an X/T or Y/R guideline. | |
void | setModelGuidelines (CoordsType coordsType, const DocumentModelGuidelines &modelGuidelines) |
Load Guidelines from Document. | |
QString | stateDump () const |
States listed as a string for debugging only. | |
Transformation | transformation () const |
Return copy of transformation owned by MainWindow. | |
void | updateColor () |
Force a color update. | |
void | updateWithLatestTransformation () |
Update transformation. This is called after a command has been executed. | |
Friends | |
class | TestGuidelines |
For unit testing. | |
This class contains all Guideline objects.
Definition at line 27 of file Guidelines.h.
Guidelines::Guidelines | ( | MainWindow & | mainWindow | ) |
Single constructor.
Definition at line 27 of file Guidelines.cpp.
Guidelines::~Guidelines | ( | ) |
Definition at line 33 of file Guidelines.cpp.
void Guidelines::clear | ( | ) |
Remove guidelines since the current Document is about to be closed.
Definition at line 39 of file Guidelines.cpp.
ColorPalette Guidelines::color | ( | ) | const |
Color to be used for guidelines.
Definition at line 73 of file Guidelines.cpp.
CoordsType Guidelines::coordsType | ( | ) | const |
Return cartesian or polar.
Definition at line 78 of file Guidelines.cpp.
GuidelineAbstract * Guidelines::createGuideline | ( | const QString & | identifier, |
GuidelineState | stateInitial ) |
Factory method for creating a new Guideline.
Definition at line 83 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_R_ACTIVE.
Definition at line 110 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_R_ACTIVE.
Definition at line 98 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_T_ACTIVE.
Definition at line 134 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_T_ACTIVE.
Definition at line 122 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_X_ACTIVE.
Definition at line 158 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_X_ACTIVE.
Definition at line 146 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_ACTIVE.
Definition at line 182 of file Guidelines.cpp.
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_ACTIVE.
Definition at line 170 of file Guidelines.cpp.
void Guidelines::createReplacementGuideline | ( | const QString & | identifierReplaced, |
double | newValue, | ||
GuidelineState | guidelineStateForReplacement ) |
Factory method for creating a new replacement Guideline, which replaces one handle and one visible Guideline after a drag.
Definition at line 194 of file Guidelines.cpp.
DigitizeState change so active status may (or may not) be toggled.
Definition at line 276 of file Guidelines.cpp.
User toggled guideline mode.
Definition at line 293 of file Guidelines.cpp.
void Guidelines::initialize | ( | GraphicsScene & | scene | ) |
DocumentModelGuidelines Guidelines::modelGuidelines | ( | ) | const |
Return complete set of guidelines information for Document.
Definition at line 318 of file Guidelines.cpp.
Move an X/T guideline from one value to another. Closest value wins.
Definition at line 344 of file Guidelines.cpp.
Move an Y/R guideline from one value to another. Closest value wins.
Definition at line 362 of file Guidelines.cpp.
Remove an X/T or Y/R guideline.
Since Guideline identifiers are unique this method is not implemented with separate X/T and Y/R versions
Definition at line 390 of file Guidelines.cpp.
void Guidelines::setModelGuidelines | ( | CoordsType | coordsType, |
const DocumentModelGuidelines & | modelGuidelines ) |
Load Guidelines from Document.
Definition at line 402 of file Guidelines.cpp.
QString Guidelines::stateDump | ( | ) | const |
States listed as a string for debugging only.
Definition at line 439 of file Guidelines.cpp.
Transformation Guidelines::transformation | ( | ) | const |
Return copy of transformation owned by MainWindow.
Definition at line 481 of file Guidelines.cpp.
void Guidelines::updateColor | ( | ) |
Force a color update.
Definition at line 512 of file Guidelines.cpp.
void Guidelines::updateWithLatestTransformation | ( | ) |
Update transformation. This is called after a command has been executed.
Definition at line 527 of file Guidelines.cpp.
|
friend |
For unit testing.
Definition at line 30 of file Guidelines.h.