Engauge Digitizer 2
Loading...
Searching...
No Matches
DigitizeStateSelect.cpp
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#include "CallbackScaleBar.h"
8#include "CmdEditPointAxis.h"
9#include "CmdEditPointGraph.h"
10#include "CmdMediator.h"
11#include "CmdMoveBy.h"
12#include "DataKey.h"
14#include "DigitizeStateSelect.h"
15#include "DlgEditPointAxis.h"
16#include "DlgEditPointGraph.h"
17#include "DlgEditScale.h"
18#include "EngaugeAssert.h"
20#include "GraphicsItemType.h"
21#include "GraphicsScene.h"
22#include "GraphicsView.h"
23#include "Logger.h"
24#include "MainWindow.h"
25#include <QCursor>
26#include <QGraphicsItem>
27#include <QImage>
28#include <QMessageBox>
29#include <QObject>
30#include <QSize>
31#include <QtToString.h>
32#include "Transformation.h"
33#include "Version.h"
34
35const QString MOVE_TEXT_DOWN (QObject::tr ("Move down"));
36const QString MOVE_TEXT_LEFT (QObject::tr ("Move left"));
37const QString MOVE_TEXT_RIGHT (QObject::tr ("Move right"));
38const QString MOVE_TEXT_UP (QObject::tr ("Move up"));
39
44
48
53
54void DigitizeStateSelect::addHoverHighlighting()
55{
56 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::addHoverHighlighting";
57
58 QList<QGraphicsItem*> items = context().mainWindow().scene().items();
59 QList<QGraphicsItem*>::iterator itr;
60 for (itr = items.begin (); itr != items.end (); itr++) {
61
62 QGraphicsItem *item = *itr;
64 item->setAcceptHoverEvents(true);
65 }
66 }
67}
68
70 DigitizeState /* previousState */)
71{
72 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::begin";
73
74 setCursor(cmdMediator);
75 context().setDragMode(QGraphicsView::RubberBandDrag);
76
77 addHoverHighlighting();
79}
80
81bool DigitizeStateSelect::canPaste (const Transformation & /* transformation */,
82 const QSize & /* viewSize */) const
83{
84 return false;
85}
86
87QCursor DigitizeStateSelect::cursor(CmdMediator * /* cmdMediator */) const
88{
89 LOG4CPP_DEBUG_S ((*mainCat)) << "DigitizeStateSelect::cursor";
90
91 return QCursor (Qt::ArrowCursor);
92}
93
95{
96 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::end";
97
98 removeHoverHighlighting();
99}
100
102 const QString &pointIdentifier)
103{
104 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::handleContextMenuEventAxis "
105 << " point=" << pointIdentifier.toLatin1 ().data ();
106
108 handleContextMenuEventAxis2 (cmdMediator);
109 } else {
110 handleContextMenuEventAxis34 (cmdMediator,
111 pointIdentifier);
112 }
113}
114
115void DigitizeStateSelect::handleContextMenuEventAxis2 (CmdMediator *cmdMediator)
116{
117 LOG4CPP_DEBUG_S ((*mainCat)) << "DigitizeStateSelect::handleContextMenuEventAxis2";
118
119 const bool IS_NOT_X_ONLY = false;
120
121 // The point identifier we want is not necessarily the one edited but is the one with the
122 // nonzero x or y (but not both) coordinate
123 QString pointIdentifier = scaleBarPointIdentifier (cmdMediator);
124
125 QPointF posScreen = cmdMediator->document().positionScreen (pointIdentifier);
126 QPointF posGraphBefore = cmdMediator->document().positionGraph (pointIdentifier);
127
128 // Ask user for scale length
129 double scaleLength = scaleBarLength (cmdMediator);
130 DlgEditScale *dlg = new DlgEditScale (context().mainWindow(),
131 cmdMediator->document().modelCoords(),
132 cmdMediator->document().modelGeneral(),
133 context().mainWindow().modelMainWindow(),
134 &scaleLength);
135 int rtn = dlg->exec ();
136
137 scaleLength = dlg->scaleLength (); // This call returns new value for scale length
138 delete dlg;
139
140 if (rtn == QDialog::Accepted) {
141
142 // User wants to edit the scale length, which is effectively editing this axis point, but let's perform sanity checks first
143
144 bool isError;
145 QString errorMessage;
146
147 bool isXNonzero = (qAbs (posGraphBefore.x()) > 0); // Identify which coordinate is to be edited
148 QPointF posGraphAfter (isXNonzero ? scaleLength : 0,
149 isXNonzero ? 0 : scaleLength);
151 posScreen,
152 posGraphAfter,
153 isError,
154 errorMessage);
155
156 if (isError) {
157
158 QMessageBox::warning (nullptr,
160 errorMessage);
161
162 } else {
163
164 // Create a command to change the scale length
165 CmdEditPointAxis *cmd = new CmdEditPointAxis (context().mainWindow(),
166 cmdMediator->document(),
167 pointIdentifier,
168 posGraphBefore,
169 posGraphAfter,
170 IS_NOT_X_ONLY);
171 context().appendNewCmd(cmdMediator,
172 cmd);
173 }
174 }
175}
176
177void DigitizeStateSelect::handleContextMenuEventAxis34 (CmdMediator *cmdMediator,
178 const QString &pointIdentifier)
179{
180 LOG4CPP_DEBUG_S ((*mainCat)) << "DigitizeStateSelect::handleContextMenuEventAxis34";
181
182 QPointF posScreen = cmdMediator->document().positionScreen (pointIdentifier);
183 QPointF posGraphBefore = cmdMediator->document().positionGraph (pointIdentifier);
184 bool isXOnly = cmdMediator->document().isXOnly (pointIdentifier);
185
186 // Ask user for coordinates
187 double x = posGraphBefore.x();
188 double y = posGraphBefore.y();
189
190 DlgEditPointAxis *dlg = new DlgEditPointAxis (context().mainWindow(),
191 cmdMediator->document().modelCoords(),
192 cmdMediator->document().modelGeneral(),
193 context().mainWindow().modelMainWindow(),
194 context().mainWindow().transformation(),
195 cmdMediator->document().documentAxesPointsRequired(),
196 isXOnly,
197 &x,
198 &y);
199 int rtn = dlg->exec ();
200
201 QPointF posGraphAfter = dlg->posGraph (isXOnly); // This call returns new values for isXOnly and the graph position
202 delete dlg;
203
204 if (rtn == QDialog::Accepted) {
205
206 // User wants to edit this axis point, but let's perform sanity checks first
207
208 bool isError;
209 QString errorMessage;
210
212 posScreen,
213 posGraphAfter,
214 isError,
215 errorMessage);
216
217 if (isError) {
218
219 QMessageBox::warning (nullptr,
221 errorMessage);
222
223 } else {
224
225 // Create a command to edit the point
226 CmdEditPointAxis *cmd = new CmdEditPointAxis (context().mainWindow(),
227 cmdMediator->document(),
228 pointIdentifier,
229 posGraphBefore,
230 posGraphAfter,
231 isXOnly);
232 context().appendNewCmd(cmdMediator,
233 cmd);
234 }
235 }
236}
237
239 const QStringList &pointIdentifiers)
240{
241 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::handleContextMenuEventGraph "
242 << "points=" << pointIdentifiers.join(",").toLatin1 ().data ();
243
244 // Editing graph coordinates before the axes are defined is not useful because:
245 // 1) That functionality is for fine tuning point placement based on defined axes
246 // 2) The transformation from screen to graph coordinates below will crash
247 if (context().mainWindow().transformation().transformIsDefined()) {
248
249 double *x = nullptr, *y = nullptr;
250
251 if (pointIdentifiers.count() == 1) {
252
253 // There is exactly one point so pass its coordinates to the dialog
254 x = new double;
255 y = new double;
256
257 QPointF posScreenBefore = cmdMediator->document().positionScreen (pointIdentifiers.first());
258 QPointF posGraphBefore;
260 posGraphBefore);
261
262 // Ask user for coordinates
263 *x = posGraphBefore.x();
264 *y = posGraphBefore.y();
265 }
266
267 DlgEditPointGraph *dlg = new DlgEditPointGraph (context().mainWindow(),
268 cmdMediator->document().modelCoords(),
269 cmdMediator->document().modelGeneral(),
270 context().mainWindow().modelMainWindow(),
271 context().mainWindow().transformation(),
272 x,
273 y);
274 delete x;
275 delete y;
276
277 x = nullptr;
278 y = nullptr;
279
280 int rtn = dlg->exec ();
281
282 bool isXGiven, isYGiven;
283 double xGiven, yGiven;
284 dlg->posGraph (isXGiven, xGiven, isYGiven, yGiven); // One or both coordinates are returned
285 delete dlg;
286
287 if (rtn == QDialog::Accepted) {
288
289 // Create a command to edit the point
290 CmdEditPointGraph *cmd = new CmdEditPointGraph (context().mainWindow(),
291 cmdMediator->document(),
292 pointIdentifiers,
293 isXGiven,
294 isYGiven,
295 xGiven,
296 yGiven);
297 context().appendNewCmd(cmdMediator,
298 cmd);
299 }
300 }
301}
302
304{
305 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::handleCurveChange";
306}
307
309 Qt::Key key,
310 bool atLeastOneSelectedItem)
311{
312 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::handleKeyPress"
313 << " key=" << QKeySequence (key).toString ().toLatin1 ().data ();
314
315 if (atLeastOneSelectedItem) {
316
317 if (key == Qt::Key_Down ||
318 key == Qt::Key_Up ||
319 key == Qt::Key_Left ||
320 key == Qt::Key_Right) {
321
322 keyPressArrow (cmdMediator,
323 key);
324
325 }
326 }
327}
328
330 QPointF /* posScreen */)
331{
332// LOG4CPP_DEBUG_S ((*mainCat)) << "DigitizeStateSelect::handleMouseMove";
333}
334
336 QPointF posScreen)
337{
338 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::handleMousePress"
339 << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ();
340
341 // Note that GraphicsView has already called GraphicsPointAbstract::resetPositionHasChanged on all items
342
343 m_movingStart = posScreen;
344}
345
347 QPointF posScreen)
348{
349 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::handleMouseRelease"
350 << " posScreen=" << QPointFToString (posScreen).toLatin1 ().data ();
351
352 QPointF deltaScreen = posScreen - m_movingStart;
353 QStringList positionHasChangedIdentifers = context().mainWindow().scene().positionHasChangedPointIdentifiers();
354
355 bool positionHasChanged = (positionHasChangedIdentifers.count () > 0);
356
357 if (positionHasChanged && (
358 qAbs (deltaScreen.x ()) > 0 ||
359 qAbs (deltaScreen.y ()) > 0)) {
360
361 QString moveText = moveTextFromDeltaScreen (deltaScreen);
362
363 // Create command to move points
364 CmdMoveBy *cmd = new CmdMoveBy (context().mainWindow(),
365 cmdMediator->document(),
366 deltaScreen,
367 moveText,
368 positionHasChangedIdentifers);
369 context().appendNewCmd (cmdMediator,
370 cmd);
371
372 } else {
373
374 // Selection probably changed so update the MainWindow controls (especially Cut)
376
377 showCoordinatesIfSinglePointIsSelected ();
378 }
379}
380
381void DigitizeStateSelect::keyPressArrow (CmdMediator *cmdMediator,
382 Qt::Key key)
383{
384 QPointF deltaScreen;
385 QString moveText;
386 switch (key) {
387 case Qt::Key_Down:
388 deltaScreen = QPointF (0, zoomedToUnzoomedScreenY ());
389 moveText = MOVE_TEXT_DOWN;
390 break;
391
392 case Qt::Key_Left:
393 deltaScreen = QPointF (-1 * zoomedToUnzoomedScreenX (), 0);
394 moveText = MOVE_TEXT_LEFT;
395 break;
396
397 case Qt::Key_Right:
398 deltaScreen = QPointF (zoomedToUnzoomedScreenX (), 0);
399 moveText = MOVE_TEXT_RIGHT;
400 break;
401
402 case Qt::Key_Up:
403 deltaScreen = QPointF (0, -1 * zoomedToUnzoomedScreenY ());
404 moveText = MOVE_TEXT_UP;
405 break;
406
407 default:
408 ENGAUGE_ASSERT (false);
409 }
410
411 // Create command to move points
412 GraphicsItemsExtractor graphicsItemsExtractor;
413 const QList<QGraphicsItem*> &items = context().mainWindow().scene ().selectedItems();
414 CmdMoveBy *cmd = new CmdMoveBy (context().mainWindow(),
415 cmdMediator->document(),
416 deltaScreen,
417 moveText,
418 graphicsItemsExtractor.selectedPointIdentifiers (items));
419 context().appendNewCmd (cmdMediator,
420 cmd);
421}
422
423QString DigitizeStateSelect::moveTextFromDeltaScreen (const QPointF &deltaScreen)
424{
425 QString moveText;
426
427 // x UP x -----> +x
428 // x x |
429 // LEFT x RIGHT |
430 // x x v
431 // x DOWN x +y
432 bool downOrRight = (deltaScreen.y () > -1.0 * deltaScreen.x ());
433 bool upOrRight = (deltaScreen.y () < deltaScreen.x ());
434 if (downOrRight && upOrRight) {
435 moveText = MOVE_TEXT_RIGHT;
436 } else if (downOrRight && !upOrRight) {
437 moveText = MOVE_TEXT_DOWN;
438 } else if (!downOrRight && upOrRight) {
439 moveText = MOVE_TEXT_UP;
440 } else {
441 moveText = MOVE_TEXT_LEFT;
442 }
443
444 return moveText;
445}
446
447void DigitizeStateSelect::removeHoverHighlighting()
448{
449 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::removeHoverHighlighting";
450
451 QList<QGraphicsItem*> items = context().mainWindow().scene().items();
452 QList<QGraphicsItem*>::iterator itr;
453 for (itr = items.begin (); itr != items.end (); itr++) {
454
455 QGraphicsItem *item = *itr;
457 item->setAcceptHoverEvents(false);
458 }
459 }
460}
461
462double DigitizeStateSelect::scaleBarLength (CmdMediator *cmdMediator) const
463{
464 CallbackScaleBar ftor;
465
466 Functor2wRet<const QString &, const Point&, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
468 cmdMediator->iterateThroughCurvePointsAxes (ftorWithCallback);
469
470 return ftor.scaleBarLength ();
471}
472
473QString DigitizeStateSelect::scaleBarPointIdentifier (CmdMediator *cmdMediator) const
474{
475 CallbackScaleBar ftor;
476
477 Functor2wRet<const QString &, const Point&, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
479 cmdMediator->iterateThroughCurvePointsAxes (ftorWithCallback);
480
481 return ftor.scaleBarPointIdentifier();
482}
483
484void DigitizeStateSelect::setHoverHighlighting(const MainWindowModel &modelMainWindow)
485{
486 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::addHoverHighlighting";
487
488 // Set the opacity for all points. It should be already set for pre-existing points
489 QList<QGraphicsItem*> items = context().mainWindow().scene().items();
490 QList<QGraphicsItem*>::iterator itr;
491 for (itr = items.begin (); itr != items.end (); itr++) {
492
493 QGraphicsItem *item = *itr;
495 item->setOpacity (modelMainWindow.highlightOpacity());
496 }
497 }
498}
499
500void DigitizeStateSelect::showCoordinatesIfSinglePointIsSelected ()
501{
502 // See if there is a single point selected
503 QList<QGraphicsItem*> items = context().mainWindow().scene().selectedItems();
504 if (items.size () == 1) {
505
506 // There is a single item selected but we must see if it is a point
507 QGraphicsItem *item = * (items.begin ());
508
510
511 // Show the coordinates of the point in the status bar
512 QString coordsScreen, coordsGraph, resolutionGraph;
514 coordsScreen,
515 coordsGraph,
516 resolutionGraph,
517 context().mainWindow().modeMap());
518
519 context().mainWindow().showTemporaryMessage(coordsGraph);
520 }
521 }
522}
523
525{
526 return "DigitizeStateSelect";
527}
528
530{
531 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::updateAfterPointAddition";
532
533 addHoverHighlighting ();
534}
535
537 const DocumentModelDigitizeCurve & /*modelDigitizeCurve */)
538{
539 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::updateModelDigitizeCurve";
540}
541
543{
544 LOG4CPP_INFO_S ((*mainCat)) << "DigitizeStateSelect::updateModelSegments";
545}
546
547double DigitizeStateSelect::zoomedToUnzoomedScreenX () const
548{
549 double m11 = context().mainWindow ().view ().transform().m11 ();
550 return 1.0 / m11;
551}
552
553double DigitizeStateSelect::zoomedToUnzoomedScreenY () const
554{
555 double m22 = context().mainWindow ().view ().transform().m22 ();
556 return 1.0 / m22;
557}
@ DATA_KEY_GRAPHICS_ITEM_TYPE
‍Unique identifier for QGraphicsItem object
Definition DataKey.h:15
DigitizeState
Set of possible states of Digitize toolbar.
const QString MOVE_TEXT_UP(QObject::tr("Move up"))
const QString MOVE_TEXT_DOWN(QObject::tr("Move down"))
const QString MOVE_TEXT_LEFT(QObject::tr("Move left"))
const QString MOVE_TEXT_RIGHT(QObject::tr("Move right"))
@ DOCUMENT_AXES_POINTS_REQUIRED_2
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
@ GRAPHICS_ITEM_TYPE_POINT
log4cpp::Category * mainCat
Definition Logger.cpp:14
QString QPointFToString(const QPointF &pos)
QString engaugeWindowTitle()
Text for title bars of dialogs.
Definition Version.cpp:14
Callback for identifying, for the scale bar of a map, various quantities.
QString scaleBarPointIdentifier() const
Identified axis point.
double scaleBarLength() const
Length of scale bar.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Command for editing the graph coordinates one axis point.
Command for editing the graph coordinates of one or more graph points.
Command queue stack.
Definition CmdMediator.h:24
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the single axes curve.
Document & document()
Provide the Document to commands, primarily for undo/redo processing.
Command for moving all selected Points by a specified translation.
Definition CmdMoveBy.h:19
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses,...
void setCursor(CmdMediator *cmdMediator)
Update the cursor according to the current state.
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
void setDragMode(QGraphicsView::DragMode dragMode)
Set QGraphicsView drag mode (in m_view). Called from DigitizeStateAbstractBase subclasses.
void appendNewCmd(CmdMediator *cmdMediator, QUndoCommand *cmd)
Append just-created QUndoCommand to command stack. This is called from DigitizeStateAbstractBase subc...
MainWindow & mainWindow()
Reference to the MainWindow, without const.
virtual void begin(CmdMediator *cmdMediator, DigitizeState previousState)
Method that is called at the exact moment a state is entered.
virtual QCursor cursor(CmdMediator *cmdMediator) const
Returns the state-specific cursor shape.
virtual bool canPaste(const Transformation &transformation, const QSize &viewSize) const
Return true if there is good data in the clipboard for pasting, and that is compatible with the curre...
virtual void updateAfterPointAddition()
Update graphics attributes after possible new points. This is useful for highlight opacity.
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
virtual QString activeCurve() const
Name of the active Curve. This can include AXIS_CURVE_NAME.
virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
Handle a right click, on a graph point, that was intercepted earlier.
virtual void handleMouseRelease(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse release that was intercepted earlier.
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
Handle a key press that was intercepted earlier.
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)
Handle a right click, on an axis point, that was intercepted earlier.
virtual void handleMousePress(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse press that was intercepted earlier.
virtual void handleMouseMove(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse move. This is part of an experiment to see if augmenting the cursor in Point Match mod...
virtual void handleCurveChange(CmdMediator *cmdMediator)
Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Se...
DigitizeStateSelect(DigitizeStateContext &context)
Single constructor.
virtual QString state() const
State name for debugging.
Dialog box for editing the information of one axis point, in a graph with two axes.
QPointF posGraph(bool &isXOnly) const
Return the graph coordinates position specified by the user. Only applies if dialog was accepted.
Dialog box for editing the information of one or more points.
void posGraph(bool &isX, double &x, bool &isY, double &y) const
Return one or both coordinates. Only applies if dialog was accepted.
Dialog box for editing the information of the map scale.
double scaleLength() const
Return the scale bar length specified by the user. Only applies if dialog was accepted.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
Model for DlgSettingsSegments and CmdSettingsSegments.
QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
Definition Document.cpp:827
DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
Definition Document.cpp:723
QPointF positionGraph(const QString &pointIdentifier) const
See Curve::positionGraph.
Definition Document.cpp:822
bool isXOnly(const QString &pointIdentifier) const
See Curve::isXOnly.
Definition Document.cpp:444
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
Definition Document.cpp:695
void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage)
Check before calling editPointAxis.
Definition Document.cpp:284
DocumentAxesPointsRequired documentAxesPointsRequired() const
Get method for DocumentAxesPointsRequired.
Definition Document.cpp:363
This class consolidates utility routines that deal with graphics items that are getting extracted fro...
QStringList selectedPointIdentifiers(const QList< QGraphicsItem * > &items) const
Return list of selected point identifiers.
QStringList positionHasChangedPointIdentifiers() const
Return a list of identifiers for the points that have moved since the last call to resetPositionHasCh...
Model for DlgSettingsMainWindow.
double highlightOpacity() const
Get method for highlight opacity.
void showTemporaryMessage(const QString &temporaryMessage)
Show temporary message in status bar.
CmdMediator * cmdMediator()
Accessor for commands to process the Document.
void updateViewsOfSettings(const QString &activeCurve)
Update curve-specific view of settings. Private version gets active curve name from DigitizeStateCont...
QString selectedGraphCurve() const
Curve name that is currently selected in m_cmbCurve.
GraphicsScene & scene()
Scene container for the QImage and QGraphicsItems.
void updateAfterMouseRelease()
Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/relea...
Transformation transformation() const
Return read-only copy of transformation.
GraphicsView & view()
View for the QImage and QGraphicsItems, without const.
Affine transformation between screen and graph coordinates, based on digitized axis points.
void coordTextForStatusBar(QPointF cursorScreen, QString &coordsScreen, QString &coordsGraph, QString &resolutionGraph, bool usingScaleBar)
Return string descriptions of cursor coordinates for status bar.
void transformScreenToRawGraph(const QPointF &coordScreen, QPointF &coordGraph) const
Transform from cartesian pixel screen coordinates to cartesian/polar graph coordinates.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18
#define LOG4CPP_DEBUG_S(logger)
Definition convenience.h:20