Change copyright and format the code using clang-format
This commit is contained in:
+22
-25
@@ -1,5 +1,5 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014-2016 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Copyright (C) 2014-2017 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -44,10 +44,9 @@ Void PlotSubWindow::definePlotColors()
|
||||
m_arrayColorList.append( Qt::darkYellow );
|
||||
}
|
||||
|
||||
PlotSubWindow::PlotSubWindow( const QString& windowTitle, QWidget * parent ) :
|
||||
SubWindowAbstract( parent, SubWindowAbstract::PLOT_SUBWINDOW )
|
||||
PlotSubWindow::PlotSubWindow( const QString& windowTitle, QWidget* parent )
|
||||
: SubWindowAbstract( parent, SubWindowAbstract::PLOT_SUBWINDOW )
|
||||
{
|
||||
|
||||
definePlotColors();
|
||||
m_iNumberPlots = 0;
|
||||
m_dScaleFactor = 1;
|
||||
@@ -94,10 +93,10 @@ PlotSubWindow::PlotSubWindow( const QString& windowTitle, QWidget * parent ) :
|
||||
m_cPlotArea->yAxis2->setVisible( true );
|
||||
m_cPlotArea->yAxis2->setTickLabels( false );
|
||||
// make left and bottom axes always transfer their ranges to right and top axes:
|
||||
connect( m_cPlotArea->xAxis, SIGNAL( rangeChanged(QCPRange) ), m_cPlotArea->xAxis2, SLOT( setRange(QCPRange) ) );
|
||||
connect( m_cPlotArea->yAxis, SIGNAL( rangeChanged(QCPRange) ), m_cPlotArea->yAxis2, SLOT( setRange(QCPRange) ) );
|
||||
connect( m_cPlotArea->xAxis, SIGNAL( rangeChanged( QCPRange ) ), m_cPlotArea->xAxis2, SLOT( setRange( QCPRange ) ) );
|
||||
connect( m_cPlotArea->yAxis, SIGNAL( rangeChanged( QCPRange ) ), m_cPlotArea->yAxis2, SLOT( setRange( QCPRange ) ) );
|
||||
|
||||
QFont legendFont = font(); // start out with MainWindow's font..
|
||||
QFont legendFont = font(); // start out with MainWindow's font..
|
||||
legendFont.setPointSize( 9 ); // and make a bit smaller for legend
|
||||
m_cPlotArea->legend->setFont( legendFont );
|
||||
m_cPlotArea->legend->setBrush( backgroundBrush );
|
||||
@@ -105,7 +104,7 @@ PlotSubWindow::PlotSubWindow( const QString& windowTitle, QWidget * parent ) :
|
||||
m_cPlotArea->legend->setBorderPen( QPen( palette().brush( QPalette::Active, QPalette::Shadow ), 1 ) );
|
||||
m_cPlotArea->legend->setVisible( false );
|
||||
|
||||
m_cPlotArea->setInteractions( QCP::iRangeZoom | QCP::iRangeDrag ); //QCP::iSelectPlottables
|
||||
m_cPlotArea->setInteractions( QCP::iRangeZoom | QCP::iRangeDrag ); // QCP::iSelectPlottables
|
||||
|
||||
m_cPlotPen.setStyle( Qt::SolidLine );
|
||||
m_cPlotPen.setColor( Qt::black );
|
||||
@@ -134,7 +133,6 @@ Void PlotSubWindow::zoomToFit()
|
||||
|
||||
Void PlotSubWindow::zoomToFactor( Double factor, QPoint center )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Void PlotSubWindow::scaleView( Double scale, QPoint center )
|
||||
@@ -144,14 +142,14 @@ Void PlotSubWindow::scaleView( Double scale, QPoint center )
|
||||
scale += 1;
|
||||
|
||||
m_dScaleFactor *= scale;
|
||||
//
|
||||
// UInt aNewAxisRange[2][2];
|
||||
// for( UInt axis = 0; axis < 2; axis++ )
|
||||
// for( UInt dim = 0; dim < 2; dim++ )
|
||||
// aNewAxisRange[axis][dim] = m_aAxisRange[axis][dim] / m_dScaleFactor;
|
||||
//
|
||||
// m_cPlotArea->xAxis->setRange( aNewAxisRange[HORIZONTAL][0], aNewAxisRange[HORIZONTAL][1] );
|
||||
// m_cPlotArea->yAxis->setRange( aNewAxisRange[VERTICAL][0], aNewAxisRange[VERTICAL][1] );
|
||||
//
|
||||
// UInt aNewAxisRange[2][2];
|
||||
// for( UInt axis = 0; axis < 2; axis++ )
|
||||
// for( UInt dim = 0; dim < 2; dim++ )
|
||||
// aNewAxisRange[axis][dim] = m_aAxisRange[axis][dim] / m_dScaleFactor;
|
||||
//
|
||||
// m_cPlotArea->xAxis->setRange( aNewAxisRange[HORIZONTAL][0], aNewAxisRange[HORIZONTAL][1] );
|
||||
// m_cPlotArea->yAxis->setRange( aNewAxisRange[VERTICAL][0], aNewAxisRange[VERTICAL][1] );
|
||||
|
||||
m_cPlotArea->xAxis->scaleRange( scale, 0 );
|
||||
m_cPlotArea->yAxis->scaleRange( scale, 0 );
|
||||
@@ -161,7 +159,7 @@ Void PlotSubWindow::scaleView( Double scale, QPoint center )
|
||||
QSize PlotSubWindow::sizeHint() const
|
||||
{
|
||||
QSize maxSize;
|
||||
QWidget *p = parentWidget();
|
||||
QWidget* p = parentWidget();
|
||||
if( p )
|
||||
{
|
||||
maxSize = p->size();
|
||||
@@ -173,8 +171,8 @@ QSize PlotSubWindow::sizeHint() const
|
||||
return sizeHint( maxSize );
|
||||
}
|
||||
|
||||
QSize PlotSubWindow::sizeHint( const QSize & maxSize ) const
|
||||
{
|
||||
QSize PlotSubWindow::sizeHint( const QSize& maxSize ) const
|
||||
{
|
||||
return maxSize * 2 / 3;
|
||||
}
|
||||
|
||||
@@ -195,23 +193,23 @@ Void PlotSubWindow::setAxisRange( PlotSubWindow::Axis eAxis, const Int& axisStar
|
||||
if( eAxis == HORIZONTAL )
|
||||
{
|
||||
m_cPlotArea->xAxis->setRange( axisStart, axisEnd );
|
||||
//horizontalScrollBar()->setRange( axisStart * 100, axisEnd * 100 );
|
||||
// horizontalScrollBar()->setRange( axisStart * 100, axisEnd * 100 );
|
||||
m_aAxisRange[HORIZONTAL][0] = axisStart;
|
||||
m_aAxisRange[HORIZONTAL][1] = axisEnd;
|
||||
}
|
||||
if( eAxis == VERTICAL )
|
||||
{
|
||||
m_cPlotArea->yAxis->setRange( axisStart, axisEnd );
|
||||
//verticalScrollBar()->setRange( axisStart * 100, axisEnd * 100 );
|
||||
// verticalScrollBar()->setRange( axisStart * 100, axisEnd * 100 );
|
||||
m_aAxisRange[VERTICAL][0] = axisStart;
|
||||
m_aAxisRange[VERTICAL][1] = axisEnd;
|
||||
}
|
||||
m_cPlotArea->replot();
|
||||
}
|
||||
|
||||
Void PlotSubWindow::addPlot( const QVector<Double> &arrayX, const QVector<Double> &arrayY, const QString& key )
|
||||
Void PlotSubWindow::addPlot( const QVector<Double>& arrayX, const QVector<Double>& arrayY, const QString& key )
|
||||
{
|
||||
QCPGraph *newPlot = m_cPlotArea->addGraph();
|
||||
QCPGraph* newPlot = m_cPlotArea->addGraph();
|
||||
QColor plotColor = m_arrayColorList.at( 0 );
|
||||
if( m_iNumberPlots < m_arrayColorList.size() )
|
||||
{
|
||||
@@ -237,4 +235,3 @@ Void PlotSubWindow::addPlot( const QVector<Double> &arrayX, const QVector<Double
|
||||
|
||||
m_iNumberPlots++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user