@@ -16,11 +16,24 @@ public:
|
||||
uint32_t len;
|
||||
unsigned char data[8];
|
||||
uint64_t timestamp;
|
||||
uint32_t frameCount; //used in overwrite mode
|
||||
|
||||
friend bool operator<(const CANFrame& l, const CANFrame& r)
|
||||
{
|
||||
return l.timestamp < r.timestamp;
|
||||
}
|
||||
|
||||
CANFrame()
|
||||
{
|
||||
ID = 0;
|
||||
bus = 0;
|
||||
extended = false;
|
||||
remote = false;
|
||||
isReceived = true;
|
||||
len = 0;
|
||||
timestamp = 0;
|
||||
frameCount = 1;
|
||||
}
|
||||
};
|
||||
|
||||
class CANFltObserver
|
||||
|
||||
+7
-2
@@ -289,7 +289,8 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
|
||||
case Column::Extended:
|
||||
return QString::number(thisFrame.extended);
|
||||
case Column::Remote:
|
||||
return QString::number(thisFrame.remote);
|
||||
if (!overwriteDups) return QString::number(thisFrame.remote);
|
||||
return QString::number(thisFrame.frameCount);
|
||||
case Column::Direction:
|
||||
if (thisFrame.isReceived) return QString(tr("Rx"));
|
||||
return QString(tr("Tx"));
|
||||
@@ -383,7 +384,8 @@ QVariant CANFrameModel::headerData(int section, Qt::Orientation orientation,
|
||||
case Column::Extended:
|
||||
return QString(tr("Ext"));
|
||||
case Column::Remote:
|
||||
return QString(tr("Rem"));
|
||||
if (!overwriteDups) return QString(tr("Rem"));
|
||||
return QString(tr("Cnt"));
|
||||
case Column::Direction:
|
||||
return QString(tr("Dir"));
|
||||
case Column::Bus:
|
||||
@@ -429,6 +431,7 @@ void CANFrameModel::addFrame(const CANFrame& frame, bool autoRefresh = false)
|
||||
if (filters[tempFrame.ID])
|
||||
{
|
||||
if (autoRefresh) beginInsertRows(QModelIndex(), filteredFrames.count(), filteredFrames.count());
|
||||
tempFrame.frameCount = 1;
|
||||
filteredFrames.append(tempFrame);
|
||||
if (autoRefresh) endInsertRows();
|
||||
}
|
||||
@@ -440,6 +443,7 @@ void CANFrameModel::addFrame(const CANFrame& frame, bool autoRefresh = false)
|
||||
{
|
||||
if (frames[i].ID == tempFrame.ID)
|
||||
{
|
||||
tempFrame.frameCount = frames[i].frameCount + 1;
|
||||
frames.replace(i, tempFrame);
|
||||
found = true;
|
||||
break;
|
||||
@@ -451,6 +455,7 @@ void CANFrameModel::addFrame(const CANFrame& frame, bool autoRefresh = false)
|
||||
if (filters[tempFrame.ID])
|
||||
{
|
||||
if (autoRefresh) beginInsertRows(QModelIndex(), filteredFrames.count(), filteredFrames.count());
|
||||
tempFrame.frameCount = 1;
|
||||
filteredFrames.append(tempFrame);
|
||||
if (autoRefresh) endInsertRows();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CONFIG
|
||||
#define CONFIG
|
||||
|
||||
#define VERSION 196
|
||||
#define VERSION 197
|
||||
|
||||
//try to keep this in sync.
|
||||
//SavvyCAN will complain if you connect a GVRET board with a revision
|
||||
|
||||
@@ -94,10 +94,10 @@ void CANConManager::refreshCanList()
|
||||
|
||||
if (mConns.count() == 0)
|
||||
{
|
||||
tempFrames.clear();
|
||||
//TODO: Seems to crash under heavy load. Find out why.
|
||||
if(buslessFrames.size()) {
|
||||
tempFrames.clear();
|
||||
tempFrames.append(buslessFrames); //make a copy and pass that copy
|
||||
if(buslessFrames.size()) {
|
||||
tempFrames = buslessFrames; //make a copy and pass that copy
|
||||
buslessFrames.clear(); //delete all frames from the original
|
||||
emit framesReceived(nullptr, tempFrames);
|
||||
}
|
||||
|
||||
@@ -1472,6 +1472,21 @@ DBC_MESSAGE* DBCHandler::findMessage(const CANFrame &frame)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*
|
||||
* As above, a real shortcut function that searches all files in order to try to find a message with the given name
|
||||
*/
|
||||
DBC_MESSAGE* DBCHandler::findMessage(const QString msgName)
|
||||
{
|
||||
DBC_MESSAGE *msg = nullptr;
|
||||
for(int i = 0; i < loadedFiles.count(); i++)
|
||||
{
|
||||
DBCFile * file = getFileByIdx(i);
|
||||
msg = file->messageHandler->findMsgByName(msgName);
|
||||
if (msg) return msg; //if it's not null then we have a match so return it
|
||||
}
|
||||
return nullptr; //no match, tough luck, return null
|
||||
}
|
||||
|
||||
int DBCHandler::getFileCount()
|
||||
{
|
||||
return loadedFiles.count();
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
void removeAllFiles();
|
||||
void swapFiles(int pos1, int pos2);
|
||||
DBC_MESSAGE* findMessage(const CANFrame &frame);
|
||||
DBC_MESSAGE* findMessage(const QString msgName);
|
||||
int getFileCount();
|
||||
DBCFile* getFileByIdx(int idx);
|
||||
DBCFile* getFileByName(QString name);
|
||||
|
||||
@@ -34,7 +34,7 @@ DBCLoadSaveWindow::DBCLoadSaveWindow(const QVector<CANFrame> *frames, QWidget *p
|
||||
connect(ui->tableFiles, &QTableWidget::cellChanged, this, &DBCLoadSaveWindow::cellChanged);
|
||||
connect(ui->tableFiles, &QTableWidget::cellDoubleClicked, this, &DBCLoadSaveWindow::cellDoubleClicked);
|
||||
|
||||
editorWindow = new DBCMainEditor(frames);
|
||||
editorWindow = new DBCMainEditor(frames, this);
|
||||
currentlyEditingFile = nullptr;
|
||||
|
||||
installEventFilter(this);
|
||||
|
||||
@@ -49,7 +49,7 @@ DBCMainEditor::DBCMainEditor( const QVector<CANFrame> *frames, QWidget *parent)
|
||||
connect(ui->MessagesTable, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onCustomMenuMessage(QPoint)));
|
||||
ui->MessagesTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
sigEditor = new DBCSignalEditor();
|
||||
sigEditor = new DBCSignalEditor(this);
|
||||
|
||||
installEventFilter(this);
|
||||
}
|
||||
|
||||
+1091
-22
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,7 @@ public:
|
||||
static bool saveFrameFile(QString &, const QVector<CANFrame>*);
|
||||
|
||||
//These do the actual loading and saving and can be used directly if you'd prefer
|
||||
static bool autoDetectLoadFile(QString, QVector<CANFrame>*);
|
||||
static bool loadCRTDFile(QString, QVector<CANFrame>*);
|
||||
static bool loadNativeCSVFile(QString, QVector<CANFrame>*);
|
||||
static bool loadGenericCSVFile(QString, QVector<CANFrame>*);
|
||||
@@ -47,6 +48,27 @@ public:
|
||||
static bool loadCANHackerFile(QString filename, QVector<CANFrame>* frames);
|
||||
static bool loadCabanaFile(QString filename, QVector<CANFrame>* frames);
|
||||
static bool loadCANOpenFile(QString filename, QVector<CANFrame>* frames);
|
||||
|
||||
//functions that pre-scan a file to try to figure out if they could read it. Used to automatically determine
|
||||
//file type and load it.
|
||||
static bool isCRTDFile(QString);
|
||||
static bool isNativeCSVFile(QString);
|
||||
static bool isGenericCSVFile(QString);
|
||||
static bool isLogFile(QString);
|
||||
static bool isMicrochipFile(QString);
|
||||
static bool isTraceFile(QString);
|
||||
static bool isIXXATFile(QString);
|
||||
static bool isCANDOFile(QString);
|
||||
static bool isVehicleSpyFile(QString);
|
||||
static bool isCanDumpFile(QString);
|
||||
static bool isPCANFile(QString);
|
||||
static bool isKvaserFile(QString);
|
||||
static bool isCanalyzerASC(QString);
|
||||
static bool isCanalyzerBLF(QString);
|
||||
static bool isCANHackerFile(QString filename);
|
||||
static bool isCabanaFile(QString filename);
|
||||
static bool isCANOpenFile(QString filename);
|
||||
|
||||
static bool saveCRTDFile(QString, const QVector<CANFrame>*);
|
||||
static bool saveNativeCSVFile(QString, const QVector<CANFrame>*);
|
||||
static bool saveGenericCSVFile(QString, const QVector<CANFrame>*);
|
||||
@@ -59,6 +81,7 @@ public:
|
||||
static bool saveCanDumpFile(QString filename, const QVector<CANFrame> * frames);
|
||||
static bool saveCabanaFile(QString filename, const QVector<CANFrame>* frames);
|
||||
static bool saveCanalyzerASC(QString filename, const QVector<CANFrame>* frames);
|
||||
|
||||
static bool openContinuousNative();
|
||||
static bool closeContinuousNative();
|
||||
static bool writeContinuousNative(const QVector<CANFrame>*, int);
|
||||
|
||||
+6
-2
@@ -200,7 +200,6 @@ MainWindow::~MainWindow()
|
||||
delete model;
|
||||
delete elapsedTime;
|
||||
delete dbcHandler;
|
||||
|
||||
}
|
||||
|
||||
//kill every sub window that could be open. At the moment a hard coded list
|
||||
@@ -249,6 +248,7 @@ void MainWindow::killWindow(QDialog *win)
|
||||
void MainWindow::exitApp()
|
||||
{
|
||||
this->close();
|
||||
QApplication::quit(); //forces the whole application to terminate when the main window is closed
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
@@ -406,10 +406,14 @@ void MainWindow::overwriteToggled(bool state)
|
||||
QMessageBox::Yes|QMessageBox::No);
|
||||
if (confirmDialog == QMessageBox::Yes)
|
||||
{
|
||||
model->setOverwriteMode(state);
|
||||
model->setOverwriteMode(true);
|
||||
}
|
||||
else ui->cbOverwrite->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
else
|
||||
{
|
||||
model->setOverwriteMode(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateFilterList()
|
||||
|
||||
+194
-101
@@ -1,7 +1,7 @@
|
||||
/***************************************************************************
|
||||
** **
|
||||
** QCustomPlot, an easy to use, modern plotting widget for Qt **
|
||||
** Copyright (C) 2011-2017 Emanuel Eichhammer **
|
||||
** Copyright (C) 2011-2018 Emanuel Eichhammer **
|
||||
** **
|
||||
** 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 **
|
||||
@@ -19,15 +19,15 @@
|
||||
****************************************************************************
|
||||
** Author: Emanuel Eichhammer **
|
||||
** Website/Contact: http://www.qcustomplot.com/ **
|
||||
** Date: 04.09.17 **
|
||||
** Version: 2.0.0 **
|
||||
** Date: 25.06.18 **
|
||||
** Version: 2.0.1 **
|
||||
****************************************************************************/
|
||||
|
||||
#include "qcustomplot.h"
|
||||
|
||||
|
||||
/* including file 'src/vector2d.cpp', size 7340 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPVector2D
|
||||
@@ -260,7 +260,7 @@ QCPVector2D &QCPVector2D::operator-=(const QCPVector2D &vector)
|
||||
|
||||
|
||||
/* including file 'src/painter.cpp', size 8670 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPPainter
|
||||
@@ -478,7 +478,7 @@ void QCPPainter::makeNonCosmetic()
|
||||
|
||||
|
||||
/* including file 'src/paintbuffer.cpp', size 18502 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAbstractPaintBuffer
|
||||
@@ -950,8 +950,8 @@ void QCPPaintBufferGlFbo::reallocateBuffer()
|
||||
/* end of 'src/paintbuffer.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/layer.cpp', size 37064 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/layer.cpp', size 37304 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPLayer
|
||||
@@ -1464,9 +1464,13 @@ bool QCPLayerable::realVisibility() const
|
||||
placed in \a details. So in the subsequent \ref selectEvent, the decision which part was
|
||||
selected doesn't have to be done a second time for a single selection operation.
|
||||
|
||||
In the case of 1D Plottables (\ref QCPAbstractPlottable1D, like \ref QCPGraph or \ref QCPBars) \a
|
||||
details will be set to a \ref QCPDataSelection, describing the closest data point to \a pos.
|
||||
|
||||
You may pass 0 as \a details to indicate that you are not interested in those selection details.
|
||||
|
||||
\see selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions
|
||||
\see selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions,
|
||||
QCPAbstractPlottable1D::selectTestRect
|
||||
*/
|
||||
double QCPLayerable::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
@@ -1804,7 +1808,7 @@ void QCPLayerable::wheelEvent(QWheelEvent *event)
|
||||
|
||||
|
||||
/* including file 'src/axis/range.cpp', size 12221 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPRange
|
||||
@@ -2125,8 +2129,8 @@ bool QCPRange::validRange(const QCPRange &range)
|
||||
/* end of 'src/axis/range.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/selection.cpp', size 21906 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/selection.cpp', size 21941 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPDataRange
|
||||
@@ -2136,8 +2140,9 @@ bool QCPRange::validRange(const QCPRange &range)
|
||||
\brief Describes a data range given by begin and end index
|
||||
|
||||
QCPDataRange holds two integers describing the begin (\ref setBegin) and end (\ref setEnd) index
|
||||
of a contiguous set of data points. The end index points to the data point above the last data point that's part of
|
||||
the data range, similarly to the nomenclature used in standard iterators.
|
||||
of a contiguous set of data points. The end index points to the data point just after the last
|
||||
data point that's part of the data range, similarly to the nomenclature used in standard
|
||||
iterators.
|
||||
|
||||
Data Ranges are not bound to a certain plottable, thus they can be freely exchanged, created and
|
||||
modified. If a non-contiguous data set shall be described, the class \ref QCPDataSelection is
|
||||
@@ -2184,7 +2189,7 @@ bool QCPRange::validRange(const QCPRange &range)
|
||||
|
||||
/*! \fn void QCPDataRange::setEnd(int end)
|
||||
|
||||
Sets the end of this data range. The \a end index points to the data point just above the last
|
||||
Sets the end of this data range. The \a end index points to the data point just after the last
|
||||
data point that is part of the data range.
|
||||
|
||||
No checks or corrections are made to ensure the resulting range is valid (\ref isValid).
|
||||
@@ -2300,7 +2305,7 @@ bool QCPDataRange::intersects(const QCPDataRange &other) const
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns whether all data points described by this data range are also in \a other.
|
||||
Returns whether all data points of \a other are also contained inside this data range.
|
||||
|
||||
\see intersects
|
||||
*/
|
||||
@@ -2631,7 +2636,8 @@ void QCPDataSelection::enforceType(QCP::SelectionType type)
|
||||
}
|
||||
case QCP::stDataRange:
|
||||
{
|
||||
mDataRanges = QList<QCPDataRange>() << span();
|
||||
if (!isEmpty())
|
||||
mDataRanges = QList<QCPDataRange>() << span();
|
||||
break;
|
||||
}
|
||||
case QCP::stMultipleDataRanges:
|
||||
@@ -2726,7 +2732,7 @@ QCPDataSelection QCPDataSelection::inverse(const QCPDataRange &outerRange) const
|
||||
|
||||
|
||||
/* including file 'src/selectionrect.cpp', size 9224 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPSelectionRect
|
||||
@@ -2954,8 +2960,8 @@ void QCPSelectionRect::draw(QCPPainter *painter)
|
||||
/* end of 'src/selectionrect.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/layout.cpp', size 79064 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/layout.cpp', size 79139 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPMarginGroup
|
||||
@@ -4074,7 +4080,7 @@ QCPLayoutGrid::QCPLayoutGrid() :
|
||||
mColumnSpacing(5),
|
||||
mRowSpacing(5),
|
||||
mWrap(0),
|
||||
mFillOrder(foRowsFirst)
|
||||
mFillOrder(foColumnsFirst)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4350,7 +4356,8 @@ void QCPLayoutGrid::setWrap(int count)
|
||||
The specified \a order defines whether rows or columns are filled first. Using \ref setWrap, you
|
||||
can control at which row/column count wrapping into the next column/row will occur. If you set it
|
||||
to zero, no wrapping will ever occur. Changing the fill order also changes the meaning of the
|
||||
linear index used e.g. in \ref elementAt and \ref takeAt.
|
||||
linear index used e.g. in \ref elementAt and \ref takeAt. The default fill order for \ref
|
||||
QCPLayoutGrid is \ref foColumnsFirst.
|
||||
|
||||
If you want to have all current elements arranged in the new order, set \a rearrange to true. The
|
||||
elements will be rearranged in a way that tries to preserve their linear index. However, empty
|
||||
@@ -5125,7 +5132,7 @@ void QCPLayoutInset::addElement(QCPLayoutElement *element, const QRectF &rect)
|
||||
|
||||
|
||||
/* including file 'src/lineending.cpp', size 11536 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPLineEnding
|
||||
@@ -5424,7 +5431,7 @@ void QCPLineEnding::draw(QCPPainter *painter, const QCPVector2D &pos, double ang
|
||||
|
||||
|
||||
/* including file 'src/axis/axisticker.cpp', size 18664 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTicker
|
||||
@@ -5844,7 +5851,7 @@ double QCPAxisTicker::cleanMantissa(double input) const
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerdatetime.cpp', size 14443 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTickerDateTime
|
||||
@@ -6141,7 +6148,7 @@ double QCPAxisTickerDateTime::dateTimeToKey(const QDate date)
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickertime.cpp', size 11747 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTickerTime
|
||||
@@ -6390,7 +6397,7 @@ void QCPAxisTickerTime::replaceUnit(QString &text, QCPAxisTickerTime::TimeUnit u
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerfixed.cpp', size 5583 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTickerFixed
|
||||
@@ -6491,8 +6498,8 @@ double QCPAxisTickerFixed::getTickStep(const QCPRange &range)
|
||||
/* end of 'src/axis/axistickerfixed.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickertext.cpp', size 8653 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/axis/axistickertext.cpp', size 8661 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTickerText
|
||||
@@ -6562,7 +6569,7 @@ void QCPAxisTickerText::setTicks(const QMap<double, QString> &ticks)
|
||||
|
||||
\see addTicks, addTick, clear
|
||||
*/
|
||||
void QCPAxisTickerText::setTicks(const QVector<double> &positions, const QVector<QString> labels)
|
||||
void QCPAxisTickerText::setTicks(const QVector<double> &positions, const QVector<QString> &labels)
|
||||
{
|
||||
clear();
|
||||
addTicks(positions, labels);
|
||||
@@ -6600,7 +6607,7 @@ void QCPAxisTickerText::clear()
|
||||
|
||||
\see addTicks, setTicks, clear
|
||||
*/
|
||||
void QCPAxisTickerText::addTick(double position, QString label)
|
||||
void QCPAxisTickerText::addTick(double position, const QString &label)
|
||||
{
|
||||
mTicks.insert(position, label);
|
||||
}
|
||||
@@ -6705,7 +6712,7 @@ QVector<double> QCPAxisTickerText::createTickVector(double tickStep, const QCPRa
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerpi.cpp', size 11170 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTickerPi
|
||||
@@ -6992,7 +6999,7 @@ QString QCPAxisTickerPi::unicodeSubscript(int number) const
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerlog.cpp', size 7106 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAxisTickerLog
|
||||
@@ -7132,8 +7139,8 @@ QVector<double> QCPAxisTickerLog::createTickVector(double tickStep, const QCPRan
|
||||
/* end of 'src/axis/axistickerlog.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/axis/axis.cpp', size 99397 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/axis/axis.cpp', size 99515 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -7653,10 +7660,14 @@ QCPLineEnding QCPAxis::upperEnding() const
|
||||
/*!
|
||||
Sets whether the axis uses a linear scale or a logarithmic scale.
|
||||
|
||||
Note that this method controls the coordinate transformation. You will likely also want to use a
|
||||
logarithmic tick spacing and labeling, which can be achieved by setting an instance of \ref
|
||||
QCPAxisTickerLog via \ref setTicker. See the documentation of \ref QCPAxisTickerLog about the
|
||||
details of logarithmic axis tick creation.
|
||||
Note that this method controls the coordinate transformation. For logarithmic scales, you will
|
||||
likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting
|
||||
the axis ticker to an instance of \ref QCPAxisTickerLog :
|
||||
|
||||
\snippet documentation/doc-code-snippets/mainwindow.cpp qcpaxisticker-log-creation
|
||||
|
||||
See the documentation of \ref QCPAxisTickerLog about the details of logarithmic axis tick
|
||||
creation.
|
||||
|
||||
\ref setNumberPrecision
|
||||
*/
|
||||
@@ -9819,7 +9830,7 @@ void QCPAxisPainterPrivate::getMaxTickLabelSize(const QFont &font, const QString
|
||||
|
||||
|
||||
/* including file 'src/scatterstyle.cpp', size 17450 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPScatterStyle
|
||||
@@ -10293,7 +10304,7 @@ void QCPScatterStyle::drawShape(QCPPainter *painter, double x, double y) const
|
||||
//amalgamation: add datacontainer.cpp
|
||||
|
||||
/* including file 'src/plottable.cpp', size 38845 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPSelectionDecorator
|
||||
@@ -11265,8 +11276,8 @@ void QCPAbstractPlottable::deselectEvent(bool *selectionStateChanged)
|
||||
/* end of 'src/plottable.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/item.cpp', size 49269 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/item.cpp', size 49271 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemAnchor
|
||||
@@ -12411,7 +12422,7 @@ double QCPAbstractItem::rectDistance(const QRectF &rect, const QPointF &pos, boo
|
||||
QList<QLineF> lines;
|
||||
lines << QLineF(rect.topLeft(), rect.topRight()) << QLineF(rect.bottomLeft(), rect.bottomRight())
|
||||
<< QLineF(rect.topLeft(), rect.bottomLeft()) << QLineF(rect.topRight(), rect.bottomRight());
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
for (int i=0; i<lines.size(); ++i)
|
||||
{
|
||||
double distSqr = QCPVector2D(pos).distanceSquaredToLine(lines.at(i).p1(), lines.at(i).p2());
|
||||
@@ -12536,8 +12547,8 @@ QCP::Interaction QCPAbstractItem::selectionCategory() const
|
||||
/* end of 'src/item.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/core.cpp', size 125037 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/core.cpp', size 126207 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCustomPlot
|
||||
@@ -14189,7 +14200,17 @@ int QCustomPlot::axisRectCount() const
|
||||
added, all of them may be accessed with this function in a linear fashion (even when they are
|
||||
nested in a layout hierarchy or inside other axis rects via QCPAxisRect::insetLayout).
|
||||
|
||||
\see axisRectCount, axisRects
|
||||
The order of the axis rects is given by the fill order of the \ref QCPLayout that is holding
|
||||
them. For example, if the axis rects are in the top level grid layout (accessible via \ref
|
||||
QCustomPlot::plotLayout), they are ordered from left to right, top to bottom, if the layout's
|
||||
default \ref QCPLayoutGrid::setFillOrder "setFillOrder" of \ref QCPLayoutGrid::foColumnsFirst
|
||||
"foColumnsFirst" wasn't changed.
|
||||
|
||||
If you want to access axis rects by their row and column index, use the layout interface. For
|
||||
example, use \ref QCPLayoutGrid::element of the top level grid layout, and \c qobject_cast the
|
||||
returned layout element to \ref QCPAxisRect. (See also \ref thelayoutsystem.)
|
||||
|
||||
\see axisRectCount, axisRects, QCPLayoutGrid::setFillOrder
|
||||
*/
|
||||
QCPAxisRect *QCustomPlot::axisRect(int index) const
|
||||
{
|
||||
@@ -14207,7 +14228,13 @@ QCPAxisRect *QCustomPlot::axisRect(int index) const
|
||||
/*!
|
||||
Returns all axis rects in the plot.
|
||||
|
||||
\see axisRectCount, axisRect
|
||||
The order of the axis rects is given by the fill order of the \ref QCPLayout that is holding
|
||||
them. For example, if the axis rects are in the top level grid layout (accessible via \ref
|
||||
QCustomPlot::plotLayout), they are ordered from left to right, top to bottom, if the layout's
|
||||
default \ref QCPLayoutGrid::setFillOrder "setFillOrder" of \ref QCPLayoutGrid::foColumnsFirst
|
||||
"foColumnsFirst" wasn't changed.
|
||||
|
||||
\see axisRectCount, axisRect, QCPLayoutGrid::setFillOrder
|
||||
*/
|
||||
QList<QCPAxisRect*> QCustomPlot::axisRects() const
|
||||
{
|
||||
@@ -15718,8 +15745,8 @@ void QCustomPlot::toPainter(QCPPainter *painter, int width, int height)
|
||||
|
||||
//amalgamation: add plottable1d.cpp
|
||||
|
||||
/* including file 'src/colorgradient.cpp', size 24646 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/colorgradient.cpp', size 25342 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -16282,10 +16309,22 @@ void QCPColorGradient::updateColorBuffer()
|
||||
QMap<double, QColor>::const_iterator it = mColorStops.lowerBound(position);
|
||||
if (it == mColorStops.constEnd()) // position is on or after last stop, use color of last stop
|
||||
{
|
||||
mColorBuffer[i] = (it-1).value().rgba();
|
||||
if (useAlpha)
|
||||
{
|
||||
const QColor col = (it-1).value();
|
||||
const float alphaPremultiplier = col.alpha()/255.0f; // since we use QImage::Format_ARGB32_Premultiplied
|
||||
mColorBuffer[i] = qRgba(col.red()*alphaPremultiplier, col.green()*alphaPremultiplier, col.blue()*alphaPremultiplier, col.alpha());
|
||||
} else
|
||||
mColorBuffer[i] = (it-1).value().rgba();
|
||||
} else if (it == mColorStops.constBegin()) // position is on or before first stop, use color of first stop
|
||||
{
|
||||
mColorBuffer[i] = it.value().rgba();
|
||||
if (useAlpha)
|
||||
{
|
||||
const QColor col = it.value();
|
||||
const float alphaPremultiplier = col.alpha()/255.0f; // since we use QImage::Format_ARGB32_Premultiplied
|
||||
mColorBuffer[i] = qRgba(col.red()*alphaPremultiplier, col.green()*alphaPremultiplier, col.blue()*alphaPremultiplier, col.alpha());
|
||||
} else
|
||||
mColorBuffer[i] = it.value().rgba();
|
||||
} else // position is in between stops (or on an intermediate stop), interpolate color
|
||||
{
|
||||
QMap<double, QColor>::const_iterator high = it;
|
||||
@@ -16359,7 +16398,7 @@ void QCPColorGradient::updateColorBuffer()
|
||||
|
||||
|
||||
/* including file 'src/selectiondecorator-bracket.cpp', size 12313 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPSelectionDecoratorBracket
|
||||
@@ -16645,7 +16684,7 @@ QPointF QCPSelectionDecoratorBracket::getPixelCoordinates(const QCPPlottableInte
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-axisrect.cpp', size 47584 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -17919,8 +17958,8 @@ void QCPAxisRect::wheelEvent(QWheelEvent *event)
|
||||
/* end of 'src/layoutelements/layoutelement-axisrect.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-legend.cpp', size 31097 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/layoutelements/layoutelement-legend.cpp', size 31153 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPAbstractLegendItem
|
||||
@@ -18259,7 +18298,7 @@ QSize QCPPlottableLegendItem::minimumOuterSizeHint() const
|
||||
|
||||
Use the methods \ref setFillOrder and \ref setWrap inherited from \ref QCPLayoutGrid to control
|
||||
in which order (column first or row first) the legend is filled up when calling \ref addItem, and
|
||||
at which column or row wrapping occurs.
|
||||
at which column or row wrapping occurs. The default fill order for legends is \ref foRowsFirst.
|
||||
|
||||
By default, every QCustomPlot has one legend (\ref QCustomPlot::legend) which is placed in the
|
||||
inset layout of the main axis rect (\ref QCPAxisRect::insetLayout). To move the legend to another
|
||||
@@ -18836,7 +18875,7 @@ void QCPLegend::parentPlotInitialized(QCustomPlot *parentPlot)
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-textelement.cpp', size 12761 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPTextElement
|
||||
@@ -19239,8 +19278,8 @@ QColor QCPTextElement::mainTextColor() const
|
||||
/* end of 'src/layoutelements/layoutelement-textelement.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-colorscale.cpp', size 25770 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/layoutelements/layoutelement-colorscale.cpp', size 26246 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -19459,13 +19498,22 @@ void QCPColorScale::setDataRange(const QCPRange &dataRange)
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the scale type of the color scale, i.e. whether values are linearly associated with colors
|
||||
Sets the scale type of the color scale, i.e. whether values are associated with colors linearly
|
||||
or logarithmically.
|
||||
|
||||
It is equivalent to calling QCPColorMap::setDataScaleType on any of the connected color maps. It is
|
||||
also equivalent to directly accessing the \ref axis and setting its scale type with \ref
|
||||
QCPAxis::setScaleType.
|
||||
|
||||
Note that this method controls the coordinate transformation. For logarithmic scales, you will
|
||||
likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting
|
||||
the color scale's \ref axis ticker to an instance of \ref QCPAxisTickerLog :
|
||||
|
||||
\snippet documentation/doc-code-snippets/mainwindow.cpp qcpaxisticker-log-colorscale
|
||||
|
||||
See the documentation of \ref QCPAxisTickerLog about the details of logarithmic axis tick
|
||||
creation.
|
||||
|
||||
\see setDataRange, setGradient
|
||||
*/
|
||||
void QCPColorScale::setDataScaleType(QCPAxis::ScaleType scaleType)
|
||||
@@ -19899,8 +19947,8 @@ void QCPColorScaleAxisRectPrivate::axisSelectableChanged(QCPAxis::SelectablePart
|
||||
/* end of 'src/layoutelements/layoutelement-colorscale.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-graph.cpp', size 73960 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-graph.cpp', size 74194 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPGraphData
|
||||
@@ -20259,7 +20307,14 @@ void QCPGraph::addData(double key, double value)
|
||||
mDataContainer->add(QCPGraphData(key, value));
|
||||
}
|
||||
|
||||
/* inherits documentation from base class */
|
||||
/*!
|
||||
Implements a selectTest specific to this plottable's point geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data
|
||||
point to \a pos.
|
||||
|
||||
\seebaseclassmethod \ref QCPAbstractPlottable::selectTest
|
||||
*/
|
||||
double QCPGraph::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty())
|
||||
@@ -20857,11 +20912,11 @@ void QCPGraph::getOptimizedLineData(QVector<QCPGraphData> *lineData, const QCPGr
|
||||
if (begin == end) return;
|
||||
|
||||
int dataCount = end-begin;
|
||||
int maxCount = std::numeric_limits<int>::max();
|
||||
int maxCount = (std::numeric_limits<int>::max)();
|
||||
if (mAdaptiveSampling)
|
||||
{
|
||||
double keyPixelSpan = qAbs(keyAxis->coordToPixel(begin->key)-keyAxis->coordToPixel((end-1)->key));
|
||||
if (2*keyPixelSpan+2 < (double)std::numeric_limits<int>::max())
|
||||
if (2*keyPixelSpan+2 < static_cast<double>((std::numeric_limits<int>::max)()))
|
||||
maxCount = 2*keyPixelSpan+2;
|
||||
}
|
||||
|
||||
@@ -20958,7 +21013,7 @@ void QCPGraph::getOptimizedScatterData(QVector<QCPGraphData> *scatterData, QCPGr
|
||||
}
|
||||
if (begin == end) return;
|
||||
int dataCount = end-begin;
|
||||
int maxCount = std::numeric_limits<int>::max();
|
||||
int maxCount = (std::numeric_limits<int>::max)();
|
||||
if (mAdaptiveSampling)
|
||||
{
|
||||
int keyPixelSpan = qAbs(keyAxis->coordToPixel(begin->key)-keyAxis->coordToPixel((end-1)->key));
|
||||
@@ -21583,7 +21638,7 @@ double QCPGraph::pointDistance(const QPointF &pixelPoint, QCPGraphDataContainer:
|
||||
return -1.0;
|
||||
|
||||
// calculate minimum distances to graph data points and find closestData iterator:
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
// determine which key range comes into question, taking selection tolerance around pos into account:
|
||||
double posKeyMin, posKeyMax, dummy;
|
||||
pixelsToCoords(pixelPoint-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy);
|
||||
@@ -21647,8 +21702,8 @@ int QCPGraph::findIndexBelowY(const QVector<QPointF> *data, double y) const
|
||||
/* end of 'src/plottables/plottable-graph.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-curve.cpp', size 63527 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-curve.cpp', size 63742 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPCurveData
|
||||
@@ -22014,7 +22069,14 @@ void QCPCurve::addData(double key, double value)
|
||||
mDataContainer->add(QCPCurveData(0.0, key, value));
|
||||
}
|
||||
|
||||
/* inherits documentation from base class */
|
||||
/*!
|
||||
Implements a selectTest specific to this plottable's point geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data
|
||||
point to \a pos.
|
||||
|
||||
\seebaseclassmethod \ref QCPAbstractPlottable::selectTest
|
||||
*/
|
||||
double QCPCurve::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty())
|
||||
@@ -23064,7 +23126,7 @@ double QCPCurve::pointDistance(const QPointF &pixelPoint, QCPCurveDataContainer:
|
||||
}
|
||||
|
||||
// calculate minimum distances to curve data points and find closestData iterator:
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
// iterate over found data points and then choose the one with the shortest distance to pos:
|
||||
QCPCurveDataContainer::const_iterator begin = mDataContainer->constBegin();
|
||||
QCPCurveDataContainer::const_iterator end = mDataContainer->constEnd();
|
||||
@@ -23096,8 +23158,8 @@ double QCPCurve::pointDistance(const QPointF &pixelPoint, QCPCurveDataContainer:
|
||||
/* end of 'src/plottables/plottable-curve.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-bars.cpp', size 43512 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-bars.cpp', size 43725 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -23844,7 +23906,14 @@ QCPDataSelection QCPBars::selectTestRect(const QRectF &rect, bool onlySelectable
|
||||
return result;
|
||||
}
|
||||
|
||||
/* inherits documentation from base class */
|
||||
/*!
|
||||
Implements a selectTest specific to this plottable's point geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data
|
||||
point to \a pos.
|
||||
|
||||
\seebaseclassmethod \ref QCPAbstractPlottable::selectTest
|
||||
*/
|
||||
double QCPBars::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
Q_UNUSED(details)
|
||||
@@ -24264,8 +24333,8 @@ void QCPBars::connectBars(QCPBars *lower, QCPBars *upper)
|
||||
/* end of 'src/plottables/plottable-bars.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-statisticalbox.cpp', size 28622 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-statisticalbox.cpp', size 28837 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPStatisticalBoxData
|
||||
@@ -24669,7 +24738,14 @@ QCPDataSelection QCPStatisticalBox::selectTestRect(const QRectF &rect, bool only
|
||||
return result;
|
||||
}
|
||||
|
||||
/* inherits documentation from base class */
|
||||
/*!
|
||||
Implements a selectTest specific to this plottable's point geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data
|
||||
point to \a pos.
|
||||
|
||||
\seebaseclassmethod \ref QCPAbstractPlottable::selectTest
|
||||
*/
|
||||
double QCPStatisticalBox::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
Q_UNUSED(details)
|
||||
@@ -24684,7 +24760,7 @@ double QCPStatisticalBox::selectTest(const QPointF &pos, bool onlySelectable, QV
|
||||
QCPStatisticalBoxDataContainer::const_iterator visibleBegin, visibleEnd;
|
||||
QCPStatisticalBoxDataContainer::const_iterator closestDataPoint = mDataContainer->constEnd();
|
||||
getVisibleDataBounds(visibleBegin, visibleEnd);
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
for (QCPStatisticalBoxDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it)
|
||||
{
|
||||
if (getQuartileBox(it).contains(pos)) // quartile box
|
||||
@@ -24919,7 +24995,7 @@ QVector<QLineF> QCPStatisticalBox::getWhiskerBarLines(QCPStatisticalBoxDataConta
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-colormap.cpp', size 47881 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPColorMapData
|
||||
@@ -26053,8 +26129,8 @@ void QCPColorMap::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const
|
||||
/* end of 'src/plottables/plottable-colormap.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-financial.cpp', size 42610 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-financial.cpp', size 42827 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPFinancialData
|
||||
@@ -26459,7 +26535,14 @@ QCPDataSelection QCPFinancial::selectTestRect(const QRectF &rect, bool onlySelec
|
||||
return result;
|
||||
}
|
||||
|
||||
/* inherits documentation from base class */
|
||||
/*!
|
||||
Implements a selectTest specific to this plottable's point geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data
|
||||
point to \a pos.
|
||||
|
||||
\seebaseclassmethod \ref QCPAbstractPlottable::selectTest
|
||||
*/
|
||||
double QCPFinancial::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
Q_UNUSED(details)
|
||||
@@ -26852,7 +26935,7 @@ double QCPFinancial::ohlcSelectTest(const QPointF &pos, const QCPFinancialDataCo
|
||||
QCPAxis *valueAxis = mValueAxis.data();
|
||||
if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return -1; }
|
||||
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
if (keyAxis->orientation() == Qt::Horizontal)
|
||||
{
|
||||
for (QCPFinancialDataContainer::const_iterator it=begin; it!=end; ++it)
|
||||
@@ -26899,7 +26982,7 @@ double QCPFinancial::candlestickSelectTest(const QPointF &pos, const QCPFinancia
|
||||
QCPAxis *valueAxis = mValueAxis.data();
|
||||
if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return -1; }
|
||||
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
if (keyAxis->orientation() == Qt::Horizontal)
|
||||
{
|
||||
for (QCPFinancialDataContainer::const_iterator it=begin; it!=end; ++it)
|
||||
@@ -27008,8 +27091,8 @@ QRectF QCPFinancial::selectionHitBox(QCPFinancialDataContainer::const_iterator i
|
||||
/* end of 'src/plottables/plottable-financial.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-errorbar.cpp', size 37355 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-errorbar.cpp', size 37570 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPErrorBarsData
|
||||
@@ -27451,7 +27534,14 @@ int QCPErrorBars::findEnd(double sortKey, bool expandedRange) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* inherits documentation from base class */
|
||||
/*!
|
||||
Implements a selectTest specific to this plottable's point geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data
|
||||
point to \a pos.
|
||||
|
||||
\seebaseclassmethod \ref QCPAbstractPlottable::selectTest
|
||||
*/
|
||||
double QCPErrorBars::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
|
||||
{
|
||||
if (!mDataPlottable) return -1;
|
||||
@@ -27870,7 +27960,7 @@ double QCPErrorBars::pointDistance(const QPointF &pixelPoint, QCPErrorBarsDataCo
|
||||
getVisibleDataBounds(begin, end, QCPDataRange(0, dataCount()));
|
||||
|
||||
// calculate minimum distances to error backbones (whiskers are ignored for speed) and find closestData iterator:
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
QVector<QLineF> backbones, whiskers;
|
||||
for (QCPErrorBarsDataContainer::const_iterator it=begin; it!=end; ++it)
|
||||
{
|
||||
@@ -27970,7 +28060,7 @@ bool QCPErrorBars::rectIntersectsLine(const QRectF &pixelRect, const QLineF &lin
|
||||
|
||||
|
||||
/* including file 'src/items/item-straightline.cpp', size 7592 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemStraightLine
|
||||
@@ -28151,7 +28241,7 @@ QPen QCPItemStraightLine::mainPen() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-line.cpp', size 8498 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemLine
|
||||
@@ -28381,8 +28471,8 @@ QPen QCPItemLine::mainPen() const
|
||||
/* end of 'src/items/item-line.cpp' */
|
||||
|
||||
|
||||
/* including file 'src/items/item-curve.cpp', size 7159 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/items/item-curve.cpp', size 7248 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemCurve
|
||||
@@ -28492,9 +28582,12 @@ double QCPItemCurve::selectTest(const QPointF &pos, bool onlySelectable, QVarian
|
||||
QPainterPath cubicPath(startVec);
|
||||
cubicPath.cubicTo(startDirVec, endDirVec, endVec);
|
||||
|
||||
QPolygonF polygon = cubicPath.toSubpathPolygons().first();
|
||||
QList<QPolygonF> polygons = cubicPath.toSubpathPolygons();
|
||||
if (polygons.isEmpty())
|
||||
return -1;
|
||||
const QPolygonF polygon = polygons.first();
|
||||
QCPVector2D p(pos);
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
for (int i=1; i<polygon.size(); ++i)
|
||||
{
|
||||
double distSqr = p.distanceSquaredToLine(polygon.at(i-1), polygon.at(i));
|
||||
@@ -28547,7 +28640,7 @@ QPen QCPItemCurve::mainPen() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-rect.cpp', size 6479 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemRect
|
||||
@@ -28704,7 +28797,7 @@ QBrush QCPItemRect::mainBrush() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-text.cpp', size 13338 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemText
|
||||
@@ -29052,7 +29145,7 @@ QBrush QCPItemText::mainBrush() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-ellipse.cpp', size 7863 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemEllipse
|
||||
@@ -29240,7 +29333,7 @@ QBrush QCPItemEllipse::mainBrush() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-pixmap.cpp', size 10615 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemPixmap
|
||||
@@ -29510,7 +29603,7 @@ QPen QCPItemPixmap::mainPen() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-tracer.cpp', size 14624 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemTracer
|
||||
@@ -29880,7 +29973,7 @@ QBrush QCPItemTracer::mainBrush() const
|
||||
|
||||
|
||||
/* including file 'src/items/item-bracket.cpp', size 10687 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPItemBracket
|
||||
|
||||
+84
-73
@@ -1,7 +1,7 @@
|
||||
/***************************************************************************
|
||||
** **
|
||||
** QCustomPlot, an easy to use, modern plotting widget for Qt **
|
||||
** Copyright (C) 2011-2017 Emanuel Eichhammer **
|
||||
** Copyright (C) 2011-2018 Emanuel Eichhammer **
|
||||
** **
|
||||
** 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 **
|
||||
@@ -19,8 +19,8 @@
|
||||
****************************************************************************
|
||||
** Author: Emanuel Eichhammer **
|
||||
** Website/Contact: http://www.qcustomplot.com/ **
|
||||
** Date: 04.09.17 **
|
||||
** Version: 2.0.0 **
|
||||
** Date: 25.06.18 **
|
||||
** Version: 2.0.1 **
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QCUSTOMPLOT_H
|
||||
@@ -112,11 +112,16 @@ class QCPColorMap;
|
||||
class QCPColorScale;
|
||||
class QCPBars;
|
||||
|
||||
/* including file 'src/global.h', size 16225 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/global.h', size 16357 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
#define QCUSTOMPLOT_VERSION_STR "2.0.1"
|
||||
#define QCUSTOMPLOT_VERSION 0x020001
|
||||
|
||||
// decl definitions for shared library compilation/usage:
|
||||
#if defined(QCUSTOMPLOT_COMPILE_LIBRARY)
|
||||
#if defined(QT_STATIC_BUILD)
|
||||
# define QCP_LIB_DECL
|
||||
#elif defined(QCUSTOMPLOT_COMPILE_LIBRARY)
|
||||
# define QCP_LIB_DECL Q_DECL_EXPORT
|
||||
#elif defined(QCUSTOMPLOT_USE_LIBRARY)
|
||||
# define QCP_LIB_DECL Q_DECL_IMPORT
|
||||
@@ -377,7 +382,7 @@ Q_DECLARE_METATYPE(QCP::SelectionType)
|
||||
|
||||
|
||||
/* including file 'src/vector2d.h', size 4928 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPVector2D
|
||||
{
|
||||
@@ -451,7 +456,7 @@ inline QDebug operator<< (QDebug d, const QCPVector2D &vec)
|
||||
|
||||
|
||||
/* including file 'src/painter.h', size 4035 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPPainter : public QPainter
|
||||
{
|
||||
@@ -510,7 +515,7 @@ Q_DECLARE_METATYPE(QCPPainter::PainterMode)
|
||||
|
||||
|
||||
/* including file 'src/paintbuffer.h', size 4958 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAbstractPaintBuffer
|
||||
{
|
||||
@@ -618,7 +623,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/layer.h', size 6885 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPLayer : public QObject
|
||||
{
|
||||
@@ -767,7 +772,7 @@ private:
|
||||
|
||||
|
||||
/* including file 'src/axis/range.h', size 5280 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPRange
|
||||
{
|
||||
@@ -884,8 +889,8 @@ inline const QCPRange operator/(const QCPRange& range, double value)
|
||||
/* end of 'src/axis/range.h' */
|
||||
|
||||
|
||||
/* including file 'src/selection.h', size 8579 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/selection.h', size 8569 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPDataRange
|
||||
{
|
||||
@@ -1062,8 +1067,8 @@ inline const QCPDataSelection operator-(const QCPDataRange& a, const QCPDataRang
|
||||
*/
|
||||
inline QDebug operator<< (QDebug d, const QCPDataRange &dataRange)
|
||||
{
|
||||
d.nospace() << "[" << dataRange.begin() << ".." << dataRange.end()-1 << "]";
|
||||
return d.space();
|
||||
d.nospace() << "QCPDataRange(" << dataRange.begin() << ", " << dataRange.end() << ")";
|
||||
return d;
|
||||
}
|
||||
|
||||
/*! \relates QCPDataSelection
|
||||
@@ -1080,7 +1085,7 @@ inline QDebug operator<< (QDebug d, const QCPDataSelection &selection)
|
||||
d << selection.dataRange(i);
|
||||
}
|
||||
d << ")";
|
||||
return d.space();
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
@@ -1089,7 +1094,7 @@ inline QDebug operator<< (QDebug d, const QCPDataSelection &selection)
|
||||
|
||||
|
||||
/* including file 'src/selectionrect.h', size 3338 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPSelectionRect : public QCPLayerable
|
||||
{
|
||||
@@ -1143,7 +1148,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/layout.h', size 14224 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPMarginGroup : public QObject
|
||||
{
|
||||
@@ -1464,7 +1469,7 @@ Q_DECLARE_METATYPE(QCPLayoutInset::InsetPlacement)
|
||||
|
||||
|
||||
/* including file 'src/lineending.h', size 4426 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPLineEnding
|
||||
{
|
||||
@@ -1527,8 +1532,8 @@ Q_DECLARE_METATYPE(QCPLineEnding::EndingStyle)
|
||||
/* end of 'src/lineending.h' */
|
||||
|
||||
|
||||
/* including file 'src/axis/axisticker.h', size 4177 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/axis/axisticker.h', size 4224 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTicker
|
||||
{
|
||||
@@ -1581,6 +1586,10 @@ protected:
|
||||
double pickClosest(double target, const QVector<double> &candidates) const;
|
||||
double getMantissa(double input, double *magnitude=0) const;
|
||||
double cleanMantissa(double input) const;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QCPAxisTicker)
|
||||
|
||||
};
|
||||
Q_DECLARE_METATYPE(QCPAxisTicker::TickStepStrategy)
|
||||
Q_DECLARE_METATYPE(QSharedPointer<QCPAxisTicker>)
|
||||
@@ -1589,7 +1598,7 @@ Q_DECLARE_METATYPE(QSharedPointer<QCPAxisTicker>)
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerdatetime.h', size 3289 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTickerDateTime : public QCPAxisTicker
|
||||
{
|
||||
@@ -1630,7 +1639,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickertime.h', size 3542 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTickerTime : public QCPAxisTicker
|
||||
{
|
||||
@@ -1682,7 +1691,7 @@ Q_DECLARE_METATYPE(QCPAxisTickerTime::TimeUnit)
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerfixed.h', size 3308 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTickerFixed : public QCPAxisTicker
|
||||
{
|
||||
@@ -1723,8 +1732,8 @@ Q_DECLARE_METATYPE(QCPAxisTickerFixed::ScaleStrategy)
|
||||
/* end of 'src/axis/axistickerfixed.h' */
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickertext.h', size 3085 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/axis/axistickertext.h', size 3090 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTickerText : public QCPAxisTicker
|
||||
{
|
||||
@@ -1737,12 +1746,12 @@ public:
|
||||
|
||||
// setters:
|
||||
void setTicks(const QMap<double, QString> &ticks);
|
||||
void setTicks(const QVector<double> &positions, const QVector<QString> labels);
|
||||
void setTicks(const QVector<double> &positions, const QVector<QString> &labels);
|
||||
void setSubTickCount(int subTicks);
|
||||
|
||||
// non-virtual methods:
|
||||
void clear();
|
||||
void addTick(double position, QString label);
|
||||
void addTick(double position, const QString &label);
|
||||
void addTicks(const QMap<double, QString> &ticks);
|
||||
void addTicks(const QVector<double> &positions, const QVector<QString> &labels);
|
||||
|
||||
@@ -1756,14 +1765,13 @@ protected:
|
||||
virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE;
|
||||
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE;
|
||||
virtual QVector<double> createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE;
|
||||
|
||||
};
|
||||
|
||||
/* end of 'src/axis/axistickertext.h' */
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerpi.h', size 3911 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTickerPi : public QCPAxisTicker
|
||||
{
|
||||
@@ -1822,7 +1830,7 @@ Q_DECLARE_METATYPE(QCPAxisTickerPi::FractionStyle)
|
||||
|
||||
|
||||
/* including file 'src/axis/axistickerlog.h', size 2663 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisTickerLog : public QCPAxisTicker
|
||||
{
|
||||
@@ -1854,8 +1862,8 @@ protected:
|
||||
/* end of 'src/axis/axistickerlog.h' */
|
||||
|
||||
|
||||
/* including file 'src/axis/axis.h', size 20634 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/axis/axis.h', size 20698 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPGrid :public QCPLayerable
|
||||
{
|
||||
@@ -2183,10 +2191,10 @@ protected:
|
||||
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
|
||||
virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE;
|
||||
// mouse events:
|
||||
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE;
|
||||
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
|
||||
virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
|
||||
|
||||
// non-virtual methods:
|
||||
void setupTickVectors();
|
||||
@@ -2283,7 +2291,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/scatterstyle.h', size 7275 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPScatterStyle
|
||||
{
|
||||
@@ -2390,7 +2398,7 @@ Q_DECLARE_METATYPE(QCPScatterStyle::ScatterShape)
|
||||
|
||||
|
||||
/* including file 'src/datacontainer.h', size 4596 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
/*! \relates QCPDataContainer
|
||||
Returns whether the sort key of \a a is less than the sort key of \a b.
|
||||
@@ -2460,7 +2468,7 @@ protected:
|
||||
// include implementation in header since it is a class template:
|
||||
|
||||
/* including file 'src/datacontainer.cpp', size 31349 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPDataContainer
|
||||
@@ -3234,8 +3242,8 @@ void QCPDataContainer<DataType>::performAutoSqueeze()
|
||||
/* end of 'src/datacontainer.h' */
|
||||
|
||||
|
||||
/* including file 'src/plottable.h', size 8312 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottable.h', size 8433 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPSelectionDecorator
|
||||
{
|
||||
@@ -3329,7 +3337,7 @@ public:
|
||||
void setSelectionDecorator(QCPSelectionDecorator *decorator);
|
||||
|
||||
// introduced virtual methods:
|
||||
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const = 0;
|
||||
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE = 0; // actually introduced in QCPLayerable as non-pure, but we want to force reimplementation for plottables
|
||||
virtual QCPPlottableInterface1D *interface1D() { return 0; }
|
||||
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const = 0;
|
||||
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const = 0;
|
||||
@@ -3392,7 +3400,7 @@ private:
|
||||
|
||||
|
||||
/* including file 'src/item.h', size 9384 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemAnchor
|
||||
{
|
||||
@@ -3577,7 +3585,7 @@ private:
|
||||
|
||||
|
||||
/* including file 'src/core.h', size 14886 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCustomPlot : public QWidget
|
||||
{
|
||||
@@ -3845,7 +3853,7 @@ Q_DECLARE_METATYPE(QCustomPlot::RefreshPriority)
|
||||
|
||||
|
||||
/* including file 'src/plottable1d.h', size 4544 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCPPlottableInterface1D
|
||||
{
|
||||
@@ -3904,8 +3912,8 @@ private:
|
||||
|
||||
// include implementation in header since it is a class template:
|
||||
|
||||
/* including file 'src/plottable1d.cpp', size 22240 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottable1d.cpp', size 22361 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////// QCPPlottableInterface1D
|
||||
@@ -4279,6 +4287,9 @@ int QCPAbstractPlottable1D<DataType>::findEnd(double sortKey, bool expandedRange
|
||||
point-like. Most subclasses will want to reimplement this method again, to provide a more
|
||||
accurate hit test based on the true data visualization geometry.
|
||||
|
||||
If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data point
|
||||
to \a pos.
|
||||
|
||||
\seebaseclassmethod
|
||||
*/
|
||||
template <class DataType>
|
||||
@@ -4290,7 +4301,7 @@ double QCPAbstractPlottable1D<DataType>::selectTest(const QPointF &pos, bool onl
|
||||
return -1;
|
||||
|
||||
QCPDataSelection selectionResult;
|
||||
double minDistSqr = std::numeric_limits<double>::max();
|
||||
double minDistSqr = (std::numeric_limits<double>::max)();
|
||||
int minDistIndex = mDataContainer->size();
|
||||
|
||||
typename QCPDataContainer<DataType>::const_iterator begin = mDataContainer->constBegin();
|
||||
@@ -4425,7 +4436,7 @@ void QCPAbstractPlottable1D<DataType>::drawPolyline(QCPPainter *painter, const Q
|
||||
|
||||
|
||||
/* including file 'src/colorgradient.h', size 6243 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPColorGradient
|
||||
{
|
||||
@@ -4508,7 +4519,7 @@ Q_DECLARE_METATYPE(QCPColorGradient::GradientPreset)
|
||||
|
||||
|
||||
/* including file 'src/selectiondecorator-bracket.h', size 4442 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPSelectionDecoratorBracket : public QCPSelectionDecorator
|
||||
{
|
||||
@@ -4577,7 +4588,7 @@ Q_DECLARE_METATYPE(QCPSelectionDecoratorBracket::BracketStyle)
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-axisrect.h', size 7507 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAxisRect : public QCPLayoutElement
|
||||
{
|
||||
@@ -4703,7 +4714,7 @@ private:
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-legend.h', size 10397 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPAbstractLegendItem : public QCPLayoutElement
|
||||
{
|
||||
@@ -4921,7 +4932,7 @@ Q_DECLARE_METATYPE(QCPLegend::SelectablePart)
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-textelement.h', size 5353 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPTextElement : public QCPLayoutElement
|
||||
{
|
||||
@@ -5008,7 +5019,7 @@ private:
|
||||
|
||||
|
||||
/* including file 'src/layoutelements/layoutelement-colorscale.h', size 5923 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
|
||||
class QCPColorScaleAxisRectPrivate : public QCPAxisRect
|
||||
@@ -5116,7 +5127,7 @@ private:
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-graph.h', size 9294 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPGraphData
|
||||
{
|
||||
@@ -5255,7 +5266,7 @@ Q_DECLARE_METATYPE(QCPGraph::LineStyle)
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-curve.h', size 7409 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPCurveData
|
||||
{
|
||||
@@ -5369,8 +5380,8 @@ Q_DECLARE_METATYPE(QCPCurve::LineStyle)
|
||||
/* end of 'src/plottables/plottable-curve.h' */
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-bars.h', size 8924 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* including file 'src/plottables/plottable-bars.h', size 8933 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPBarsGroup : public QObject
|
||||
{
|
||||
@@ -5392,7 +5403,7 @@ public:
|
||||
};
|
||||
Q_ENUMS(SpacingType)
|
||||
|
||||
QCPBarsGroup(QCustomPlot *parentPlot);
|
||||
explicit QCPBarsGroup(QCustomPlot *parentPlot);
|
||||
virtual ~QCPBarsGroup();
|
||||
|
||||
// getters:
|
||||
@@ -5558,7 +5569,7 @@ Q_DECLARE_METATYPE(QCPBars::WidthType)
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-statisticalbox.h', size 7516 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPStatisticalBoxData
|
||||
{
|
||||
@@ -5675,7 +5686,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-colormap.h', size 7070 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPColorMapData
|
||||
{
|
||||
@@ -5811,7 +5822,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-financial.h', size 8622 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPFinancialData
|
||||
{
|
||||
@@ -5950,7 +5961,7 @@ Q_DECLARE_METATYPE(QCPFinancial::ChartStyle)
|
||||
|
||||
|
||||
/* including file 'src/plottables/plottable-errorbar.h', size 7727 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPErrorBarsData
|
||||
{
|
||||
@@ -6075,7 +6086,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-straightline.h', size 3117 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemStraightLine : public QCPAbstractItem
|
||||
{
|
||||
@@ -6118,7 +6129,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-line.h', size 3407 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemLine : public QCPAbstractItem
|
||||
{
|
||||
@@ -6168,7 +6179,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-curve.h', size 3379 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemCurve : public QCPAbstractItem
|
||||
{
|
||||
@@ -6219,7 +6230,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-rect.h', size 3688 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemRect : public QCPAbstractItem
|
||||
{
|
||||
@@ -6278,7 +6289,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-text.h', size 5554 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemText : public QCPAbstractItem
|
||||
{
|
||||
@@ -6375,7 +6386,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-ellipse.h', size 3868 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemEllipse : public QCPAbstractItem
|
||||
{
|
||||
@@ -6437,7 +6448,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-pixmap.h', size 4373 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemPixmap : public QCPAbstractItem
|
||||
{
|
||||
@@ -6506,7 +6517,7 @@ protected:
|
||||
|
||||
|
||||
/* including file 'src/items/item-tracer.h', size 4762 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemTracer : public QCPAbstractItem
|
||||
{
|
||||
@@ -6592,7 +6603,7 @@ Q_DECLARE_METATYPE(QCPItemTracer::TracerStyle)
|
||||
|
||||
|
||||
/* including file 'src/items/item-bracket.h', size 3969 */
|
||||
/* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */
|
||||
/* commit ce344b3f96a62e5f652585e55f1ae7c7883cd45b 2018-06-25 01:03:39 +0200 */
|
||||
|
||||
class QCP_LIB_DECL QCPItemBracket : public QCPAbstractItem
|
||||
{
|
||||
|
||||
+17
-1
@@ -1020,7 +1020,7 @@ void GraphingWindow::showParamsDialog(int idx = -1)
|
||||
{
|
||||
dbcHandler = DBCHandler::getReference();
|
||||
|
||||
NewGraphDialog *thisDialog = new NewGraphDialog(dbcHandler);
|
||||
NewGraphDialog *thisDialog = new NewGraphDialog(dbcHandler, this);
|
||||
|
||||
if (idx > -1)
|
||||
{
|
||||
@@ -1096,7 +1096,23 @@ void GraphingWindow::createGraph(GraphParams ¶ms, bool createGraphParam)
|
||||
if (thisFrame.ID == params.ID) frameCache.append(thisFrame);
|
||||
}
|
||||
|
||||
//to fix weirdness where a graph that has no data won't be able to be edited, selected, or deleted properly
|
||||
//we'll check for the condition that there is nothing to graph and add a single dummy frame to the cache
|
||||
//that has all data bytes = 0. This allows the graph to be edited and deleted. No idea why you can't otherwise.
|
||||
if (frameCache.count() == 0)
|
||||
{
|
||||
CANFrame dummy;
|
||||
dummy.ID = params.ID;
|
||||
dummy.bus = 0;
|
||||
dummy.len = 8;
|
||||
dummy.remote = false;
|
||||
dummy.timestamp = 0;
|
||||
for (int i = 0; i < 8; i++) dummy.data[i] = 0;
|
||||
frameCache.append(dummy);
|
||||
}
|
||||
|
||||
int numEntries = frameCache.count() / params.stride;
|
||||
if (numEntries < 1) numEntries = 1; //could happen if stride is larger than frame count
|
||||
|
||||
params.x.reserve(numEntries);
|
||||
params.y.reserve(numEntries);
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
QColor color;
|
||||
QCPGraph *ref;
|
||||
QString graphName;
|
||||
DBC_SIGNAL *associatedSignal;
|
||||
//the below stuff is used for internal purposes only - code should be refactored so these can be private
|
||||
QVector<double> x, y;
|
||||
double xbias;
|
||||
|
||||
+89
-3
@@ -29,9 +29,11 @@ NewGraphDialog::NewGraphDialog(DBCHandler *handler, QWidget *parent) :
|
||||
connect(ui->txtDataLen, SIGNAL(textChanged(QString)), this, SLOT(handleDataLenUpdate()));
|
||||
connect(ui->cbIntel, SIGNAL(toggled(bool)), this, SLOT(drawBitfield()));
|
||||
connect(ui->btnCopySignal, SIGNAL(clicked(bool)), this, SLOT(copySignalToParamsUI()));
|
||||
connect(ui->cbSignals, SIGNAL(currentIndexChanged(int)), this, SLOT(drawBitfield()));
|
||||
|
||||
startBit = 0;
|
||||
dataLen = 1;
|
||||
assocSignal = nullptr;
|
||||
|
||||
loadMessages();
|
||||
|
||||
@@ -85,6 +87,56 @@ void NewGraphDialog::colorSwatchClick()
|
||||
|
||||
}
|
||||
|
||||
//check whether the current values on the left match the signal selected on the right
|
||||
void NewGraphDialog::checkSignalAgreement()
|
||||
{
|
||||
GraphParams testingParams;
|
||||
bool bAgree = true;
|
||||
bool sigSigned = false;
|
||||
DBC_SIGNAL *sig;
|
||||
DBC_MESSAGE *msg;
|
||||
|
||||
if (dbcHandler == nullptr) return;
|
||||
if (dbcHandler->getFileCount() == 0) return;
|
||||
|
||||
msg = dbcHandler->findMessage(ui->cbMessages->currentText());
|
||||
if (msg)
|
||||
{
|
||||
sig = msg->sigHandler->findSignalByName(ui->cbSignals->currentText());
|
||||
}
|
||||
|
||||
if (sig)
|
||||
{
|
||||
if (sig->valType == SIGNED_INT) sigSigned = true;
|
||||
|
||||
testingParams.ID = Utility::ParseStringToNum(ui->txtID->text());
|
||||
testingParams.bias = ui->txtBias->text().toFloat();
|
||||
testingParams.isSigned = ui->cbSigned->isChecked();
|
||||
testingParams.intelFormat = ui->cbIntel->isChecked();
|
||||
testingParams.scale = ui->txtScale->text().toFloat();
|
||||
testingParams.startBit = startBit;
|
||||
testingParams.numBits = dataLen;
|
||||
|
||||
if (testingParams.ID != msg->ID) bAgree = false;
|
||||
if (abs(testingParams.bias - sig->bias) > 0.01) bAgree = false;
|
||||
if (testingParams.isSigned != sigSigned) bAgree = false;
|
||||
if (testingParams.intelFormat != sig->intelByteOrder) bAgree = false;
|
||||
if (abs(testingParams.scale - sig->factor) > 0.01) bAgree = false;
|
||||
if (testingParams.startBit != sig->startBit) bAgree = false;
|
||||
if (testingParams.numBits != sig->signalSize) bAgree = false;
|
||||
}
|
||||
if (bAgree)
|
||||
{
|
||||
ui->lblMsgStatus->setText("Graph params match this signal");
|
||||
//assocSignal = sig;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lblMsgStatus->setText("Signal and Graph Params do not match");
|
||||
//assocSignal = nullptr; //ya done broke it, null the associated signal since the user is changing things
|
||||
}
|
||||
}
|
||||
|
||||
void NewGraphDialog::clearParams()
|
||||
{
|
||||
ui->txtID->clear();
|
||||
@@ -112,8 +164,13 @@ void NewGraphDialog::setParams(GraphParams ¶ms)
|
||||
QPalette p = ui->colorSwatch->palette();
|
||||
p.setColor(QPalette::Button, params.color);
|
||||
ui->colorSwatch->setPalette(p);
|
||||
|
||||
assocSignal = params.associatedSignal;
|
||||
|
||||
loadMessages();
|
||||
loadSignals(0);
|
||||
drawBitfield();
|
||||
checkSignalAgreement();
|
||||
}
|
||||
|
||||
void NewGraphDialog::getParams(GraphParams ¶ms)
|
||||
@@ -132,6 +189,8 @@ void NewGraphDialog::getParams(GraphParams ¶ms)
|
||||
params.startBit = startBit;
|
||||
params.numBits = dataLen;
|
||||
|
||||
params.associatedSignal = assocSignal;
|
||||
|
||||
//now catch stupidity and bring it to defaults
|
||||
if (params.mask == 0) params.mask = 0xFFFFFFFF;
|
||||
if (fabs(params.scale) < 0.00000001) params.scale = 1.0f;
|
||||
@@ -140,6 +199,7 @@ void NewGraphDialog::getParams(GraphParams ¶ms)
|
||||
|
||||
void NewGraphDialog::loadMessages()
|
||||
{
|
||||
DBC_MESSAGE *msg;
|
||||
ui->cbMessages->clear();
|
||||
if (dbcHandler == NULL) return;
|
||||
if (dbcHandler->getFileCount() == 0) return;
|
||||
@@ -147,7 +207,16 @@ void NewGraphDialog::loadMessages()
|
||||
{
|
||||
for (int x = 0; x < dbcHandler->getFileByIdx(y)->messageHandler->getCount(); x++)
|
||||
{
|
||||
ui->cbMessages->addItem(dbcHandler->getFileByIdx(y)->messageHandler->findMsgByIdx(x)->name);
|
||||
msg = dbcHandler->getFileByIdx(y)->messageHandler->findMsgByIdx(x);
|
||||
if (msg)
|
||||
{
|
||||
ui->cbMessages->addItem(msg->name);
|
||||
if (assocSignal && msg->name == assocSignal->parentMessage->name)
|
||||
{
|
||||
ui->cbMessages->setCurrentIndex(ui->cbMessages->count() -1);
|
||||
qDebug() << "Found my parent";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,13 +229,25 @@ void NewGraphDialog::loadSignals(int idx)
|
||||
//look it up based on index but by name is probably safer and this operation
|
||||
//is not time critical at all.
|
||||
DBC_MESSAGE *msg = dbcHandler->getFileByIdx(0)->messageHandler->findMsgByName(ui->cbMessages->currentText());
|
||||
DBC_SIGNAL *sig;
|
||||
|
||||
if (msg == NULL) return;
|
||||
|
||||
ui->cbSignals->clear();
|
||||
for (int x = 0; x < msg->sigHandler->getCount(); x++)
|
||||
{
|
||||
ui->cbSignals->addItem(msg->sigHandler->findSignalByIdx(x)->name);
|
||||
sig = msg->sigHandler->findSignalByIdx(x);
|
||||
if (sig)
|
||||
{
|
||||
ui->cbSignals->addItem(sig->name);
|
||||
if (assocSignal && sig->name == assocSignal->name)
|
||||
{
|
||||
ui->cbSignals->setCurrentIndex(ui->cbSignals->count() - 1);
|
||||
qDebug() << "Found me";
|
||||
}
|
||||
}
|
||||
}
|
||||
checkSignalAgreement();
|
||||
}
|
||||
|
||||
void NewGraphDialog::bitfieldClicked(int x,int y)
|
||||
@@ -175,7 +256,7 @@ void NewGraphDialog::bitfieldClicked(int x,int y)
|
||||
|
||||
qDebug() << "Clicked bit: " << bit;
|
||||
startBit = bit;
|
||||
drawBitfield();
|
||||
drawBitfield();
|
||||
}
|
||||
|
||||
void NewGraphDialog::drawBitfield()
|
||||
@@ -213,6 +294,8 @@ void NewGraphDialog::drawBitfield()
|
||||
}
|
||||
|
||||
ui->gridData->updateData((unsigned char *)&bitField, true);
|
||||
|
||||
checkSignalAgreement();
|
||||
}
|
||||
|
||||
void NewGraphDialog::handleDataLenUpdate()
|
||||
@@ -221,6 +304,7 @@ void NewGraphDialog::handleDataLenUpdate()
|
||||
if (dataLen < 1) dataLen = 1;
|
||||
if (dataLen > 63) dataLen = 63;
|
||||
drawBitfield();
|
||||
checkSignalAgreement();
|
||||
}
|
||||
|
||||
void NewGraphDialog::copySignalToParamsUI()
|
||||
@@ -242,4 +326,6 @@ void NewGraphDialog::copySignalToParamsUI()
|
||||
if (sig->valType == SIGNED_INT) ui->cbSigned->setChecked(true);
|
||||
else ui->cbSigned->setChecked(false);
|
||||
drawBitfield();
|
||||
assocSignal = sig;
|
||||
checkSignalAgreement();
|
||||
}
|
||||
|
||||
@@ -33,9 +33,11 @@ private slots:
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
void checkSignalAgreement();
|
||||
|
||||
Ui::NewGraphDialog *ui;
|
||||
DBCHandler *dbcHandler;
|
||||
DBC_SIGNAL *assocSignal;
|
||||
int startBit, dataLen;
|
||||
};
|
||||
|
||||
|
||||
@@ -241,6 +241,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblMsgStatus">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
|
||||
Reference in New Issue
Block a user