Loading...
Searching...
No Matches
ticxicchromtraceplotwidget.cpp
Go to the documentation of this file.
/* This code comes right from the msXpertSuite software project.
*
* msXpertSuite - mass spectrometry software suite
* -----------------------------------------------
* Copyright(C) 2009,...,2018 Filippo Rusconi
*
* http://www.msxpertsuite.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* END software license
*/
/////////////////////// StdLib includes
#include <vector>
/////////////////////// Qt includes
#include <QVector>
/////////////////////// Local includes
#include "ticxicchromtraceplotwidget.h"
#include "pappsomspp/core/pappsoexception.h"
namespace pappso
{
TicXicChromTracePlotWidget::TicXicChromTracePlotWidget(QWidget *parent,
const QString &x_axis_label,
const QString &y_axis_label)
: BaseTracePlotWidget(parent, x_axis_label, y_axis_label)
{
// Set the context to be of kind Enums::DataKind::rt
m_context.m_dataKind = Enums::DataKind::rt;
// qDebug() << "Data kind:" << static_cast<int>(m_context.m_dataKind);
}
TicXicChromTracePlotWidget::~TicXicChromTracePlotWidget()
{
}
//! Set the \c m_pressedKeyCode to the key code in \p event.
void
TicXicChromTracePlotWidget::keyPressEvent(QKeyEvent *event)
{
// qDebug() << "ENTER";
BasePlotWidget::keyPressEvent(event);
// qDebug() << "Going to emit keyPressEventSignal(m_context);";
emit keyPressEventSignal(m_context);
}
//! Handle specific key codes and trigger respective actions.
void
TicXicChromTracePlotWidget::keyReleaseEvent(QKeyEvent *event)
{
BasePlotWidget::keyReleaseEvent(event);
}
//! Handle mouse movements, in particular record all the last visited points.
/*!
This function is reponsible for storing at each time the last visited point
in the graph. Here, point is intended as any x/y coordinate in the plot
widget viewport, not a graph point.
The stored values are then the basis for a large set of calculations
throughout all the plot widget.
\param pointer to QMouseEvent from which to retrieve the coordinates of the
visited viewport points.
*/
void
TicXicChromTracePlotWidget::mouseMoveHandler(QMouseEvent *event)
{
BasePlotWidget::mouseMoveHandler(event);
}
void
TicXicChromTracePlotWidget::mouseMoveHandlerNotDraggingCursor(QMouseEvent *event)
{
BasePlotWidget::mouseMoveHandlerNotDraggingCursor(event);
}
void
TicXicChromTracePlotWidget::mouseMoveHandlerDraggingCursor(QMouseEvent *event)
{
BasePlotWidget::mouseMoveHandlerDraggingCursor(event);
}
//! Record the clicks of the mouse.
void
TicXicChromTracePlotWidget::mousePressHandler(QMouseEvent *event)
{
BasePlotWidget::mousePressHandler(event);
emit mousePressEventSignal(event, m_context);
}
//! React to the release of the mouse buttons.
void
TicXicChromTracePlotWidget::mouseReleaseHandler(QMouseEvent *event)
{
BasePlotWidget::mouseReleaseHandler(event);
emit mouseReleaseEventSignal(event, m_context);
}
} // namespace pappso
pappso::BasePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
KEYBOARD-related EVENTS.
Definition baseplotwidget.cpp:607
pappso::BasePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor(QMouseEvent *event)
Definition baseplotwidget.cpp:1047
pappso::BasePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor(QMouseEvent *event)
Definition baseplotwidget.cpp:983
pappso::BasePlotWidget::keyPressEventSignal
void keyPressEventSignal(const pappso::BasePlotContext &context)
pappso::BasePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition baseplotwidget.cpp:1319
pappso::BasePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event)
Definition baseplotwidget.cpp:1434
pappso::BasePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event)
KEYBOARD-related EVENTS.
Definition baseplotwidget.cpp:936
pappso::BasePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event)
Handle specific key codes and trigger respective actions.
Definition baseplotwidget.cpp:640
pappso::BasePlotWidget::m_context
BasePlotContext m_context
Definition baseplotwidget.h:283
pappso::BaseTracePlotWidget::BaseTracePlotWidget
BaseTracePlotWidget(QWidget *parent=0)
Definition basetraceplotwidget.cpp:43
pappso::TicXicChromTracePlotWidget::mousePressHandler
virtual void mousePressHandler(QMouseEvent *event) override
Record the clicks of the mouse.
Definition ticxicchromtraceplotwidget.cpp:119
pappso::TicXicChromTracePlotWidget::mousePressEventSignal
void mousePressEventSignal(QMouseEvent *event, const pappso::BasePlotContext &context)
pappso::TicXicChromTracePlotWidget::keyReleaseEvent
virtual void keyReleaseEvent(QKeyEvent *event) override
Handle specific key codes and trigger respective actions.
Definition ticxicchromtraceplotwidget.cpp:77
pappso::TicXicChromTracePlotWidget::~TicXicChromTracePlotWidget
virtual ~TicXicChromTracePlotWidget()
Definition ticxicchromtraceplotwidget.cpp:56
pappso::TicXicChromTracePlotWidget::TicXicChromTracePlotWidget
TicXicChromTracePlotWidget(QWidget *parent, const QString &x_axis_label, const QString &y_axis_label)
Definition ticxicchromtraceplotwidget.cpp:43
pappso::TicXicChromTracePlotWidget::mouseReleaseEventSignal
void mouseReleaseEventSignal(QMouseEvent *event, const pappso::BasePlotContext &context)
pappso::TicXicChromTracePlotWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event) override
Set the m_pressedKeyCode to the key code in event.
Definition ticxicchromtraceplotwidget.cpp:63
pappso::TicXicChromTracePlotWidget::mouseMoveHandler
virtual void mouseMoveHandler(QMouseEvent *event) override
Handle mouse movements, in particular record all the last visited points.
Definition ticxicchromtraceplotwidget.cpp:97
pappso::TicXicChromTracePlotWidget::mouseMoveHandlerNotDraggingCursor
virtual void mouseMoveHandlerNotDraggingCursor(QMouseEvent *event) override
Definition ticxicchromtraceplotwidget.cpp:104
pappso::TicXicChromTracePlotWidget::mouseReleaseHandler
virtual void mouseReleaseHandler(QMouseEvent *event) override
React to the release of the mouse buttons.
Definition ticxicchromtraceplotwidget.cpp:129
pappso::TicXicChromTracePlotWidget::mouseMoveHandlerDraggingCursor
virtual void mouseMoveHandlerDraggingCursor(QMouseEvent *event) override
Definition ticxicchromtraceplotwidget.cpp:111
pappso::Enums::DataKind::rt
@ rt
Retention time.
Definition types.h:251
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappsoexception.h
ticxicchromtraceplotwidget.h