Merge branch 'master' into ll-devel
Conflicts: source/app/plaYUVerApp.cpp
This commit is contained in:
commit
572f2f5bc7
32 files changed
+308
-576
No files matched your search
@@ -1,15 +1,18 @@
|
|||||||
plaYUVer
|
plaYUVer
|
||||||
========
|
========
|
||||||
|
|
||||||
plaYUVer is an open-source raw video player
|
plaYUVer is an open-source video player with the following features:
|
||||||
|
- support for libavformat and libavcodec;
|
||||||
|
- support for wide range of raw video formats;
|
||||||
|
- zoom and pixel information
|
||||||
|
- API for frame processing algorithms
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Developers
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
Command line interface
|
- João Carreira (jfmcarreira@gmail.com)
|
||||||
|
- Luís Lucas (luisfrlucas@gmail.com)
|
||||||
./playuver
|
|
||||||
|
|
||||||
|
|
||||||
Install using cmake
|
Install using cmake
|
||||||
|
|||||||
+24
-1
@@ -1,4 +1,27 @@
|
|||||||
/* Input config.h file */
|
/* This file is a part of plaYUVer project
|
||||||
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file config.h.in
|
||||||
|
* \brief definition of the building options
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __CONFIG_PLAYUVER_H__
|
#ifndef __CONFIG_PLAYUVER_H__
|
||||||
#define __CONFIG_PLAYUVER_H__
|
#define __CONFIG_PLAYUVER_H__
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,8 +22,8 @@
|
|||||||
* \brief Dialog box to set the sequence resolution
|
* \brief Dialog box to set the sequence resolution
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIGURERESOLUTIONDIALOG_H__
|
#ifndef __CONFIGUREFORMATDIALOG_H__
|
||||||
#define __CONFIGURERESOLUTIONDIALOG_H__
|
#define __CONFIGUREFORMATDIALOG_H__
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@@ -127,4 +128,4 @@ private:
|
|||||||
|
|
||||||
} // NAMESPACE
|
} // NAMESPACE
|
||||||
|
|
||||||
#endif // __CONFIGURERESOLUTIONDIALOG_H__
|
#endif // __CONFIGUREFORMATDIALOG_H__
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file InputStream.cpp
|
* \file InputStream.cpp
|
||||||
* \brief Input handling
|
* \brief Input stream handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -117,17 +118,15 @@ QStringList InputStream::supportedWriteFormatsList()
|
|||||||
return formats;
|
return formats;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool InputStream::needFormatDialog( QString filename )
|
Bool InputStream::guessFormat( QString filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate )
|
||||||
{
|
{
|
||||||
|
Bool bRet = false;
|
||||||
QString fileExtension = QFileInfo( filename ).completeSuffix();
|
QString fileExtension = QFileInfo( filename ).completeSuffix();
|
||||||
if( !fileExtension.compare( QString( "yuv" ) ) )
|
if( !fileExtension.compare( QString( "yuv" ) ) )
|
||||||
{
|
{
|
||||||
return true;
|
bRet = true;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
Void InputStream::init( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate )
|
Void InputStream::init( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate )
|
||||||
@@ -185,7 +184,7 @@ Void InputStream::init( QString filename, UInt width, UInt height, Int input_for
|
|||||||
m_uiTotalFrameNum = ftell( m_pFile ) / ( frame_bytes_input );
|
m_uiTotalFrameNum = ftell( m_pFile ) / ( frame_bytes_input );
|
||||||
fseek( m_pFile, 0, SEEK_SET );
|
fseek( m_pFile, 0, SEEK_SET );
|
||||||
|
|
||||||
m_cFormatName = QString::fromUtf8("rawvideo ");
|
m_cFormatName = QString::fromUtf8("Raw Video");
|
||||||
|
|
||||||
}
|
}
|
||||||
if( !getMem1D<Pel>( &m_pInputBuffer, m_pcCurrFrame->getBytesPerFrame() ) )
|
if( !getMem1D<Pel>( &m_pInputBuffer, m_pcCurrFrame->getBytesPerFrame() ) )
|
||||||
@@ -196,7 +195,7 @@ Void InputStream::init( QString filename, UInt width, UInt height, Int input_for
|
|||||||
|
|
||||||
m_cStreamInformationString = QString( "[" );
|
m_cStreamInformationString = QString( "[" );
|
||||||
m_cStreamInformationString.append( m_cFormatName );
|
m_cStreamInformationString.append( m_cFormatName );
|
||||||
m_cStreamInformationString.append( QString("/ "));
|
m_cStreamInformationString.append( QString(" / "));
|
||||||
m_cStreamInformationString.append( PlaYUVerFrame::supportedPixelFormatList().at( m_iPixelFormat ) );
|
m_cStreamInformationString.append( PlaYUVerFrame::supportedPixelFormatList().at( m_iPixelFormat ) );
|
||||||
m_cStreamInformationString.append( "] " );
|
m_cStreamInformationString.append( "] " );
|
||||||
m_cStreamInformationString.append( QFileInfo( m_cFilename ).fileName() );
|
m_cStreamInformationString.append( QFileInfo( m_cFilename ).fileName() );
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file InputStream.h
|
* \file InputStream.h
|
||||||
* \brief Input handling
|
* \brief Input stream handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __INPUTSTREAM_H__
|
#ifndef __INPUTSTREAM_H__
|
||||||
@@ -100,6 +101,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Bool needFormatDialog( QString filename );
|
Bool needFormatDialog( QString filename );
|
||||||
|
Bool guessFormat( QString filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||||
|
|
||||||
Void init( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate );
|
Void init( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate );
|
||||||
Void close();
|
Void close();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file ModulesHandle.h
|
* \file ModulesHandle.h
|
||||||
* \brief PlaYUVer modules handle
|
* \brief PlaYUVer modules handle
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+117
-406
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVerApp project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVerApp developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,261 +23,159 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
#include "TypeDef.h"
|
#include "TypeDef.h"
|
||||||
|
|
||||||
#include "PropertiesSidebar.h"
|
#include "PropertiesSidebar.h"
|
||||||
|
|
||||||
#include "PlaYUVerFrame.h"
|
|
||||||
|
|
||||||
namespace plaYUVer
|
namespace plaYUVer
|
||||||
{
|
{
|
||||||
|
|
||||||
class PropertiesSidebarPrivate
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
PropertiesSidebarPrivate()
|
|
||||||
{
|
|
||||||
channelCB = 0;
|
|
||||||
colorsCB = 0;
|
|
||||||
renderingCB = 0;
|
|
||||||
linHistoButton = 0;
|
|
||||||
logHistoButton = 0;
|
|
||||||
fullImageButton = 0;
|
|
||||||
selectionImageButton = 0;
|
|
||||||
minInterv = 0;
|
|
||||||
maxInterv = 0;
|
|
||||||
labelMeanValue = 0;
|
|
||||||
labelPixelsValue = 0;
|
|
||||||
labelStdDevValue = 0;
|
|
||||||
labelCountValue = 0;
|
|
||||||
labelMedianValue = 0;
|
|
||||||
labelPercentileValue = 0;
|
|
||||||
sizeValueLabel = 0;
|
|
||||||
colorSpaceValueLabel = 0;
|
|
||||||
depthValueLabel = 0;
|
|
||||||
alphaValueLabel = 0;
|
|
||||||
selectionArea = QRect();
|
|
||||||
|
|
||||||
inLoadingProcess = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool inLoadingProcess;
|
|
||||||
|
|
||||||
QComboBox *channelCB;
|
|
||||||
QComboBox *colorsCB;
|
|
||||||
QComboBox *renderingCB;
|
|
||||||
|
|
||||||
QPushButton *linHistoButton;
|
|
||||||
QPushButton *logHistoButton;
|
|
||||||
QPushButton *fullImageButton;
|
|
||||||
QPushButton *selectionImageButton;
|
|
||||||
|
|
||||||
QButtonGroup *scaleButtonGroup;
|
|
||||||
QButtonGroup *renderingButtonGroup;
|
|
||||||
|
|
||||||
QSpinBox *minInterv;
|
|
||||||
QSpinBox *maxInterv;
|
|
||||||
|
|
||||||
QLabel *colorsLabel;
|
|
||||||
QLabel *labelMeanValue;
|
|
||||||
QLabel *labelPixelsValue;
|
|
||||||
QLabel *labelStdDevValue;
|
|
||||||
QLabel *labelCountValue;
|
|
||||||
QLabel *labelMedianValue;
|
|
||||||
QLabel *labelPercentileValue;
|
|
||||||
QLabel *formatValueLabel;
|
|
||||||
QLabel *sizeValueLabel;
|
|
||||||
QLabel *colorSpaceValueLabel;
|
|
||||||
QLabel *depthValueLabel;
|
|
||||||
QLabel *alphaValueLabel;
|
|
||||||
|
|
||||||
QRect selectionArea;
|
|
||||||
|
|
||||||
InputStream* m_pcStream;
|
|
||||||
PlaYUVerFrame *m_pcFrame;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Constructor
|
// StreamPropertiesSideBar
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
PropertiesSidebar::PropertiesSidebar( QWidget* parent ) :
|
StreamPropertiesSideBar::StreamPropertiesSideBar( QWidget* parent ) :
|
||||||
QWidget( parent )
|
QWidget( parent )
|
||||||
{
|
{
|
||||||
d = new PropertiesSidebarPrivate;
|
// -------------- Variables definition --------------
|
||||||
|
m_pcStream = NULL;
|
||||||
|
|
||||||
// Histogram area -----------------------------------------------------
|
// ----------------- GUI definition -----------------
|
||||||
|
|
||||||
QLabel *channelLabel = new QLabel( tr( "Channel:" ) );
|
QGridLayout *mainLayout = new QGridLayout;
|
||||||
channelLabel->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
|
|
||||||
|
|
||||||
d->channelCB = new QComboBox;
|
QLabel *formatLabel = new QLabel( tr( "File Format:" ) );
|
||||||
d->channelCB->addItem( tr( "Luminance" ) );
|
formatLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->channelCB->setItemIcon( 0, QIcon( ":/images/channel-luma.png" ) );
|
labelFormatValue = new QLabel;
|
||||||
|
labelFormatValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
d->channelCB->setWhatsThis( tr( "<p>Select here the histogram channel to display:<p>"
|
QLabel *sizeLabel = new QLabel( tr( "Size (pixels):" ) );
|
||||||
"<b>Luminance</b>: Display luminance (perceived brightness).<p>"
|
sizeLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
"<b>Red</b>: Display the red image channel.<p>"
|
labelSizeValue = new QLabel;
|
||||||
"<b>Green</b>: Display the green image channel.<p>"
|
labelSizeValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
"<b>Blue</b>: Display the blue image channel.<p>"
|
|
||||||
"<b>Alpha</b>: Display the alpha image channel. "
|
|
||||||
"This channel corresponds to the transparency value and "
|
|
||||||
"is supported by some image formats such as PNG or TIFF.<p>"
|
|
||||||
"<b>Colors</b>: Display all color channel values at "
|
|
||||||
"the same time." ) );
|
|
||||||
|
|
||||||
QString scaleWhatsThis( tr( "<p>Select here the histogram scale.<p>"
|
QLabel *colorSpaceLabel = new QLabel( tr( "Colorspace:" ) );
|
||||||
"If the image's maximal values are small, you can use the "
|
colorSpaceLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
"linear scale.<p>Logarithmic scale can be used when the maximal"
|
labelColorSpaceValue = new QLabel;
|
||||||
" values are big; if it is used, all values (small and large) "
|
labelColorSpaceValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
"will be visible on the graph." ) );
|
|
||||||
|
|
||||||
d->linHistoButton = new QPushButton;
|
QGridLayout *propertiesLayout = new QGridLayout;
|
||||||
d->linHistoButton->setToolTip( tr( "Linear" ) );
|
propertiesLayout->addWidget( formatLabel, 0, 0 );
|
||||||
d->linHistoButton->setIcon( QIcon( ":/images/histogram-lin.png" ) );
|
propertiesLayout->addWidget( labelFormatValue, 0, 1 );
|
||||||
d->linHistoButton->setWhatsThis( scaleWhatsThis );
|
propertiesLayout->addWidget( sizeLabel, 1, 0 );
|
||||||
d->linHistoButton->setCheckable( true );
|
propertiesLayout->addWidget( labelSizeValue, 1, 1 );
|
||||||
d->linHistoButton->setAutoExclusive( true );
|
propertiesLayout->addWidget( colorSpaceLabel, 2, 0 );
|
||||||
d->linHistoButton->setChecked( true );
|
propertiesLayout->addWidget( labelColorSpaceValue, 2, 1 );
|
||||||
|
|
||||||
d->logHistoButton = new QPushButton;
|
QGroupBox *propertiesGroup = new QGroupBox( tr( "Properties" ) );
|
||||||
d->logHistoButton->setToolTip( tr( "Logarithmic" ) );
|
propertiesGroup->setLayout( propertiesLayout );
|
||||||
d->logHistoButton->setIcon( QIcon( ":/images/histogram-log.png" ) );
|
mainLayout->addWidget( propertiesGroup, 6, 0, 1, 4 );
|
||||||
d->logHistoButton->setWhatsThis( scaleWhatsThis );
|
|
||||||
d->logHistoButton->setCheckable( true );
|
|
||||||
d->logHistoButton->setAutoExclusive( true );
|
|
||||||
|
|
||||||
QHBoxLayout *scaleLayout = new QHBoxLayout;
|
mainLayout->setRowStretch( 8, 10 );
|
||||||
scaleLayout->addWidget( d->linHistoButton );
|
setLayout( mainLayout );
|
||||||
scaleLayout->addWidget( d->logHistoButton );
|
setEnabled( false );
|
||||||
|
|
||||||
d->colorsLabel = new QLabel( tr( "Colors:" ) );
|
}
|
||||||
d->colorsLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
d->colorsCB = new QComboBox;
|
StreamPropertiesSideBar::~StreamPropertiesSideBar()
|
||||||
d->colorsCB->addItem( tr( "Red" ) );
|
{
|
||||||
d->colorsCB->addItem( tr( "Green" ) );
|
|
||||||
d->colorsCB->addItem( tr( "Blue" ) );
|
|
||||||
d->colorsCB->setEnabled( false );
|
|
||||||
d->colorsCB->setWhatsThis( tr( "<p>Select here the main color displayed with Colors Channel mode:"
|
|
||||||
"<p><b>Red</b>: Draw the red image channel in the foreground.<p>"
|
|
||||||
"<b>Green</b>: Draw the green image channel in the foreground.<p>"
|
|
||||||
"<b>Blue</b>: Draw the blue image channel in the foreground.<p>" ) );
|
|
||||||
|
|
||||||
d->colorsCB->hide();
|
}
|
||||||
d->colorsLabel->hide();
|
|
||||||
|
|
||||||
QString regionWhatsThis( tr( "<p>Select here from which region the histogram will be computed:"
|
QSize StreamPropertiesSideBar::sizeHint() const
|
||||||
"<p><b>Full Image</b>: Compute histogram using the full image."
|
{
|
||||||
"<p><b>Selection</b>: Compute histogram using the current image "
|
QSize isize = QSize( size().width(), size().height() );
|
||||||
"selection." ) );
|
isize += QSize( 80, 0 );
|
||||||
|
return isize;
|
||||||
|
}
|
||||||
|
|
||||||
d->fullImageButton = new QPushButton;
|
Void StreamPropertiesSideBar::setData( InputStream* pcStream )
|
||||||
d->fullImageButton->setToolTip( tr( "Full Image" ) );
|
{
|
||||||
d->fullImageButton->setIcon( QIcon( ":/images/image-full.png" ) );
|
// Clear information.
|
||||||
d->fullImageButton->setWhatsThis( regionWhatsThis );
|
labelFormatValue->clear();
|
||||||
d->fullImageButton->setCheckable( true );
|
labelSizeValue->clear();
|
||||||
d->fullImageButton->setAutoExclusive( true );
|
labelColorSpaceValue->clear();
|
||||||
d->fullImageButton->setChecked( true );
|
|
||||||
|
|
||||||
d->selectionImageButton = new QPushButton;
|
if( !pcStream || !pcStream->getCurrFrame() )
|
||||||
d->selectionImageButton->setToolTip( tr( "Selection" ) );
|
{
|
||||||
d->selectionImageButton->setIcon( QIcon( ":/images/image-selection.png" ) );
|
setEnabled( false );
|
||||||
d->selectionImageButton->setWhatsThis( regionWhatsThis );
|
return;
|
||||||
d->selectionImageButton->setCheckable( true );
|
}
|
||||||
d->selectionImageButton->setAutoExclusive( true );
|
else
|
||||||
|
{
|
||||||
|
m_pcStream = pcStream;
|
||||||
|
setEnabled( true );
|
||||||
|
|
||||||
QHBoxLayout *regionLayout = new QHBoxLayout;
|
QString value;
|
||||||
regionLayout->addWidget( d->fullImageButton );
|
labelFormatValue->setText( m_pcStream->getFormatName() );
|
||||||
regionLayout->addWidget( d->selectionImageButton );
|
uint width = m_pcStream->getWidth();
|
||||||
|
uint height = m_pcStream->getHeight();
|
||||||
|
value = QString( tr( "%1 x %2" ) ).arg( width ).arg( height );
|
||||||
|
labelSizeValue->setText( value );
|
||||||
|
value = QString( PlaYUVerFrame::supportedPixelFormatList().at( m_pcStream->getCurrFrame()->getPelFormat() ) );
|
||||||
|
labelColorSpaceValue->setText( value );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QGridLayout *topLayout = new QGridLayout;
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
topLayout->addWidget( channelLabel, 1, 0 );
|
// FramePropertiesSideBar
|
||||||
topLayout->addWidget( d->channelCB, 1, 1 );
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
topLayout->addLayout( scaleLayout, 1, 3 );
|
|
||||||
topLayout->addWidget( d->colorsLabel, 2, 0 );
|
|
||||||
topLayout->addWidget( d->colorsCB, 2, 1 );
|
|
||||||
topLayout->addLayout( regionLayout, 2, 3 );
|
|
||||||
topLayout->setColumnStretch( 2, 10 );
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
FramePropertiesSideBar::FramePropertiesSideBar( QWidget* parent ) :
|
||||||
|
QWidget( parent )
|
||||||
|
{
|
||||||
|
// -------------- Variables definition --------------
|
||||||
|
m_pcFrame = NULL;
|
||||||
|
|
||||||
QLabel *rangeLabel = new QLabel( tr( "Range:" ) );
|
// ----------------- GUI definition -----------------
|
||||||
rangeLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
d->minInterv = new QSpinBox;
|
QGridLayout *mainLayout = new QGridLayout;
|
||||||
d->minInterv->setRange( 0, 255 );
|
|
||||||
d->minInterv->setSingleStep( 1 );
|
|
||||||
d->minInterv->setValue( 0 );
|
|
||||||
d->minInterv->setWhatsThis( tr( "<p>Select here the minimal intensity "
|
|
||||||
"value of the histogram selection." ) );
|
|
||||||
|
|
||||||
d->maxInterv = new QSpinBox;
|
|
||||||
d->maxInterv->setRange( 0, 255 );
|
|
||||||
d->maxInterv->setSingleStep( 1 );
|
|
||||||
d->maxInterv->setValue( 0 );
|
|
||||||
d->minInterv->setWhatsThis( tr( "<p>Select here the maximal intensity value"
|
|
||||||
" of the histogram selection." ) );
|
|
||||||
|
|
||||||
QHBoxLayout *rangeLayout = new QHBoxLayout;
|
|
||||||
rangeLayout->addWidget( rangeLabel );
|
|
||||||
rangeLayout->addWidget( d->minInterv );
|
|
||||||
rangeLayout->addWidget( d->maxInterv );
|
|
||||||
|
|
||||||
topLayout->addLayout( rangeLayout, 4, 0, 1, 4 );
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
QLabel *pixelsLabel = new QLabel( tr( "Pixels:" ) );
|
QLabel *pixelsLabel = new QLabel( tr( "Pixels:" ) );
|
||||||
pixelsLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
pixelsLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->labelPixelsValue = new QLabel;
|
labelPixelsValue = new QLabel;
|
||||||
d->labelPixelsValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
labelPixelsValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
QLabel *countLabel = new QLabel( tr( "Selected:" ) );
|
QLabel *countLabel = new QLabel( tr( "Selected:" ) );
|
||||||
countLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
countLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->labelCountValue = new QLabel;
|
labelCountValue = new QLabel;
|
||||||
d->labelCountValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
labelCountValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
QLabel *meanLabel = new QLabel( tr( "Mean:" ) );
|
QLabel *meanLabel = new QLabel( tr( "Mean:" ) );
|
||||||
meanLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
meanLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->labelMeanValue = new QLabel;
|
labelMeanValue = new QLabel;
|
||||||
d->labelMeanValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
labelMeanValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
QLabel *stdDevLabel = new QLabel( tr( "Std. deviation:" ) );
|
QLabel *stdDevLabel = new QLabel( tr( "Std. deviation:" ) );
|
||||||
stdDevLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
stdDevLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->labelStdDevValue = new QLabel;
|
labelStdDevValue = new QLabel;
|
||||||
d->labelStdDevValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
labelStdDevValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
QLabel *medianLabel = new QLabel( tr( "Median:" ) );
|
QLabel *medianLabel = new QLabel( tr( "Median:" ) );
|
||||||
medianLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
medianLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->labelMedianValue = new QLabel;
|
labelMedianValue = new QLabel;
|
||||||
d->labelMedianValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
labelMedianValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
QLabel *percentileLabel = new QLabel( tr( "Percentile:" ) );
|
QLabel *percentileLabel = new QLabel( tr( "Percentile:" ) );
|
||||||
percentileLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
percentileLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
||||||
d->labelPercentileValue = new QLabel;
|
labelPercentileValue = new QLabel;
|
||||||
d->labelPercentileValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
labelPercentileValue->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||||
|
|
||||||
QGridLayout *statisticsLayout = new QGridLayout;
|
QGridLayout *statisticsLayout = new QGridLayout;
|
||||||
statisticsLayout->addWidget( pixelsLabel, 0, 0 );
|
statisticsLayout->addWidget( pixelsLabel, 0, 0 );
|
||||||
statisticsLayout->addWidget( d->labelPixelsValue, 0, 1 );
|
statisticsLayout->addWidget( labelPixelsValue, 0, 1 );
|
||||||
statisticsLayout->addWidget( countLabel, 1, 0 );
|
statisticsLayout->addWidget( countLabel, 1, 0 );
|
||||||
statisticsLayout->addWidget( d->labelCountValue, 1, 1 );
|
statisticsLayout->addWidget( labelCountValue, 1, 1 );
|
||||||
statisticsLayout->addWidget( meanLabel, 2, 0 );
|
statisticsLayout->addWidget( meanLabel, 2, 0 );
|
||||||
statisticsLayout->addWidget( d->labelMeanValue, 2, 1 );
|
statisticsLayout->addWidget( labelMeanValue, 2, 1 );
|
||||||
statisticsLayout->addWidget( stdDevLabel, 3, 0 );
|
statisticsLayout->addWidget( stdDevLabel, 3, 0 );
|
||||||
statisticsLayout->addWidget( d->labelStdDevValue, 3, 1 );
|
statisticsLayout->addWidget( labelStdDevValue, 3, 1 );
|
||||||
statisticsLayout->addWidget( medianLabel, 4, 0 );
|
statisticsLayout->addWidget( medianLabel, 4, 0 );
|
||||||
statisticsLayout->addWidget( d->labelMedianValue, 4, 1 );
|
statisticsLayout->addWidget( labelMedianValue, 4, 1 );
|
||||||
statisticsLayout->addWidget( percentileLabel, 5, 0 );
|
statisticsLayout->addWidget( percentileLabel, 5, 0 );
|
||||||
statisticsLayout->addWidget( d->labelPercentileValue, 5, 1 );
|
statisticsLayout->addWidget( labelPercentileValue, 5, 1 );
|
||||||
|
|
||||||
QGroupBox *statisticsGroup = new QGroupBox( tr( "Statistics" ) );
|
QGroupBox *statisticsGroup = new QGroupBox( tr( "Statistics" ) );
|
||||||
statisticsGroup->setLayout( statisticsLayout );
|
statisticsGroup->setLayout( statisticsLayout );
|
||||||
@@ -284,235 +183,47 @@ PropertiesSidebar::PropertiesSidebar( QWidget* parent ) :
|
|||||||
"selected histogram part. These values are available for all "
|
"selected histogram part. These values are available for all "
|
||||||
"channels." ) );
|
"channels." ) );
|
||||||
|
|
||||||
topLayout->addWidget( statisticsGroup, 5, 0, 1, 4 );
|
mainLayout->addWidget( statisticsGroup, 5, 0, 1, 4 );
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
|
||||||
|
|
||||||
QLabel *formatLabel = new QLabel( tr( "File Format:" ) );
|
|
||||||
formatLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
d->formatValueLabel = new QLabel;
|
|
||||||
d->formatValueLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
QLabel *sizeLabel = new QLabel( tr( "Size (pixels):" ) );
|
|
||||||
sizeLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
d->sizeValueLabel = new QLabel;
|
|
||||||
d->sizeValueLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
QLabel *colorSpaceLabel = new QLabel( tr( "Colorspace:" ) );
|
|
||||||
colorSpaceLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
d->colorSpaceValueLabel = new QLabel;
|
|
||||||
d->colorSpaceValueLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
QLabel *depthLabel = new QLabel( tr( "Color depth:" ) );
|
|
||||||
depthLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
d->depthValueLabel = new QLabel;
|
|
||||||
d->depthValueLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
QLabel *alphaLabel = new QLabel( tr( "Alpha Channel:" ) );
|
|
||||||
alphaLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
d->alphaValueLabel = new QLabel;
|
|
||||||
d->alphaValueLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
QGridLayout *propertiesLayout = new QGridLayout;
|
|
||||||
propertiesLayout->addWidget( formatLabel, 0, 0 );
|
|
||||||
propertiesLayout->addWidget( d->formatValueLabel, 0, 1 );
|
|
||||||
propertiesLayout->addWidget( sizeLabel, 1, 0 );
|
|
||||||
propertiesLayout->addWidget( d->sizeValueLabel, 1, 1 );
|
|
||||||
propertiesLayout->addWidget( colorSpaceLabel, 2, 0 );
|
|
||||||
propertiesLayout->addWidget( d->colorSpaceValueLabel, 2, 1 );
|
|
||||||
propertiesLayout->addWidget( depthLabel, 4, 0 );
|
|
||||||
propertiesLayout->addWidget( d->depthValueLabel, 4, 1 );
|
|
||||||
propertiesLayout->addWidget( alphaLabel, 5, 0 );
|
|
||||||
propertiesLayout->addWidget( d->alphaValueLabel, 5, 1 );
|
|
||||||
|
|
||||||
QGroupBox *propertiesGroup = new QGroupBox( tr( "Properties" ) );
|
|
||||||
propertiesGroup->setLayout( propertiesLayout );
|
|
||||||
topLayout->addWidget( propertiesGroup, 6, 0, 1, 4 );
|
|
||||||
|
|
||||||
topLayout->setRowStretch( 8, 10 );
|
|
||||||
|
|
||||||
setLayout( topLayout );
|
|
||||||
|
|
||||||
|
mainLayout->setRowStretch( 8, 10 );
|
||||||
|
setLayout( mainLayout );
|
||||||
setEnabled( false );
|
setEnabled( false );
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
}
|
||||||
connect( d->minInterv, SIGNAL( valueChanged (int) ), this, SLOT( slotMinValueChanged(int) ) );
|
|
||||||
connect( d->maxInterv, SIGNAL( valueChanged (int) ), this, SLOT( slotMaxValueChanged(int) ) );
|
FramePropertiesSideBar::~FramePropertiesSideBar()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
QSize FramePropertiesSideBar::sizeHint() const
|
||||||
// Destructor
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
PropertiesSidebar::~PropertiesSidebar()
|
|
||||||
{
|
{
|
||||||
// If there is a currently histogram computation when dialog is closed,
|
QSize isize = QSize( size().width(), size().height() );
|
||||||
// stop it before the d->image data are deleted automatically!
|
isize += QSize( 80, 0 );
|
||||||
delete d;
|
return isize;
|
||||||
}
|
}
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Set Data Function
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PropertiesSidebar::setData( InputStream* m_pcStream )
|
Void FramePropertiesSideBar::setData( PlaYUVerFrame* pcFrame )
|
||||||
{
|
{
|
||||||
// We might be getting duplicate events from AlbumIconView,
|
|
||||||
// which will cause all sorts of duplicate work.
|
|
||||||
// More importantly, while the loading thread can handle this pretty well,
|
|
||||||
// this will completely mess up the timing of progress info in the histogram
|
|
||||||
// widget. So filter here, before the stopHistogramComputation!
|
|
||||||
|
|
||||||
// Clear information.
|
// Clear information.
|
||||||
d->labelMeanValue->clear();
|
labelMeanValue->clear();
|
||||||
d->labelPixelsValue->clear();
|
labelPixelsValue->clear();
|
||||||
d->labelStdDevValue->clear();
|
labelStdDevValue->clear();
|
||||||
d->labelCountValue->clear();
|
labelCountValue->clear();
|
||||||
d->labelMedianValue->clear();
|
labelMedianValue->clear();
|
||||||
d->labelPercentileValue->clear();
|
labelPercentileValue->clear();
|
||||||
d->formatValueLabel->clear();
|
|
||||||
d->sizeValueLabel->clear();
|
|
||||||
d->colorSpaceValueLabel->clear();
|
|
||||||
d->depthValueLabel->clear();
|
|
||||||
d->alphaValueLabel->clear();
|
|
||||||
|
|
||||||
if( !m_pcStream || !m_pcStream->getCurrFrame() )
|
if( !pcFrame )
|
||||||
{
|
{
|
||||||
setEnabled( false );
|
setEnabled( false );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
d->m_pcStream = m_pcStream;
|
m_pcFrame = pcFrame;
|
||||||
d->m_pcFrame = m_pcStream->getCurrFrame();
|
|
||||||
|
|
||||||
if( d->m_pcFrame->getPelFormat() == PlaYUVerFrame::RGB8 && ( d->channelCB->count() == 1 ) )
|
|
||||||
{
|
|
||||||
d->channelCB->addItem( tr( "Red" ) );
|
|
||||||
d->channelCB->setItemIcon( 1, QIcon( ":/images/channel-red.png" ) );
|
|
||||||
d->channelCB->addItem( tr( "Green" ) );
|
|
||||||
d->channelCB->setItemIcon( 2, QIcon( ":/images/channel-green.png" ) );
|
|
||||||
d->channelCB->addItem( tr( "Blue" ) );
|
|
||||||
d->channelCB->setItemIcon( 3, QIcon( ":/images/channel-blue.png" ) );
|
|
||||||
|
|
||||||
d->channelCB->addItem( QIcon( ":/images/channel-all.png" ), tr( "Colors" ) );
|
|
||||||
d->colorsCB->show();
|
|
||||||
d->colorsLabel->show();
|
|
||||||
}
|
|
||||||
if( d->m_pcFrame->getPelFormat() != PlaYUVerFrame::RGB8 && ( d->channelCB->count() != 1 ) )
|
|
||||||
{
|
|
||||||
d->channelCB->clear();
|
|
||||||
d->channelCB->addItem( tr( "Luminance" ) );
|
|
||||||
d->channelCB->setItemIcon( 0, QIcon( ":/images/channel-luma.png" ) );
|
|
||||||
d->colorsCB->hide();
|
|
||||||
d->colorsLabel->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
setEnabled( true );
|
setEnabled( true );
|
||||||
|
|
||||||
if( d->m_pcFrame )
|
|
||||||
{
|
|
||||||
// If a selection area is done in Image Editor and if the current
|
|
||||||
// image is the same in Image Viewer, then compute too the histogram
|
|
||||||
// for this selection.
|
|
||||||
|
|
||||||
// d->histogramWidget->updateData( d->image.bits(),
|
|
||||||
// d->image.width(),
|
|
||||||
// d->image.height(),
|
|
||||||
// d->image.bitsPerChannel(),
|
|
||||||
// d->image.colorSpace() );
|
|
||||||
|
|
||||||
// d->maxInterv->blockSignals( true );
|
|
||||||
// if(d->image.bitsPerChannel()==16)
|
|
||||||
// d->maxInterv->setMaximum( 65535 );
|
|
||||||
// else
|
|
||||||
// d->maxInterv->setMaximum( 255 );
|
|
||||||
// d->maxInterv->blockSignals( false );
|
|
||||||
d->fullImageButton->hide();
|
|
||||||
d->selectionImageButton->hide();
|
|
||||||
updateInformations();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// SLOTS
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PropertiesSidebar::slotMinValueChanged( int min )
|
|
||||||
{
|
|
||||||
// Called when user changes values of spin box.
|
|
||||||
// Communicate the change to histogram widget.
|
|
||||||
|
|
||||||
// make the one control "push" the other
|
|
||||||
if( min == d->maxInterv->value() + 1 )
|
|
||||||
d->maxInterv->setValue( min );
|
|
||||||
|
|
||||||
d->maxInterv->setMinimum( min - 1 );
|
|
||||||
updateStatistiques();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PropertiesSidebar::slotMaxValueChanged( int max )
|
|
||||||
{
|
|
||||||
if( max == d->minInterv->value() - 1 )
|
|
||||||
d->minInterv->setValue( max );
|
|
||||||
|
|
||||||
d->minInterv->setMaximum( max + 1 );
|
|
||||||
updateStatistiques();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PropertiesSidebar::slotUpdateInterval( int min, int max )
|
|
||||||
{
|
|
||||||
// Called when value is set from within histogram widget.
|
|
||||||
// Block signals to prevent slotMinValueChanged and
|
|
||||||
// slotMaxValueChanged being called.
|
|
||||||
d->minInterv->blockSignals( true );
|
|
||||||
d->minInterv->setMaximum( max + 1 );
|
|
||||||
d->minInterv->setValue( min );
|
|
||||||
d->minInterv->blockSignals( false );
|
|
||||||
|
|
||||||
d->maxInterv->blockSignals( true );
|
|
||||||
d->maxInterv->setMinimum( min - 1 );
|
|
||||||
d->maxInterv->setValue( max );
|
|
||||||
d->maxInterv->blockSignals( false );
|
|
||||||
|
|
||||||
updateStatistiques();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PropertiesSidebar::slotUpdateIntervRange( int range )
|
|
||||||
{
|
|
||||||
d->maxInterv->blockSignals( true );
|
|
||||||
d->maxInterv->setMaximum( range );
|
|
||||||
d->maxInterv->blockSignals( false );
|
|
||||||
}
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Informations
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PropertiesSidebar::updateInformations()
|
|
||||||
{
|
|
||||||
QString value;
|
|
||||||
|
|
||||||
uint width = d->m_pcFrame->getWidth();
|
|
||||||
uint height = d->m_pcFrame->getHeight();
|
|
||||||
value = QString( tr( "%1 x %2" ) ).arg( width ).arg( height );
|
|
||||||
d->sizeValueLabel->setText( value );
|
|
||||||
|
|
||||||
d->formatValueLabel->setText( d->m_pcStream->getFormatName() );
|
|
||||||
|
|
||||||
value = QString( PlaYUVerFrame::supportedPixelFormatList().at( d->m_pcFrame->getPelFormat() ) );
|
|
||||||
d->colorSpaceValueLabel->setText( value );
|
|
||||||
|
|
||||||
}
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Statistiques
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void PropertiesSidebar::updateStatistiques()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} // NAMESPACE
|
} // NAMESPACE
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVerApp project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVerApp developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -21,9 +22,8 @@
|
|||||||
* \brief Main side bar definition
|
* \brief Main side bar definition
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __PROPERTIESSIDEBAR_H__
|
||||||
#ifndef PROPERTIESSIDEBAR_H
|
#define __PROPERTIESSIDEBAR_H__
|
||||||
#define PROPERTIESSIDEBAR_H
|
|
||||||
|
|
||||||
#if( QT_VERSION_PLAYUVER == 5 )
|
#if( QT_VERSION_PLAYUVER == 5 )
|
||||||
#include <QtWidgets>
|
#include <QtWidgets>
|
||||||
@@ -31,68 +31,53 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "InputStream.h"
|
#include "InputStream.h"
|
||||||
|
#include "PlaYUVerFrame.h"
|
||||||
class QRect;
|
|
||||||
|
|
||||||
namespace plaYUVer
|
namespace plaYUVer
|
||||||
{
|
{
|
||||||
|
|
||||||
class PropertiesSidebarPrivate;
|
class StreamPropertiesSideBar: public QWidget
|
||||||
|
|
||||||
class PropertiesSidebar: public QWidget
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
StreamPropertiesSideBar( QWidget* parent );
|
||||||
|
~StreamPropertiesSideBar();
|
||||||
|
|
||||||
PropertiesSidebar( QWidget* parent );
|
QSize sizeHint() const;
|
||||||
~PropertiesSidebar();
|
|
||||||
|
|
||||||
// void setData( SImage &img, const QRect &selectionArea = QRect() ); (Bug) Correction:
|
Void setData( InputStream* m_pcStream );
|
||||||
void setData( InputStream* m_pcStream );
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
InputStream* m_pcStream;
|
||||||
|
|
||||||
public slots:
|
QLabel* labelFormatValue;
|
||||||
|
QLabel* labelSizeValue;
|
||||||
|
QLabel* labelColorSpaceValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FramePropertiesSideBar: public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FramePropertiesSideBar( QWidget* parent );
|
||||||
|
~FramePropertiesSideBar();
|
||||||
|
|
||||||
private:
|
QSize sizeHint() const;
|
||||||
|
|
||||||
void updateInformations();
|
Void setData( PlaYUVerFrame* m_pcStream );
|
||||||
void updateStatistiques();
|
|
||||||
void setStopButton();
|
|
||||||
void setOkButton();
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
PlaYUVerFrame *m_pcFrame;
|
||||||
|
|
||||||
private slots:
|
QLabel *labelMeanValue;
|
||||||
void slotMinValueChanged( int min );
|
QLabel *labelPixelsValue;
|
||||||
void slotMaxValueChanged( int max );
|
QLabel *labelStdDevValue;
|
||||||
void slotUpdateInterval( int min, int max );
|
QLabel *labelCountValue;
|
||||||
void slotUpdateIntervRange( int range );
|
QLabel *labelMedianValue;
|
||||||
|
QLabel *labelPercentileValue;
|
||||||
private:
|
|
||||||
|
|
||||||
enum ColorChannel
|
|
||||||
{
|
|
||||||
LuminosityChannel=0,
|
|
||||||
RedChannel,
|
|
||||||
GreenChannel,
|
|
||||||
BlueChannel,
|
|
||||||
AlphaChannel,
|
|
||||||
ColorChannels
|
|
||||||
};
|
|
||||||
|
|
||||||
enum AllColorsColorType
|
|
||||||
{
|
|
||||||
AllColorsRed=0,
|
|
||||||
AllColorsGreen,
|
|
||||||
AllColorsBlue
|
|
||||||
};
|
|
||||||
|
|
||||||
PropertiesSidebarPrivate* d;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // NAMESPACE
|
} // NAMESPACE
|
||||||
|
|
||||||
#endif
|
#endif // __PROPERTIESSIDEBAR_H__
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file imageinterface.cpp
|
* \file SubWindowHandle.cpp
|
||||||
* \brief Sub windows handling
|
* \brief Sub windows handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -74,9 +75,11 @@ SubWindowHandle::~SubWindowHandle()
|
|||||||
|
|
||||||
Bool SubWindowHandle::loadFile( const QString &fileName )
|
Bool SubWindowHandle::loadFile( const QString &fileName )
|
||||||
{
|
{
|
||||||
|
UInt Width, Height, rFrameRate;
|
||||||
|
Int InputFormat;
|
||||||
ConfigureFormatDialog formatDialog( this );
|
ConfigureFormatDialog formatDialog( this );
|
||||||
|
|
||||||
if( m_pCurrStream->needFormatDialog( fileName ) )
|
if( m_pCurrStream->guessFormat( fileName, Width, Height, InputFormat, rFrameRate ) )
|
||||||
{
|
{
|
||||||
if( formatDialog.exec() == QDialog::Rejected )
|
if( formatDialog.exec() == QDialog::Rejected )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,28 +1,29 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
*
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
* 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
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* it under the terms of the GNU General Public License as published by
|
||||||
* (at your option) any later version.
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
*
|
* (at your option) any later version.
|
||||||
* This program is distributed in the hope that it will be useful,
|
*
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* This program is distributed in the hope that it will be useful,
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* GNU General Public License for more details.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
*
|
* GNU General Public License for more details.
|
||||||
* You should have received a copy of the GNU General Public License along
|
*
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* You should have received a copy of the GNU General Public License along
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
*/
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file imageinterface.h
|
* \file SubWindowHandle.h
|
||||||
* \brief Sub windows handling
|
* \brief Sub windows handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IMAGEINTERFACE_H__
|
#ifndef __SUBWINDOWHANDLE_H__
|
||||||
#define __IMAGEINTERFACE_H__
|
#define __SUBWINDOWHANDLE_H__
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@@ -147,4 +148,4 @@ public Q_SLOTS:
|
|||||||
|
|
||||||
} // NAMESPACE
|
} // NAMESPACE
|
||||||
|
|
||||||
#endif // __IMAGEINTERFACE_H__
|
#endif // __SUBWINDOWHANDLE_H__
|
||||||
+2
-14
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -111,19 +112,6 @@ typedef UChar Pel; ///< 8-bit pixel type
|
|||||||
// PlaYUVer definitions
|
// PlaYUVer definitions
|
||||||
// ====================================================================================================================
|
// ====================================================================================================================
|
||||||
|
|
||||||
enum InputStreamFormats
|
|
||||||
{
|
|
||||||
NO_FMT = -1,
|
|
||||||
YUV420p,
|
|
||||||
YUV444p,
|
|
||||||
YUV422p,
|
|
||||||
YUV411p,
|
|
||||||
YUV410p,
|
|
||||||
GRAY,
|
|
||||||
RGB8,
|
|
||||||
NUMBER_FORMATS
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ColorSpace
|
enum ColorSpace
|
||||||
{
|
{
|
||||||
COLOR_INVALID = -1,
|
COLOR_INVALID = -1,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-2
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file main.cp
|
* \file main.cpp
|
||||||
* \brief main file
|
* \brief main file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
+22
-32
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVerApp project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVerApp developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -88,11 +89,10 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
|||||||
|
|
||||||
if( mdiArea->subWindowList().size() >= 1 )
|
if( mdiArea->subWindowList().size() >= 1 )
|
||||||
{
|
{
|
||||||
QMessageBox msgBoxClose;
|
QMessageBox msgBoxClose( QMessageBox::Question, "PlaYUVer",
|
||||||
msgBoxClose.setText( "There are open files." );
|
"There are open files!", QMessageBox::Yes | QMessageBox::No, this );
|
||||||
msgBoxClose.setInformativeText( "Close all?" );
|
|
||||||
msgBoxClose.setStandardButtons( QMessageBox::Yes | QMessageBox::No );
|
|
||||||
msgBoxClose.setDefaultButton( QMessageBox::No );
|
msgBoxClose.setDefaultButton( QMessageBox::No );
|
||||||
|
msgBoxClose.setInformativeText( "Close all?" );
|
||||||
msgBoxCloseRet = msgBoxClose.exec();
|
msgBoxCloseRet = msgBoxClose.exec();
|
||||||
}
|
}
|
||||||
switch( msgBoxCloseRet )
|
switch( msgBoxCloseRet )
|
||||||
@@ -153,7 +153,7 @@ void plaYUVerApp::open()
|
|||||||
SubWindowHandle *interfaceChild = new SubWindowHandle( this ); //createSubWindow();
|
SubWindowHandle *interfaceChild = new SubWindowHandle( this ); //createSubWindow();
|
||||||
if( interfaceChild->loadFile( fileName ) )
|
if( interfaceChild->loadFile( fileName ) )
|
||||||
{
|
{
|
||||||
addSubWindow( interfaceChild );
|
mdiArea->addSubWindow( interfaceChild );
|
||||||
statusBar()->showMessage( tr( "File loaded" ), 2000 );
|
statusBar()->showMessage( tr( "File loaded" ), 2000 );
|
||||||
interfaceChild->show();
|
interfaceChild->show();
|
||||||
connect( interfaceChild->getViewArea(), SIGNAL( positionChanged(const QPoint &, InputStream *) ), this,
|
connect( interfaceChild->getViewArea(), SIGNAL( positionChanged(const QPoint &, InputStream *) ), this,
|
||||||
@@ -202,7 +202,8 @@ void plaYUVerApp::updateProperties()
|
|||||||
|
|
||||||
if( subWindow )
|
if( subWindow )
|
||||||
{
|
{
|
||||||
m_pcPropertiesSidebar->setData( subWindow->getInputStream() );
|
m_pcStreamProperties->setData( subWindow->getInputStream() );
|
||||||
|
m_pcFrameProperties->setData( subWindow->getInputStream()->getCurrFrame() );
|
||||||
//m_pcPropertiesSidebar->setSelection( iface->currentViewArea()->selectedArea() );
|
//m_pcPropertiesSidebar->setSelection( iface->currentViewArea()->selectedArea() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -372,7 +373,7 @@ void plaYUVerApp::dropEvent( QDropEvent *event )
|
|||||||
SubWindowHandle *interfaceChild = new SubWindowHandle( this ); //createSubWindow();
|
SubWindowHandle *interfaceChild = new SubWindowHandle( this ); //createSubWindow();
|
||||||
if( interfaceChild->loadFile( fileName ) )
|
if( interfaceChild->loadFile( fileName ) )
|
||||||
{
|
{
|
||||||
addSubWindow( interfaceChild );
|
mdiArea->addSubWindow( interfaceChild );
|
||||||
statusBar()->showMessage( tr( "File loaded" ), 2000 );
|
statusBar()->showMessage( tr( "File loaded" ), 2000 );
|
||||||
interfaceChild->show();
|
interfaceChild->show();
|
||||||
}
|
}
|
||||||
@@ -386,23 +387,6 @@ void plaYUVerApp::dropEvent( QDropEvent *event )
|
|||||||
|
|
||||||
// ----------------------- Gui Functions -----------------------
|
// ----------------------- Gui Functions -----------------------
|
||||||
|
|
||||||
SubWindowHandle *plaYUVerApp::createSubWindow()
|
|
||||||
{
|
|
||||||
SubWindowHandle *child = new SubWindowHandle;
|
|
||||||
mdiArea->addSubWindow( child );
|
|
||||||
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
|
|
||||||
void plaYUVerApp::addSubWindow( SubWindowHandle *child )
|
|
||||||
{
|
|
||||||
//connect( child, SIGNAL( areaSelected( QRect ) ), this, SLOT( setSelection( QRect ) ) );
|
|
||||||
|
|
||||||
// Add the interface to the mdiArea
|
|
||||||
mdiArea->addSubWindow( child );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SubWindowHandle *plaYUVerApp::activeSubWindow()
|
SubWindowHandle *plaYUVerApp::activeSubWindow()
|
||||||
{
|
{
|
||||||
if( QMdiSubWindow *activeSubWindow = mdiArea->activeSubWindow() )
|
if( QMdiSubWindow *activeSubWindow = mdiArea->activeSubWindow() )
|
||||||
@@ -730,14 +714,20 @@ Void plaYUVerApp::createToolBars()
|
|||||||
|
|
||||||
Void plaYUVerApp::createDockWidgets()
|
Void plaYUVerApp::createDockWidgets()
|
||||||
{
|
{
|
||||||
// Image Properties Dock Window
|
// Properties Dock Window
|
||||||
|
m_arraySideBars.resize( TOTAL_SIDEBAR );
|
||||||
|
|
||||||
m_pcPropertiesSidebar = new PropertiesSidebar( this );
|
m_pcStreamProperties = new StreamPropertiesSideBar( this );
|
||||||
|
m_arraySideBars[STREAM_SIDEBAR] = new QDockWidget( tr( "Stream Information" ), this );
|
||||||
|
m_arraySideBars[STREAM_SIDEBAR]->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
||||||
|
m_arraySideBars[STREAM_SIDEBAR]->setWidget( m_pcStreamProperties );
|
||||||
|
addDockWidget( Qt::RightDockWidgetArea, m_arraySideBars[STREAM_SIDEBAR] );
|
||||||
|
|
||||||
m_pcDockPropertiesSidebar = new QDockWidget( tr( "Stream Information" ), this );
|
m_pcFrameProperties = new FramePropertiesSideBar( this );
|
||||||
m_pcDockPropertiesSidebar->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
m_arraySideBars[FRAME_SIDEBAR] = new QDockWidget( tr( "Frame Information" ), this );
|
||||||
m_pcDockPropertiesSidebar->setWidget( m_pcPropertiesSidebar );
|
m_arraySideBars[FRAME_SIDEBAR]->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
||||||
addDockWidget( Qt::RightDockWidgetArea, m_pcDockPropertiesSidebar );
|
m_arraySideBars[FRAME_SIDEBAR]->setWidget( m_pcFrameProperties );
|
||||||
|
addDockWidget( Qt::RightDockWidgetArea, m_arraySideBars[FRAME_SIDEBAR] );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVerApp project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVerApp developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -114,8 +115,6 @@ private:
|
|||||||
Void readSettings();
|
Void readSettings();
|
||||||
Void writeSettings();
|
Void writeSettings();
|
||||||
|
|
||||||
Void addSubWindow( SubWindowHandle *child );
|
|
||||||
SubWindowHandle *createSubWindow();
|
|
||||||
SubWindowHandle *activeSubWindow();
|
SubWindowHandle *activeSubWindow();
|
||||||
QMdiSubWindow *findSubWindow( const QString &fileName );
|
QMdiSubWindow *findSubWindow( const QString &fileName );
|
||||||
|
|
||||||
@@ -144,8 +143,16 @@ private:
|
|||||||
};
|
};
|
||||||
QVector<QMenu*> m_arrayMenu;
|
QVector<QMenu*> m_arrayMenu;
|
||||||
|
|
||||||
PropertiesSidebar *m_pcPropertiesSidebar;
|
enum SIDEBAR_LIST
|
||||||
QDockWidget *m_pcDockPropertiesSidebar;
|
{
|
||||||
|
STREAM_SIDEBAR = 0,
|
||||||
|
FRAME_SIDEBAR,
|
||||||
|
TOTAL_SIDEBAR,
|
||||||
|
};
|
||||||
|
QVector<QDockWidget*> m_arraySideBars;
|
||||||
|
|
||||||
|
StreamPropertiesSideBar* m_pcStreamProperties;
|
||||||
|
FramePropertiesSideBar* m_pcFrameProperties;
|
||||||
|
|
||||||
QToolBar *toolbarFile;
|
QToolBar *toolbarFile;
|
||||||
QToolBar *toolbarView;
|
QToolBar *toolbarView;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -153,7 +154,7 @@ Bool LibAvContextHandle::initAvFormat( char* filename, UInt& width, UInt& height
|
|||||||
|
|
||||||
const char *codec_name = avcodec_get_name(video_dec_ctx->codec_id);
|
const char *codec_name = avcodec_get_name(video_dec_ctx->codec_id);
|
||||||
|
|
||||||
sprintf(m_acCodecName, "%s ", codec_name);
|
sprintf(m_acCodecName, "%s", codec_name);
|
||||||
|
|
||||||
Double fr = 30;
|
Double fr = 30;
|
||||||
if( video_stream->avg_frame_rate.den && video_stream->avg_frame_rate.num )
|
if( video_stream->avg_frame_rate.den && video_stream->avg_frame_rate.num )
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* This file is a part of plaYUVer project
|
/* This file is a part of plaYUVer project
|
||||||
* Copyright (C) 2014 by plaYUVer developers
|
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||||
|
* Joao Carreira (jfmcarreira@gmail.com)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Reference in new issue
Block a user