libpappsomspp
Library for mass spectrometry
ticxicchromtraceplotwidget.cpp
Go to the documentation of this file.
1
/* This code comes right from the msXpertSuite software project.
2
*
3
* msXpertSuite - mass spectrometry software suite
4
* -----------------------------------------------
5
* Copyright(C) 2009,...,2018 Filippo Rusconi
6
*
7
* http://www.msxpertsuite.org
8
*
9
* This program is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
*
22
* END software license
23
*/
24
25
26
/////////////////////// StdLib includes
27
#include <vector>
28
29
30
/////////////////////// Qt includes
31
#include <QVector>
32
33
34
/////////////////////// Local includes
35
#include "
ticxicchromtraceplotwidget.h
"
36
#include "../../pappsoexception.h"
37
38
39
namespace
pappso
40
{
41
42
43
TicXicChromTracePlotWidget::TicXicChromTracePlotWidget
(
44
QWidget *parent,
const
QString &x_axis_label,
const
QString &y_axis_label)
45
:
BaseTracePlotWidget
(parent, x_axis_label, y_axis_label)
46
{
47
// Set the context to be of kind DataKind::rt
48
49
m_context
.
m_dataKind
=
DataKind::rt
;
50
51
// qDebug() << "Data kind:" << static_cast<int>(m_context.m_dataKind);
52
}
53
54
55
TicXicChromTracePlotWidget::~TicXicChromTracePlotWidget
()
56
{
57
}
58
59
60
//! Set the \c m_pressedKeyCode to the key code in \p event.
61
void
62
TicXicChromTracePlotWidget::keyPressEvent
(QKeyEvent *event)
63
{
64
// qDebug() << "ENTER";
65
66
BasePlotWidget::keyPressEvent
(event);
67
68
// qDebug() << "Going to emit keyPressEventSignal(m_context);";
69
70
emit
keyPressEventSignal
(
m_context
);
71
}
72
73
74
//! Handle specific key codes and trigger respective actions.
75
void
76
TicXicChromTracePlotWidget::keyReleaseEvent
(QKeyEvent *event)
77
{
78
BasePlotWidget::keyReleaseEvent
(event);
79
}
80
81
82
//! Handle mouse movements, in particular record all the last visited points.
83
/*!
84
85
This function is reponsible for storing at each time the last visited point
86
in the graph. Here, point is intended as any x/y coordinate in the plot
87
widget viewport, not a graph point.
88
89
The stored values are then the basis for a large set of calculations
90
throughout all the plot widget.
91
92
\param pointer to QMouseEvent from which to retrieve the coordinates of the
93
visited viewport points.
94
*/
95
void
96
TicXicChromTracePlotWidget::mouseMoveHandler
(QMouseEvent *event)
97
{
98
BasePlotWidget::mouseMoveHandler
(event);
99
}
100
101
102
void
103
TicXicChromTracePlotWidget::mouseMoveHandlerNotDraggingCursor
()
104
{
105
BasePlotWidget::mouseMoveHandlerNotDraggingCursor
();
106
}
107
108
109
void
110
TicXicChromTracePlotWidget::mouseMoveHandlerDraggingCursor
()
111
{
112
BasePlotWidget::mouseMoveHandlerDraggingCursor
();
113
}
114
115
116
//! Record the clicks of the mouse.
117
void
118
TicXicChromTracePlotWidget::mousePressHandler
(QMouseEvent *event)
119
{
120
BasePlotWidget::mousePressHandler
(event);
121
}
122
123
124
//! React to the release of the mouse buttons.
125
void
126
TicXicChromTracePlotWidget::mouseReleaseHandler
(QMouseEvent *event)
127
{
128
BasePlotWidget::mouseReleaseHandler
(event);
129
}
130
131
132
}
// namespace pappso
pappso::BasePlotContext::m_dataKind
DataKind m_dataKind
Definition:
baseplotcontext.h:44
pappso::BasePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor()
Definition:
baseplotwidget.cpp:1026
pappso::BasePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
KEYBOARD-related EVENTS.
Definition:
baseplotwidget.cpp:619
pappso::BasePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor()
Definition:
baseplotwidget.cpp:962
pappso::BasePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition:
baseplotwidget.cpp:1300
pappso::BasePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event)
Definition:
baseplotwidget.cpp:1415
pappso::BasePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition:
baseplotwidget.cpp:914
pappso::BasePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event)
Handle specific key codes and trigger respective actions.
Definition:
baseplotwidget.cpp:648
pappso::BasePlotWidget::keyPressEventSignal
void keyPressEventSignal(const BasePlotContext &context)
pappso::BasePlotWidget::m_context
BasePlotContext m_context
Definition:
baseplotwidget.h:256
pappso::BaseTracePlotWidget
Definition:
basetraceplotwidget.h:60
pappso::TicXicChromTracePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event) override
Record the clicks of the mouse.
Definition:
ticxicchromtraceplotwidget.cpp:118
pappso::TicXicChromTracePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor() override
Definition:
ticxicchromtraceplotwidget.cpp:110
pappso::TicXicChromTracePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event) override
Handle specific key codes and trigger respective actions.
Definition:
ticxicchromtraceplotwidget.cpp:76
pappso::TicXicChromTracePlotWidget::~TicXicChromTracePlotWidget
virtual ~TicXicChromTracePlotWidget()
Definition:
ticxicchromtraceplotwidget.cpp:55
pappso::TicXicChromTracePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor() override
Definition:
ticxicchromtraceplotwidget.cpp:103
pappso::TicXicChromTracePlotWidget::TicXicChromTracePlotWidget
TicXicChromTracePlotWidget(QWidget *parent, const QString &x_axis_label, const QString &y_axis_label)
Definition:
ticxicchromtraceplotwidget.cpp:43
pappso::TicXicChromTracePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event) override
Set the m_pressedKeyCode to the key code in event.
Definition:
ticxicchromtraceplotwidget.cpp:62
pappso::TicXicChromTracePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event) override
Handle mouse movements, in particular record all the last visited points.
Definition:
ticxicchromtraceplotwidget.cpp:96
pappso::TicXicChromTracePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event) override
React to the release of the mouse buttons.
Definition:
ticxicchromtraceplotwidget.cpp:126
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition:
aa.cpp:39
pappso::DataKind::rt
@ rt
Retention time.
ticxicchromtraceplotwidget.h
pappsomspp
widget
plotwidget
ticxicchromtraceplotwidget.cpp
Generated on Sun Jan 1 2023 15:24:07 for libpappsomspp by
1.9.1