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. | |
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 | setModelGuideline (CoordsType coordsType, const DocumentModelGuideline &modelGuideline) |
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. | |
DocumentModelGuideline | updateValues (const DocumentModelGuideline &modelGuidelineOld) const |
Updates the guideline values for later storing in Document. Only the values are updated. | |
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.
void Guidelines::createGuidelineR | ( | const QString & | identifier, |
const QPointF & | posScreen ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_R_ACTIVE.
Definition at line 110 of file Guidelines.cpp.
void Guidelines::createGuidelineR | ( | const QString & | identifier, |
double | r ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_R_ACTIVE.
Definition at line 98 of file Guidelines.cpp.
void Guidelines::createGuidelineT | ( | const QString & | identifier, |
const QPointF & | posScreen ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_T_ACTIVE.
Definition at line 134 of file Guidelines.cpp.
void Guidelines::createGuidelineT | ( | const QString & | identifier, |
double | t ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_T_ACTIVE.
Definition at line 122 of file Guidelines.cpp.
void Guidelines::createGuidelineX | ( | const QString & | identifier, |
const QPointF & | posScreen ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_X_ACTIVE.
Definition at line 158 of file Guidelines.cpp.
void Guidelines::createGuidelineX | ( | const QString & | identifier, |
double | x ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_X_ACTIVE.
Definition at line 146 of file Guidelines.cpp.
void Guidelines::createGuidelineY | ( | const QString & | identifier, |
const QPointF & | posScreen ) |
Factory method for creating a new GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_ACTIVE.
Definition at line 182 of file Guidelines.cpp.
void Guidelines::createGuidelineY | ( | const QString & | identifier, |
double | y ) |
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.
void Guidelines::handleActiveChange | ( | bool | active | ) |
DigitizeState change so active status may (or may not) be toggled.
Definition at line 276 of file Guidelines.cpp.
void Guidelines::handleGuidelineMode | ( | bool | visible, |
bool | locked ) |
User toggled guideline mode.
Definition at line 293 of file Guidelines.cpp.
void Guidelines::initialize | ( | GraphicsScene & | scene | ) |
Initialize Guideline factory.
Definition at line 313 of file Guidelines.cpp.
void Guidelines::moveGuidelineXT | ( | const QString & | identifier, |
double | valueAfter ) |
Move an X/T guideline from one value to another. Closest value wins.
Definition at line 346 of file Guidelines.cpp.
void Guidelines::moveGuidelineYR | ( | const QString & | identifier, |
double | valueAfter ) |
Move an Y/R guideline from one value to another. Closest value wins.
Definition at line 364 of file Guidelines.cpp.
void Guidelines::removeGuideline | ( | const QString & | identifier | ) |
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 392 of file Guidelines.cpp.
void Guidelines::setModelGuideline | ( | CoordsType | coordsType, |
const DocumentModelGuideline & | modelGuideline ) |
Load Guidelines from Document.
Definition at line 404 of file Guidelines.cpp.
QString Guidelines::stateDump | ( | ) | const |
States listed as a string for debugging only.
Definition at line 441 of file Guidelines.cpp.
Transformation Guidelines::transformation | ( | ) | const |
Return copy of transformation owned by MainWindow.
Definition at line 483 of file Guidelines.cpp.
void Guidelines::updateColor | ( | ) |
Force a color update.
Definition at line 514 of file Guidelines.cpp.
DocumentModelGuideline Guidelines::updateValues | ( | const DocumentModelGuideline & | modelGuidelineOld | ) | const |
Updates the guideline values for later storing in Document. Only the values are updated.
Definition at line 318 of file Guidelines.cpp.
void Guidelines::updateWithLatestTransformation | ( | ) |
Update transformation. This is called after a command has been executed.
Definition at line 529 of file Guidelines.cpp.
|
friend |
For unit testing.
Definition at line 30 of file Guidelines.h.