libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
baseplotcontext.cpp
Go to the documentation of this file.
1
// Copyright 2021 Filippo Rusconi
2
// GPL3+
3
4
#include "
baseplotcontext.h
"
5
#include "
pappsomspp/core/processing/combiners/integrationscope.h
"
6
#include "
pappsomspp/core/processing/combiners/integrationscoperect.h
"
7
#include "
pappsomspp/core/processing/combiners/integrationscoperhomb.h
"
8
9
namespace
pappso
10
{
11
12
std::map<Qt::MouseButton, QString>
qtMouseButtonMap
{
13
{Qt::NoButton,
"NoButton"
},
14
{Qt::LeftButton,
"LeftButton"
},
15
{Qt::RightButton,
"RightButton"
},
16
{Qt::MiddleButton,
"MiddleButton"
}};
17
18
std::map<Qt::MouseButtons, QString>
qtMouseButtonsMap
{
19
{Qt::NoButton,
"NoButton"
},
20
{Qt::AllButtons,
"AllButtons"
},
21
{Qt::LeftButton,
"LeftButton"
},
22
{Qt::RightButton,
"RightButton"
},
23
{Qt::MiddleButton,
"MiddleButton"
},
24
{Qt::LeftButton | Qt::RightButton,
"LeftRightButtons"
},
25
{Qt::LeftButton | Qt::MiddleButton,
"LeftMiddleButtons"
},
26
{Qt::RightButton | Qt::MiddleButton,
"RightMiddleButtons"
},
27
};
28
29
std::map<Qt::KeyboardModifier, QString>
qtKeyboardModifierMap
{
30
{Qt::NoModifier,
"No modifier"
},
31
{Qt::ShiftModifier,
"A Shift key"
},
32
{Qt::ControlModifier,
"A Ctrl key"
},
33
{Qt::AltModifier,
"An Alt key"
},
34
{Qt::MetaModifier,
"A Meta key"
},
35
{Qt::KeypadModifier,
"A keypad button"
},
36
{Qt::GroupSwitchModifier,
"A Mode_switch key"
}};
37
38
BasePlotContext::BasePlotContext
()
39
{
40
}
41
42
BasePlotContext::BasePlotContext
(
const
BasePlotContext
&other)
43
{
44
// qDebug() << "Constructing BasePlotContext by copy.";
45
initialize
(other);
46
#if 0
47
m_dataKind
= other.
m_dataKind
;
48
49
m_isMouseDragging
= other.
m_isMouseDragging
;
50
m_wasMouseDragging
= other.
m_wasMouseDragging
;
51
m_dragDirections
= other.
m_dragDirections
;
52
53
m_isKeyBoardDragging
= other.
m_isKeyBoardDragging
;
54
m_isLeftPseudoButtonKeyPressed
= other.
m_isLeftPseudoButtonKeyPressed
;
55
m_isRightPseudoButtonKeyPressed
= other.
m_isRightPseudoButtonKeyPressed
;
56
m_wasKeyBoardDragging
= other.
m_wasKeyBoardDragging
;
57
58
m_startDragPoint
= other.
m_startDragPoint
;
59
m_currentDragPoint
= other.
m_currentDragPoint
;
60
m_lastCursorHoveredPoint
= other.
m_lastCursorHoveredPoint
;
61
62
m_selectionPolygon
= other.
m_selectionPolygon
;
63
64
if
(
mpa_integrationScope
!=
nullptr
)
65
delete
mpa_integrationScope
;
66
if
(other.
mpa_integrationScope
!=
nullptr
)
67
mpa_integrationScope
= other.
mpa_integrationScope
->
clone
();
68
69
m_integrationScopeRhombWidth
= other.
m_integrationScopeRhombWidth
;
70
m_integrationScopeRhombHeight
= other.
m_integrationScopeRhombHeight
;
71
72
// The effective range of the axes.
73
m_xRange
= other.
m_xRange
;
74
m_yRange
= other.
m_yRange
;
75
76
// Tell if the mouse move was started onto either axis, because that will
77
// condition if some calculations needs to be performed or not (for example,
78
// if the mouse cursor motion was started on an axis, there is no point to
79
// perform deconvolutions).
80
m_wasClickOnXAxis
= other.
m_wasClickOnXAxis
;
81
m_wasClickOnYAxis
= other.
m_wasClickOnYAxis
;
82
83
m_isMeasuringDistance
= other.
m_isMeasuringDistance
;
84
85
// The user-selected region over the plot.
86
// Note that we cannot use QCPRange structures because these are normalized by
87
// QCustomPlot in such a manner that lower is actually < upper. But we need
88
// for a number of our calculations (specifically for the deconvolutions) to
89
// actually have the lower value be start drag point.x even if the drag
90
// direction was from right to left.
91
m_xRegionRangeStart
= other.
m_xRegionRangeStart
;
92
m_xRegionRangeStop
= other.
m_xRegionRangeStop
;
93
94
m_yRegionRangeStart
= other.
m_yRegionRangeStart
;
95
m_yRegionRangeStop
= other.
m_yRegionRangeStop
;
96
97
m_xDelta
= other.
m_xDelta
;
98
m_yDelta
= other.
m_yDelta
;
99
100
m_pressedKeyCode
= other.
m_pressedKeyCode
;
101
m_pressedKeyCodes
= other.
m_pressedKeyCodes
;
102
m_pressedKeyText
= other.
m_pressedKeyText
;
103
m_releasedKeyCode
= other.
m_releasedKeyCode
;
104
m_releasedKeyCodes
= other.
m_releasedKeyCodes
;
105
m_releasedKeyText
= other.
m_releasedKeyText
;
106
107
m_keyboardModifiers
= other.
m_keyboardModifiers
;
108
109
m_lastPressedMouseButton
= other.
m_lastPressedMouseButton
;
110
m_lastReleasedMouseButton
= other.
m_lastReleasedMouseButton
;
111
112
m_pressedMouseButtons
= other.
m_pressedMouseButtons
;
113
114
m_mouseButtonsAtMousePress
= other.
m_mouseButtonsAtMousePress
;
115
m_mouseButtonsAtMouseRelease
= other.
m_mouseButtonsAtMouseRelease
;
116
#endif
117
}
118
119
BasePlotContext::~BasePlotContext
()
120
{
121
if
(
mpa_integrationScope
!=
nullptr
)
122
delete
mpa_integrationScope
;
123
}
124
125
BasePlotContext
*
126
BasePlotContext::clone
()
127
{
128
return
new
BasePlotContext
(*
this
);
129
}
130
131
void
132
BasePlotContext::initialize
(
const
BasePlotContext
&other)
133
{
134
m_dataKind
= other.
m_dataKind
;
135
136
m_isMouseDragging
= other.
m_isMouseDragging
;
137
m_wasMouseDragging
= other.
m_wasMouseDragging
;
138
m_dragDirections
= other.
m_dragDirections
;
139
140
m_isKeyBoardDragging
= other.
m_isKeyBoardDragging
;
141
m_isLeftPseudoButtonKeyPressed
= other.
m_isLeftPseudoButtonKeyPressed
;
142
m_isRightPseudoButtonKeyPressed
= other.
m_isRightPseudoButtonKeyPressed
;
143
m_wasKeyBoardDragging
= other.
m_wasKeyBoardDragging
;
144
145
m_startDragPoint
= other.
m_startDragPoint
;
146
m_currentDragPoint
= other.
m_currentDragPoint
;
147
m_lastCursorHoveredPoint
= other.
m_lastCursorHoveredPoint
;
148
149
m_selectionPolygon
= other.
m_selectionPolygon
;
150
151
if
(
mpa_integrationScope
!=
nullptr
)
152
delete
mpa_integrationScope
;
153
if
(other.
mpa_integrationScope
!=
nullptr
)
154
mpa_integrationScope
= other.
mpa_integrationScope
->
clone
();
155
156
m_integrationScopeRhombWidth
= other.
m_integrationScopeRhombWidth
;
157
m_integrationScopeRhombHeight
= other.
m_integrationScopeRhombHeight
;
158
159
// The effective range of the axes.
160
m_xRange
= other.
m_xRange
;
161
m_yRange
= other.
m_yRange
;
162
163
// Tell if the mouse move was started onto either axis, because that will
164
// condition if some calculations needs to be performed or not (for example,
165
// if the mouse cursor motion was started on an axis, there is no point to
166
// perform deconvolutions).
167
m_wasClickOnXAxis
= other.
m_wasClickOnXAxis
;
168
m_wasClickOnYAxis
= other.
m_wasClickOnYAxis
;
169
170
m_isMeasuringDistance
= other.
m_isMeasuringDistance
;
171
172
// The user-selected region over the plot.
173
// Note that we cannot use QCPRange structures because these are normalized by
174
// QCustomPlot in such a manner that lower is actually < upper. But we need
175
// for a number of our calculations (specifically for the deconvolutions) to
176
// actually have the lower value be start drag point.x even if the drag
177
// direction was from right to left.
178
m_xRegionRangeStart
= other.
m_xRegionRangeStart
;
179
m_xRegionRangeStop
= other.
m_xRegionRangeStop
;
180
181
m_yRegionRangeStart
= other.
m_yRegionRangeStart
;
182
m_yRegionRangeStop
= other.
m_yRegionRangeStop
;
183
184
m_xDelta
= other.
m_xDelta
;
185
m_yDelta
= other.
m_yDelta
;
186
187
m_pressedKeyCode
= other.
m_pressedKeyCode
;
188
m_pressedKeyCodes
= other.
m_pressedKeyCodes
;
189
m_pressedKeyText
= other.
m_pressedKeyText
;
190
m_releasedKeyCode
= other.
m_releasedKeyCode
;
191
m_releasedKeyCodes
= other.
m_releasedKeyCodes
;
192
m_releasedKeyText
= other.
m_releasedKeyText
;
193
194
m_keyboardModifiers
= other.
m_keyboardModifiers
;
195
196
m_lastPressedMouseButton
= other.
m_lastPressedMouseButton
;
197
m_lastReleasedMouseButton
= other.
m_lastReleasedMouseButton
;
198
199
m_pressedMouseButtons
= other.
m_pressedMouseButtons
;
200
201
m_mouseButtonsAtMousePress
= other.
m_mouseButtonsAtMousePress
;
202
m_mouseButtonsAtMouseRelease
= other.
m_mouseButtonsAtMouseRelease
;
203
}
204
205
void
206
BasePlotContext::updateIntegrationScope
()
207
{
208
// qDebug();
209
210
// By essence, IntegrationScope is 1D scope. The point of the scope is the
211
// left bottom point, and then we document the width.
212
213
double
x_range_start = std::min(
m_currentDragPoint
.x(),
m_startDragPoint
.x());
214
double
x_range_end = std::max(
m_currentDragPoint
.x(),
m_startDragPoint
.x());
215
216
double
y_position =
m_startDragPoint
.y();
217
218
QPointF point(x_range_start, y_position);
219
double
width = x_range_end - x_range_start;
220
221
// qDebug() << "Going to create an integration scope with point:" << point
222
// << "and width:" << width;
223
224
// Because the nature of the integration scope might change inside
225
// a given context, we need to delete and reallocate.
226
if
(
mpa_integrationScope
!=
nullptr
)
227
delete
mpa_integrationScope
;
228
229
mpa_integrationScope
=
new
IntegrationScope
(point, width);
230
231
// qDebug() << "Created integration scope:" <<
232
// msp_integrationScope->toString();
233
}
234
235
void
236
BasePlotContext::updateIntegrationScopeRect
()
237
{
238
// qDebug();
239
240
// By essence, IntegrationScopeRect is a squared rectangle scope. The point of
241
// the scope is the left bottom point, and then we document the width and the
242
// height.
243
244
/* Like this:
245
*
246
+---------------------------+ -
247
| | |
248
| | |
249
| | m_height
250
| | |
251
| | |
252
P---------------------------+ -
253
254
|--------- m_width ---------|
255
256
*/
257
258
// We need to find the point that is actually the left bottom point.
259
260
QPointF point;
261
double
width = 0;
262
double
height = 0;
263
264
if
(
static_cast<
int
>
(
m_dragDirections
) &
265
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
) &&
266
static_cast<
int
>
(
m_dragDirections
) &
267
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
268
{
269
point.rx() =
m_startDragPoint
.x();
270
point.ry() =
m_startDragPoint
.y();
271
width =
m_currentDragPoint
.x() - point.rx();
272
height =
m_currentDragPoint
.y() - point.ry();
273
// qDebug() << "left to right - bottom to top";
274
}
275
276
if
(
static_cast<
int
>
(
m_dragDirections
) &
277
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
) &&
278
static_cast<
int
>
(
m_dragDirections
) &
279
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
280
{
281
point.rx() =
m_currentDragPoint
.x();
282
point.ry() =
m_currentDragPoint
.y();
283
width =
m_startDragPoint
.x() -
m_currentDragPoint
.x();
284
height =
m_startDragPoint
.y() -
m_currentDragPoint
.y();
285
// qDebug() << "right to left - bottom to top";
286
}
287
288
if
(
static_cast<
int
>
(
m_dragDirections
) &
289
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
) &&
290
static_cast<
int
>
(
m_dragDirections
) &
291
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
292
{
293
point.rx() =
m_startDragPoint
.x();
294
point.ry() =
m_currentDragPoint
.y();
295
width =
m_currentDragPoint
.x() -
m_startDragPoint
.x();
296
height =
m_startDragPoint
.y() -
m_currentDragPoint
.y();
297
// qDebug() << "left to right - top to bottom";
298
}
299
300
if
(
static_cast<
int
>
(
m_dragDirections
) &
301
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
) &&
302
static_cast<
int
>
(
m_dragDirections
) &
303
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
304
{
305
point.rx() =
m_currentDragPoint
.x();
306
point.ry() =
m_currentDragPoint
.y();
307
width =
m_startDragPoint
.x() -
m_currentDragPoint
.x();
308
height =
m_startDragPoint
.y() -
m_currentDragPoint
.y();
309
// qDebug() << "right to left - top to bottom";
310
}
311
312
// qDebug() << "The data used to update the integration scope:";
313
// qDebug() << "Point:" << point << "width:" << width << "height:" << height;
314
//
315
// qDebug() << "The integration scope before update:" << mpa_integrationScope;
316
//
317
// qDebug() << "Will update IntegrationScopeRect with:" << point << "width"
318
// << width << "height" << height;
319
320
// Because the nature of the integration scope might change inside
321
// a given context, we need to delete and reallocate.
322
if
(
mpa_integrationScope
!=
nullptr
)
323
delete
mpa_integrationScope
;
324
mpa_integrationScope
=
new
IntegrationScopeRect
(point, width, height);
325
326
// if(typeid(*mpa_integrationScope) == typeid(IntegrationScopeInterface))
327
// qDebug() << "The pointer is of type IntegrationScopeInterface";
328
// if(typeid(*mpa_integrationScope) == typeid(IntegrationScope))
329
// qDebug() << "The pointer is of type IntegrationScope";
330
// if(typeid(*mpa_integrationScope) == typeid(IntegrationScopeRect))
331
// qDebug() << "The pointer is of type IntegrationScopeRect";
332
// if(typeid(*mpa_integrationScope) == typeid(IntegrationScopeRhomb))
333
// qDebug() << "The pointer is of type IntegrationScopeRhomb";
334
//
335
// qDebug() << "The integration scope right after update:"
336
// << mpa_integrationScope;
337
//
338
// if(!mpa_integrationScope->getPoint(point))
339
// qFatal("Could not get point.");
340
// qDebug() << "The point:" << point;
341
// if(!mpa_integrationScope->getWidth(width))
342
// qFatal("Oh no!!!! width");
343
// if(!mpa_integrationScope->getWidth(height))
344
// qFatal("Oh no!!!! height");
345
}
346
347
void
348
BasePlotContext::updateIntegrationScopeRhombHorizontal
()
349
{
350
// qDebug() << toString();
351
352
/*
353
4+----------+3
354
| |
355
| |
356
| |
357
| |
358
| |
359
| |
360
| |
361
1+----------+2
362
----width---
363
*/
364
365
// As visible here, the fixed size of the rhomboid (using the S key in the
366
// plot widget) is the horizontal side.
367
368
// The points are numbered in a counterclockwise manner, starting from the
369
// starting drag point. The width side is right of the start drag point if
370
// the user drags from left to right and left of the start drag point if
371
// the user drags from left to right. In the figure above, the user
372
// has dragged the mouse from point 1 and to the right and upwards.
373
// Thus the width side is right of point 1. Because the numbering
374
// is counterclockwise, that point happens to be numbered 2.
375
376
// If the user had draggged the mouse starting at point 3 and to the left
377
// and to the bottom, then point 3 above would be point 1, point 4
378
// would be point 2 because the width side is left of the start
379
// drag point; point 1 would be point 3 and finally the last point
380
// would be at point 2.
381
382
// Sanity check
383
if
(
m_integrationScopeRhombWidth
== 0)
384
qFatal(
385
"The m_integrationScopeRhombWidth of the fixed rhomboid side cannot be "
386
"0."
);
387
388
QPointF point;
389
std::vector<QPointF> points;
390
391
// Fill-in the points in the vector in the order they are created
392
// while drawing the rhomboid shape. Thus, the first point (start of the
393
// mouse click & drag operation is always the same.
394
395
point.rx() =
m_startDragPoint
.x();
396
point.ry() =
m_startDragPoint
.y();
397
points.push_back(point);
398
// qDebug() << "Start point:" << point;
399
400
if
(
static_cast<
int
>
(
m_dragDirections
) &
401
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
) &&
402
static_cast<
int
>
(
m_dragDirections
) &
403
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
404
{
405
// Second point.
406
point.rx() =
m_startDragPoint
.x() +
m_integrationScopeRhombWidth
;
407
point.ry() =
m_startDragPoint
.y();
408
points.push_back(point);
409
// qDebug() << "Second point:" << point;
410
411
// Third point.
412
point.rx() =
m_currentDragPoint
.rx() +
m_integrationScopeRhombWidth
;
413
point.ry() =
m_currentDragPoint
.ry();
414
points.push_back(point);
415
// qDebug() << "Third point:" << point;
416
417
// Fourth point.
418
point.rx() =
m_currentDragPoint
.rx();
419
point.ry() =
m_currentDragPoint
.ry();
420
points.push_back(point);
421
// qDebug() << "Last point:" << point;
422
}
423
424
if
(
static_cast<
int
>
(
m_dragDirections
) &
425
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
) &&
426
static_cast<
int
>
(
m_dragDirections
) &
427
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
428
{
429
// Second point.
430
point.rx() =
m_currentDragPoint
.rx();
431
point.ry() =
m_currentDragPoint
.ry();
432
points.push_back(point);
433
// qDebug() << "Second point:" << point;
434
435
// Third point.
436
point.rx() =
m_currentDragPoint
.rx() -
m_integrationScopeRhombWidth
;
437
point.ry() =
m_currentDragPoint
.ry();
438
points.push_back(point);
439
// qDebug() << "Third point:" << point;
440
441
// Fourth point.
442
point.rx() =
m_startDragPoint
.rx() -
m_integrationScopeRhombWidth
;
443
point.ry() =
m_startDragPoint
.ry();
444
points.push_back(point);
445
// qDebug() << "Last point:" << point;
446
}
447
448
if
(
static_cast<
int
>
(
m_dragDirections
) &
449
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
) &&
450
static_cast<
int
>
(
m_dragDirections
) &
451
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
452
{
453
// Second point.
454
point.rx() =
m_currentDragPoint
.rx();
455
point.ry() =
m_currentDragPoint
.ry();
456
points.push_back(point);
457
// qDebug() << "Second point:" << point;
458
459
// Third point.
460
point.rx() =
m_currentDragPoint
.rx() +
m_integrationScopeRhombWidth
;
461
point.ry() =
m_currentDragPoint
.ry();
462
points.push_back(point);
463
// qDebug() << "Third point:" << point;
464
465
// Fourth point.
466
point.rx() =
m_startDragPoint
.x() +
m_integrationScopeRhombWidth
;
467
point.ry() =
m_startDragPoint
.y();
468
points.push_back(point);
469
// qDebug() << "Last point:" << point;
470
}
471
472
if
(
static_cast<
int
>
(
m_dragDirections
) &
473
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
) &&
474
static_cast<
int
>
(
m_dragDirections
) &
475
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
476
{
477
// Second point.
478
point.rx() =
m_startDragPoint
.x() -
m_integrationScopeRhombWidth
;
479
point.ry() =
m_startDragPoint
.y();
480
points.push_back(point);
481
// qDebug() << "Second point:" << point;
482
483
// Third point.
484
point.rx() =
m_currentDragPoint
.rx() -
m_integrationScopeRhombWidth
;
485
point.ry() =
m_currentDragPoint
.ry();
486
points.push_back(point);
487
// qDebug() << "Third point:" << point;
488
489
// Fourth point.
490
point.rx() =
m_currentDragPoint
.rx();
491
point.ry() =
m_currentDragPoint
.ry();
492
points.push_back(point);
493
// qDebug() << "Last point:" << point;
494
}
495
496
// Because the nature of the integration scope might change inside
497
// a given context, we need to delete and reallocate.
498
if
(
mpa_integrationScope
!=
nullptr
)
499
delete
mpa_integrationScope
;
500
501
mpa_integrationScope
=
new
IntegrationScopeRhomb
(points);
502
503
// qDebug() << "Created an integration scope horizontal rhomboid with"
504
// << points.size() << "points:" << msp_integrationScope->toString();
505
}
506
507
void
508
BasePlotContext::updateIntegrationScopeRhombVertical
()
509
{
510
// qDebug() << toString();
511
512
/*
513
* +3
514
* . |
515
* . |
516
* . |
517
* . +2
518
* . .
519
* . .
520
* . .
521
* 4+ .
522
* | | .
523
* height | | .
524
* | | .
525
* 1+
526
*
527
*/
528
529
// As visible here, the fixed size of the rhomboid (using the S key in the
530
// plot widget) is the vertical side.
531
532
// The points are numbered in a counterclockwise manner, starting from the
533
// starting drag point. The height side is below the start drag point if
534
// the user drags from top to bottom and above the start drag point if
535
// the user drags from bottom to top. In the figure above, the user
536
// has dragged the mouse from point 1 and to the right and upwards.
537
// Thus the height side is above the point 1. Because the numbering
538
// is counterclockwise, that point happens to be numbered 4.
539
540
// If the user had draggged the mouse starting at point 3 and to the left
541
// and to the bottom, then point 3 above would be point 1, point 4
542
// would be ponit 2, point 1 would be point 3 and finally, because
543
// the dragging is from top to bottom, the last point would be at point 2
544
// above, because the height side of the rhomboid is below the start
545
// drag point.
546
547
// Sanity check
548
if
(
m_integrationScopeRhombHeight
== 0)
549
qFatal(
"The height of the fixed rhomboid side cannot be 0."
);
550
551
QPointF point;
552
std::vector<QPointF> points;
553
554
// Fill-in the points in the vector in the order they are created
555
// while drawing the rhomboid shape. Thus, the first point (start of the
556
// mouse click & drag operation is always the same, the leftmost bottom point
557
// of the drawing above (point 1).
558
559
point.rx() =
m_startDragPoint
.x();
560
point.ry() =
m_startDragPoint
.y();
561
points.push_back(point);
562
// qDebug() << "Start point:" << point;
563
564
if
(
static_cast<
int
>
(
m_dragDirections
) &
565
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
) &&
566
static_cast<
int
>
(
m_dragDirections
) &
567
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
568
{
569
// Second point.
570
point.rx() =
m_currentDragPoint
.rx();
571
point.ry() =
m_currentDragPoint
.ry();
572
points.push_back(point);
573
// qDebug() << "Second point:" << point;
574
575
// Third point.
576
point.rx() =
m_currentDragPoint
.rx();
577
point.ry() =
m_currentDragPoint
.ry() +
m_integrationScopeRhombHeight
;
578
points.push_back(point);
579
// qDebug() << "Third point:" << point;
580
581
// Fourth point.
582
point.rx() =
m_startDragPoint
.x();
583
point.ry() =
m_startDragPoint
.y() +
m_integrationScopeRhombHeight
;
584
points.push_back(point);
585
// qDebug() << "Last point:" << point;
586
}
587
588
if
(
static_cast<
int
>
(
m_dragDirections
) &
589
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
) &&
590
static_cast<
int
>
(
m_dragDirections
) &
591
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
592
{
593
// Second point.
594
point.rx() =
m_startDragPoint
.rx();
595
point.ry() =
m_startDragPoint
.ry() +
m_integrationScopeRhombHeight
;
596
points.push_back(point);
597
// qDebug() << "Second point:" << point;
598
599
// Third point.
600
point.rx() =
m_currentDragPoint
.rx();
601
point.ry() =
m_currentDragPoint
.ry() +
m_integrationScopeRhombHeight
;
602
points.push_back(point);
603
// qDebug() << "Third point:" << point;
604
605
// Fourth point.
606
point.rx() =
m_currentDragPoint
.x();
607
point.ry() =
m_currentDragPoint
.y();
608
points.push_back(point);
609
// qDebug() << "Last point:" << point;
610
}
611
612
if
(
static_cast<
int
>
(
m_dragDirections
) &
613
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
) &&
614
static_cast<
int
>
(
m_dragDirections
) &
615
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
616
{
617
// Second point.
618
point.rx() =
m_startDragPoint
.x();
619
point.ry() =
m_startDragPoint
.y() -
m_integrationScopeRhombHeight
;
620
points.push_back(point);
621
// qDebug() << "Second point:" << point;
622
623
// Third point.
624
point.rx() =
m_currentDragPoint
.rx();
625
point.ry() =
m_currentDragPoint
.ry() -
m_integrationScopeRhombHeight
;
626
points.push_back(point);
627
// qDebug() << "Third point:" << point;
628
629
// Fourth point.
630
point.rx() =
m_currentDragPoint
.rx();
631
point.ry() =
m_currentDragPoint
.ry();
632
points.push_back(point);
633
// qDebug() << "Last point:" << point;
634
}
635
636
if
(
static_cast<
int
>
(
m_dragDirections
) &
637
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
) &&
638
static_cast<
int
>
(
m_dragDirections
) &
639
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
640
{
641
// Second point.
642
point.rx() =
m_currentDragPoint
.rx();
643
point.ry() =
m_currentDragPoint
.ry();
644
points.push_back(point);
645
// qDebug() << "Second point:" << point;
646
647
// Third point.
648
point.rx() =
m_currentDragPoint
.rx();
649
point.ry() =
m_currentDragPoint
.ry() -
m_integrationScopeRhombHeight
;
650
points.push_back(point);
651
// qDebug() << "Third point:" << point;
652
653
// Fourth point.
654
point.rx() =
m_startDragPoint
.rx();
655
point.ry() =
m_startDragPoint
.ry() -
m_integrationScopeRhombHeight
;
656
points.push_back(point);
657
// qDebug() << "Last point:" << point;
658
}
659
660
// Because the nature of the integration scope might change inside
661
// a given context, we need to delete and reallocate.
662
if
(
mpa_integrationScope
!=
nullptr
)
663
delete
mpa_integrationScope
;
664
665
mpa_integrationScope
=
new
IntegrationScopeRhomb
(points);
666
667
// qDebug() << "Created an integration scope vertical rhomboid with"
668
// << points.size() << "points:" << msp_integrationScope->toString();
669
}
670
671
void
672
BasePlotContext::updateIntegrationScopeRhomb
()
673
{
674
// qDebug() << toString();
675
676
// By essence, IntegrationScopeRhomb is a rhomboid polygon. Just set the
677
// points. There are two kinds of rhomboid integration scopes: horizontal and
678
// vertical.
679
680
/*
681
+----------+
682
| |
683
| |
684
| |
685
| |
686
| |
687
| |
688
| |
689
+----------+
690
----width---
691
*/
692
693
// As visible here, the fixed size of the rhomboid (using the S key in the
694
// plot widget) is the *horizontal* side (that is, the rhomboid has a non-0
695
// width)..
696
697
// However, it might be useful to be able to draw rhomboid integration scopes
698
// like this, that would correspond to the rhomboid above after a transpose
699
// operation.
700
701
/*
702
+
703
. |
704
. |
705
. |
706
. +
707
. .
708
. .
709
. .
710
+ .
711
| | .
712
height | | .
713
| | .
714
+
715
716
*/
717
718
// As visible here, the fixed size of the rhomboid (using the S key in the
719
// plot widget) is the vertical side (that is, the rhomboid has a non-0
720
// height).
721
722
// The general rule is thus that when the m_integrationScopeRhombWidth is
723
// not-0, then the first shape is considered, while when the
724
// m_integrationScopeRhombHeight is non-0, then the second shape is
725
// considered.
726
727
// This function is called when the user has dragged the cursor (left or right
728
// button, not for or for integration, respectively) with the 'Alt' modifier
729
// key pressed, so that they want to perform a rhomboid integration scope
730
// calculation.
731
732
// Of course, the integration scope in the context might not be a rhomboid
733
// scope, because we might enter this function as a very firt switch from
734
// scope or scopeRect to scopeRhomb. The only indication we have to direct the
735
// creation of a horizontal or vertical rhomboid is the
736
// m_integrationScopeRhombWidth/m_integrationScopeRhombHeight recorded in the
737
// plot widget that owns this plot context.
738
739
// qDebug() << "In updateIntegrationScopeRhomb, m_integrationScopeRhombWidth:"
740
// << m_integrationScopeRhombWidth
741
// << "and m_integrationScopeRhombHeight:"
742
// << m_integrationScopeRhombHeight;
743
744
if
(!
m_integrationScopeRhombWidth
&& !
m_integrationScopeRhombHeight
)
745
qFatal(
746
"Both m_integrationScopeRhombWidth and m_integrationScopeRhombHeight of "
747
"rhomboid integration scope cannot be 0."
);
748
749
if
(
m_integrationScopeRhombWidth
!= 0)
750
return
updateIntegrationScopeRhombHorizontal
();
751
else
if
(
m_integrationScopeRhombHeight
!= 0)
752
return
updateIntegrationScopeRhombVertical
();
753
}
754
755
BasePlotContext
&
756
BasePlotContext::operator=
(
const
BasePlotContext
&other)
757
{
758
if
(
this
== &other)
759
return
*
this
;
760
761
m_dataKind
= other.
m_dataKind
;
762
763
m_isMouseDragging
= other.
m_isMouseDragging
;
764
m_wasMouseDragging
= other.
m_wasMouseDragging
;
765
766
m_isKeyBoardDragging
= other.
m_isKeyBoardDragging
;
767
m_isLeftPseudoButtonKeyPressed
= other.
m_isLeftPseudoButtonKeyPressed
;
768
m_isRightPseudoButtonKeyPressed
= other.
m_isRightPseudoButtonKeyPressed
;
769
m_wasKeyBoardDragging
= other.
m_wasKeyBoardDragging
;
770
771
m_startDragPoint
= other.
m_startDragPoint
;
772
m_currentDragPoint
= other.
m_currentDragPoint
;
773
m_lastCursorHoveredPoint
= other.
m_lastCursorHoveredPoint
;
774
775
m_selectionPolygon
= other.
m_selectionPolygon
;
776
mpa_integrationScope
= other.
mpa_integrationScope
->
clone
();
777
m_integrationScopeRhombWidth
= other.
m_integrationScopeRhombWidth
;
778
m_integrationScopeRhombHeight
= other.
m_integrationScopeRhombHeight
;
779
780
// The effective range of the axes.
781
m_xRange
= other.
m_xRange
;
782
m_yRange
= other.
m_yRange
;
783
784
// Tell if the mouse move was started onto either axis, because that will
785
// condition if some calculations needs to be performed or not (for example,
786
// if the mouse cursor motion was started on an axis, there is no point to
787
// perform deconvolutions).
788
m_wasClickOnXAxis
= other.
m_wasClickOnXAxis
;
789
m_wasClickOnYAxis
= other.
m_wasClickOnYAxis
;
790
791
m_isMeasuringDistance
= other.
m_isMeasuringDistance
;
792
793
// The user-selected region over the plot.
794
// Note that we cannot use QCPRange structures because these are normalized by
795
// QCustomPlot in such a manner that lower is actually < upper. But we need
796
// for a number of our calculations (specifically for the deconvolutions) to
797
// actually have the lower value be start drag point.x even if the drag
798
// direction was from right to left.
799
m_xRegionRangeStart
= other.
m_xRegionRangeStart
;
800
m_xRegionRangeStop
= other.
m_xRegionRangeStop
;
801
802
m_yRegionRangeStart
= other.
m_yRegionRangeStart
;
803
m_yRegionRangeStop
= other.
m_yRegionRangeStop
;
804
805
m_xDelta
= other.
m_xDelta
;
806
m_yDelta
= other.
m_yDelta
;
807
808
m_pressedKeyCode
= other.
m_pressedKeyCode
;
809
m_pressedKeyText
= other.
m_pressedKeyText
;
810
m_releasedKeyCode
= other.
m_releasedKeyCode
;
811
m_releasedKeyText
= other.
m_releasedKeyText
;
812
813
m_keyboardModifiers
= other.
m_keyboardModifiers
;
814
815
m_lastPressedMouseButton
= other.
m_lastPressedMouseButton
;
816
m_lastReleasedMouseButton
= other.
m_lastReleasedMouseButton
;
817
818
m_pressedMouseButtons
= other.
m_pressedMouseButtons
;
819
820
m_mouseButtonsAtMousePress
= other.
m_mouseButtonsAtMousePress
;
821
m_mouseButtonsAtMouseRelease
= other.
m_mouseButtonsAtMouseRelease
;
822
823
return
*
this
;
824
}
825
826
DragDirections
827
BasePlotContext::recordDragDirections
()
828
{
829
int
drag_directions =
static_cast<
int
>
(
DragDirections::NOT_SET
);
830
831
if
(
m_currentDragPoint
.x() >
m_startDragPoint
.x())
832
drag_directions |=
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
);
833
else
834
drag_directions |=
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
);
835
836
if
(
m_currentDragPoint
.y() >
m_startDragPoint
.y())
837
drag_directions |=
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
);
838
else
839
drag_directions |=
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
);
840
841
// qDebug() << "DragDirections:" << drag_directions;
842
843
m_dragDirections
=
static_cast<
DragDirections
>
(drag_directions);
844
845
return
static_cast<
DragDirections
>
(drag_directions);
846
}
847
848
QString
849
BasePlotContext::toString
()
const
850
{
851
QString text(
"Context:"
);
852
853
text += QString(
" data kind: %1"
).arg(
static_cast<
int
>
(
m_dataKind
));
854
855
text += QString(
" -- isMouseDragging: %1 -- wasMouseDragging: %2"
)
856
.arg(
m_isMouseDragging
?
"true"
:
"false"
)
857
.arg(
m_wasMouseDragging
?
"true"
:
"false"
);
858
859
text += QString(
" -- startDragPoint : (%1, %2)"
)
860
.arg(
m_startDragPoint
.x())
861
.arg(
m_startDragPoint
.y());
862
863
text += QString(
" -- currentDragPoint : (%1, %2)"
)
864
.arg(
m_currentDragPoint
.x())
865
.arg(
m_currentDragPoint
.y());
866
867
text += QString(
" -- lastCursorHoveredPoint : (%1, %2)"
)
868
.arg(
m_lastCursorHoveredPoint
.x())
869
.arg(
m_lastCursorHoveredPoint
.y());
870
871
text +=
dragDirectionsToString
();
872
873
if
(
mpa_integrationScope
!=
nullptr
)
874
{
875
// The integration scope
876
text +=
" -- Integration scope: "
;
877
text +=
mpa_integrationScope
->toString();
878
text +=
" -- "
;
879
}
880
881
text += QString(
" -- xRange: (%1, %2)"
).arg(
m_xRange
.lower).arg(
m_xRange
.upper);
882
883
text +=
884
QString(
" -- yRange: (%1, %2)"
).arg(
m_yRange
.lower).arg(
m_yRange
.upper);
885
886
text += QString(
" -- wasClickOnXAxis: %1"
)
887
.arg(
m_wasClickOnXAxis
?
"true"
:
"false"
);
888
text += QString(
" -- wasClickOnYAxis: %1"
)
889
.arg(
m_wasClickOnYAxis
?
"true"
:
"false"
);
890
text += QString(
" -- isMeasuringDistance: %1"
)
891
.arg(
m_isMeasuringDistance
?
"true"
:
"false"
);
892
893
text += QString(
" -- xRegionRangeStart: %1 -- xRegionRangeEnd: %2"
)
894
.arg(
m_xRegionRangeStart
)
895
.arg(
m_xRegionRangeStop
);
896
897
text += QString(
" -- yRegionRangeStart: %1 -- yRegionRangeEnd: %2"
)
898
.arg(
m_yRegionRangeStart
)
899
.arg(
m_yRegionRangeStop
);
900
901
text += QString(
" -- xDelta: %1 -- yDelta: %2"
).arg(
m_xDelta
).arg(
m_yDelta
);
902
903
text += QString(
" -- pressedKeyCode: %1"
).arg(
m_pressedKeyCode
);
904
905
if
(
m_pressedKeyCodes
.size())
906
{
907
for
(
int
key :
m_pressedKeyCodes
)
908
text += QString(
" -- pressedKeyCodes key: %1"
).arg(key);
909
}
910
911
text += QString(
" -- releasedKeyCode: %1"
).arg(
m_releasedKeyCode
);
912
913
if
(
m_releasedKeyCodes
.size())
914
{
915
for
(
int
key :
m_releasedKeyCodes
)
916
text += QString(
" -- releasedKeyCodes key: %1"
).arg(key);
917
}
918
919
// Qt::NoModifier0x00000000No modifier key is pressed.
920
// Qt::ShiftModifier0x02000000A Shift key on the keyboard is pressed.
921
// Qt::ControlModifier0x04000000A Ctrl key on the keyboard is pressed.
922
// Qt::AltModifier0x08000000An Alt key on the keyboard is pressed.
923
// Qt::MetaModifier0x10000000A Meta key on the keyboard is pressed.
924
// Qt::KeypadModifier0x20000000A keypad button is pressed.
925
// Qt::GroupSwitchModifier0x40000000X11 only (unless activated on Windows by a
926
// command line argument).
927
// A Mode_switch key on the keyboard is
928
// pressed.
929
930
text += QString(
" -- keyboardModifiers: "
);
931
932
if
(
m_keyboardModifiers
== Qt::NoModifier)
933
text += QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::NoModifier]);
934
935
if
(
static_cast<
int
>
(
m_keyboardModifiers
) & Qt::ShiftModifier)
936
text += QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::ShiftModifier]);
937
938
if
(
static_cast<
int
>
(
m_keyboardModifiers
) & Qt::ControlModifier)
939
text += QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::ControlModifier]);
940
941
if
(
static_cast<
int
>
(
m_keyboardModifiers
) & Qt::AltModifier)
942
text += QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::AltModifier]);
943
944
if
(
static_cast<
int
>
(
m_keyboardModifiers
) & Qt::MetaModifier)
945
text += QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::MetaModifier]);
946
947
if
(
static_cast<
int
>
(
m_keyboardModifiers
) & Qt::KeypadModifier)
948
text += QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::KeypadModifier]);
949
950
if
(
static_cast<
int
>
(
m_keyboardModifiers
) & Qt::GroupSwitchModifier)
951
text +=
952
QString(
"%1 - "
).arg(
qtKeyboardModifierMap
[Qt::GroupSwitchModifier]);
953
954
text += QString(
" -- lastPressedMouseButton: %1"
)
955
.arg(
qtMouseButtonsMap
[
m_lastPressedMouseButton
]);
956
957
text += QString(
" -- lastReleasedMouseButton: %1"
)
958
.arg(
qtMouseButtonsMap
[
m_lastReleasedMouseButton
]);
959
960
text += QString(
" -- pressedMouseButtons: %1"
)
961
.arg(
qtMouseButtonsMap
[
m_pressedMouseButtons
]);
962
963
text += QString(
" -- mouseButtonsAtMousePress: %1"
)
964
.arg(
qtMouseButtonsMap
[
m_mouseButtonsAtMousePress
]);
965
966
text += QString(
" -- mouseButtonsAtMouseRelease: %1"
)
967
.arg(
qtMouseButtonsMap
[
m_mouseButtonsAtMouseRelease
]);
968
969
return
text;
970
}
971
972
QString
973
BasePlotContext::dragDirectionsToString
()
const
974
{
975
QString text;
976
977
// Document how the mouse cursor is being dragged.
978
if
(
m_isMouseDragging
)
979
{
980
if
(
static_cast<
int
>
(
m_dragDirections
) &
981
static_cast<
int
>
(
DragDirections::LEFT_TO_RIGHT
))
982
text +=
" -- dragging from left to right"
;
983
else
if
(
static_cast<
int
>
(
m_dragDirections
) &
984
static_cast<
int
>
(
DragDirections::RIGHT_TO_LEFT
))
985
text +=
" -- dragging from right to left"
;
986
if
(
static_cast<
int
>
(
m_dragDirections
) &
987
static_cast<
int
>
(
DragDirections::TOP_TO_BOTTOM
))
988
text +=
" -- dragging from top to bottom"
;
989
if
(
static_cast<
int
>
(
m_dragDirections
) &
990
static_cast<
int
>
(
DragDirections::BOTTOM_TO_TOP
))
991
text +=
" -- dragging from bottom to top"
;
992
}
993
994
return
text;
995
}
996
997
998
}
// namespace pappso
baseplotcontext.h
pappso::BasePlotContext
Definition
baseplotcontext.h:45
pappso::BasePlotContext::m_xRegionRangeStart
double m_xRegionRangeStart
Definition
baseplotcontext.h:96
pappso::BasePlotContext::m_startDragPoint
QPointF m_startDragPoint
Definition
baseplotcontext.h:67
pappso::BasePlotContext::m_xDelta
double m_xDelta
Definition
baseplotcontext.h:102
pappso::BasePlotContext::m_mouseButtonsAtMousePress
Qt::MouseButtons m_mouseButtonsAtMousePress
Definition
baseplotcontext.h:119
pappso::BasePlotContext::m_selectionPolygon
SelectionPolygon m_selectionPolygon
Definition
baseplotcontext.h:73
pappso::BasePlotContext::~BasePlotContext
virtual ~BasePlotContext()
Definition
baseplotcontext.cpp:119
pappso::BasePlotContext::dragDirectionsToString
QString dragDirectionsToString() const
Definition
baseplotcontext.cpp:973
pappso::BasePlotContext::m_yRegionRangeStop
double m_yRegionRangeStop
Definition
baseplotcontext.h:100
pappso::BasePlotContext::recordDragDirections
DragDirections recordDragDirections()
Definition
baseplotcontext.cpp:827
pappso::BasePlotContext::m_dataKind
Enums::DataKind m_dataKind
Definition
baseplotcontext.h:57
pappso::BasePlotContext::m_wasClickOnXAxis
bool m_wasClickOnXAxis
Definition
baseplotcontext.h:85
pappso::BasePlotContext::m_keyboardModifiers
Qt::KeyboardModifiers m_keyboardModifiers
Definition
baseplotcontext.h:112
pappso::BasePlotContext::m_pressedKeyCode
int m_pressedKeyCode
Definition
baseplotcontext.h:105
pappso::BasePlotContext::m_xRegionRangeStop
double m_xRegionRangeStop
Definition
baseplotcontext.h:97
pappso::BasePlotContext::updateIntegrationScope
void updateIntegrationScope()
Definition
baseplotcontext.cpp:206
pappso::BasePlotContext::m_lastPressedMouseButton
Qt::MouseButtons m_lastPressedMouseButton
Definition
baseplotcontext.h:114
pappso::BasePlotContext::m_releasedKeyCodes
QSet< int > m_releasedKeyCodes
Definition
baseplotcontext.h:109
pappso::BasePlotContext::updateIntegrationScopeRhombVertical
void updateIntegrationScopeRhombVertical()
Definition
baseplotcontext.cpp:508
pappso::BasePlotContext::m_isMouseDragging
bool m_isMouseDragging
Definition
baseplotcontext.h:59
pappso::BasePlotContext::m_xRange
QCPRange m_xRange
Definition
baseplotcontext.h:78
pappso::BasePlotContext::updateIntegrationScopeRhombHorizontal
void updateIntegrationScopeRhombHorizontal()
Definition
baseplotcontext.cpp:348
pappso::BasePlotContext::m_isMeasuringDistance
bool m_isMeasuringDistance
Definition
baseplotcontext.h:88
pappso::BasePlotContext::m_dragDirections
DragDirections m_dragDirections
Definition
baseplotcontext.h:70
pappso::BasePlotContext::m_integrationScopeRhombHeight
double m_integrationScopeRhombHeight
Definition
baseplotcontext.h:75
pappso::BasePlotContext::m_lastCursorHoveredPoint
QPointF m_lastCursorHoveredPoint
Definition
baseplotcontext.h:69
pappso::BasePlotContext::m_currentDragPoint
QPointF m_currentDragPoint
Definition
baseplotcontext.h:68
pappso::BasePlotContext::initialize
void initialize(const BasePlotContext &other)
Definition
baseplotcontext.cpp:132
pappso::BasePlotContext::m_releasedKeyText
QString m_releasedKeyText
Definition
baseplotcontext.h:110
pappso::BasePlotContext::m_yDelta
double m_yDelta
Definition
baseplotcontext.h:103
pappso::BasePlotContext::m_pressedKeyCodes
QSet< int > m_pressedKeyCodes
Definition
baseplotcontext.h:106
pappso::BasePlotContext::updateIntegrationScopeRect
void updateIntegrationScopeRect()
Definition
baseplotcontext.cpp:236
pappso::BasePlotContext::mpa_integrationScope
IntegrationScopeBase * mpa_integrationScope
Definition
baseplotcontext.h:72
pappso::BasePlotContext::m_yRegionRangeStart
double m_yRegionRangeStart
Definition
baseplotcontext.h:99
pappso::BasePlotContext::updateIntegrationScopeRhomb
void updateIntegrationScopeRhomb()
Definition
baseplotcontext.cpp:672
pappso::BasePlotContext::m_isRightPseudoButtonKeyPressed
bool m_isRightPseudoButtonKeyPressed
Definition
baseplotcontext.h:64
pappso::BasePlotContext::m_pressedMouseButtons
Qt::MouseButtons m_pressedMouseButtons
Definition
baseplotcontext.h:117
pappso::BasePlotContext::m_yRange
QCPRange m_yRange
Definition
baseplotcontext.h:79
pappso::BasePlotContext::m_mouseButtonsAtMouseRelease
Qt::MouseButtons m_mouseButtonsAtMouseRelease
Definition
baseplotcontext.h:120
pappso::BasePlotContext::m_releasedKeyCode
int m_releasedKeyCode
Definition
baseplotcontext.h:108
pappso::BasePlotContext::m_isLeftPseudoButtonKeyPressed
bool m_isLeftPseudoButtonKeyPressed
Definition
baseplotcontext.h:63
pappso::BasePlotContext::operator=
BasePlotContext & operator=(const BasePlotContext &other)
Definition
baseplotcontext.cpp:756
pappso::BasePlotContext::BasePlotContext
BasePlotContext()
Definition
baseplotcontext.cpp:38
pappso::BasePlotContext::m_integrationScopeRhombWidth
double m_integrationScopeRhombWidth
Definition
baseplotcontext.h:74
pappso::BasePlotContext::m_lastReleasedMouseButton
Qt::MouseButtons m_lastReleasedMouseButton
Definition
baseplotcontext.h:115
pappso::BasePlotContext::toString
QString toString() const
Definition
baseplotcontext.cpp:849
pappso::BasePlotContext::m_wasKeyBoardDragging
bool m_wasKeyBoardDragging
Definition
baseplotcontext.h:65
pappso::BasePlotContext::m_wasMouseDragging
bool m_wasMouseDragging
Definition
baseplotcontext.h:60
pappso::BasePlotContext::clone
BasePlotContext * clone()
Definition
baseplotcontext.cpp:126
pappso::BasePlotContext::m_pressedKeyText
QString m_pressedKeyText
Definition
baseplotcontext.h:107
pappso::BasePlotContext::m_wasClickOnYAxis
bool m_wasClickOnYAxis
Definition
baseplotcontext.h:86
pappso::BasePlotContext::m_isKeyBoardDragging
bool m_isKeyBoardDragging
Definition
baseplotcontext.h:62
pappso::IntegrationScopeBase::clone
virtual IntegrationScopeBase * clone() const
Definition
integrationscopebase.cpp:39
pappso::IntegrationScopeRect
Definition
integrationscoperect.h:45
pappso::IntegrationScopeRhomb
Definition
integrationscoperhomb.h:77
pappso::IntegrationScope
Definition
integrationscope.h:38
integrationscope.h
integrationscoperect.h
integrationscoperhomb.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::qtMouseButtonMap
std::map< Qt::MouseButton, QString > qtMouseButtonMap
Definition
baseplotcontext.cpp:12
pappso::DragDirections
DragDirections
Definition
baseplotcontext.h:29
pappso::DragDirections::RIGHT_TO_LEFT
@ RIGHT_TO_LEFT
Definition
baseplotcontext.h:32
pappso::DragDirections::NOT_SET
@ NOT_SET
Definition
baseplotcontext.h:30
pappso::DragDirections::LEFT_TO_RIGHT
@ LEFT_TO_RIGHT
Definition
baseplotcontext.h:31
pappso::DragDirections::BOTTOM_TO_TOP
@ BOTTOM_TO_TOP
Definition
baseplotcontext.h:34
pappso::DragDirections::TOP_TO_BOTTOM
@ TOP_TO_BOTTOM
Definition
baseplotcontext.h:33
pappso::qtMouseButtonsMap
std::map< Qt::MouseButtons, QString > qtMouseButtonsMap
Definition
baseplotcontext.cpp:18
pappso::qtKeyboardModifierMap
std::map< Qt::KeyboardModifier, QString > qtKeyboardModifierMap
Definition
baseplotcontext.cpp:29
pappsomspp
gui
plotwidget
baseplotcontext.cpp
Generated on
for libpappsomspp by
1.17.0