Add support to parse just a specific region of the image
Currently incomplete due to the lack of copy region in PlaYUVer frame
This commit is contained in:
1 parent
9c20af5d1a
commit
15130c8911
3 files changed
+47
-9
No files matched your search
@@ -218,15 +218,6 @@ FramePropertiesSideBar::FramePropertiesSideBar( QWidget* parent ) :
|
||||
colorsLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
|
||||
|
||||
colorsCB = new QComboBox;
|
||||
colorsCB->addItem( tr( "Red" ) );
|
||||
colorsCB->addItem( tr( "Green" ) );
|
||||
colorsCB->addItem( tr( "Blue" ) );
|
||||
colorsCB->setEnabled( false );
|
||||
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>" ) );
|
||||
|
||||
colorsCB->hide();
|
||||
colorsLabel->hide();
|
||||
|
||||
@@ -426,6 +417,16 @@ Void FramePropertiesSideBar::setData( PlaYUVerFrame* pcFrame )
|
||||
channelCB->insertItem( AlphaChannel, QIcon( ":/images/channel-alpha.png" ), "Alpha" );
|
||||
}
|
||||
channelCB->insertItem( ColorChannels, QIcon( ":/images/channel-all.png" ), "Colors" );
|
||||
|
||||
colorsCB->clear();
|
||||
colorsCB->addItem( "Red" );
|
||||
colorsCB->addItem( "Green" );
|
||||
colorsCB->addItem( "Blue" );
|
||||
colorsCB->setEnabled( false );
|
||||
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>" ) );
|
||||
colorsCB->show();
|
||||
colorsLabel->show();
|
||||
}
|
||||
@@ -436,6 +437,16 @@ Void FramePropertiesSideBar::setData( PlaYUVerFrame* pcFrame )
|
||||
channelCB->insertItem( ChromaUhannel, QIcon( ":/images/channel-red.png" ), "Chroma U" );
|
||||
channelCB->insertItem( ChromaVhannel, QIcon( ":/images/channel-green.png" ), "Chroma V" );
|
||||
channelCB->insertItem( ColorChannels, QIcon( ":/images/channel-all.png" ), "All Channels" );
|
||||
|
||||
colorsCB->clear();
|
||||
colorsCB->addItem( "Luminance" );
|
||||
colorsCB->addItem( "Chroma U" );
|
||||
colorsCB->addItem( "Chroma V" );
|
||||
colorsCB->setEnabled( false );
|
||||
colorsCB->setWhatsThis( tr( "<p>Select here the main color displayed with Colors Channel mode:"
|
||||
"<p><b>Luminance</b>: Draw the Luminance channel in the foreground.<p>"
|
||||
"<b>Chroma U</b>: Draw the Chroma U channel in the foreground.<p>"
|
||||
"<b>Chroma V</b>: Draw the Chroma V channel in the foreground.<p>" ) );
|
||||
colorsCB->show();
|
||||
colorsLabel->show();
|
||||
}
|
||||
|
||||
@@ -149,6 +149,9 @@ Void plaYUVerApp::loadFile( QString fileName )
|
||||
interfaceChild->show();
|
||||
connect( interfaceChild->getViewArea(), SIGNAL( positionChanged(const QPoint &, InputStream *) ), this,
|
||||
SLOT( updatePixelValueStatusBar(const QPoint &, InputStream *) ) );
|
||||
// connect( interfaceChild->getViewArea(), SIGNAL( selectionChanged( QRect ) ), this,
|
||||
// SLOT( updatePixelValueStatusBar(const QPoint &, InputStream *) ) );
|
||||
|
||||
interfaceChild->zoomToFit();
|
||||
interfaceChild->getViewArea()->setTool( m_appTool );
|
||||
}
|
||||
@@ -239,11 +242,33 @@ void plaYUVerApp::updateProperties()
|
||||
{
|
||||
m_pcStreamProperties->setData( m_pcCurrentSubWindow->getInputStream() );
|
||||
m_pcFrameProperties->setData( m_pcCurrentSubWindow->getInputStream()->getCurrFrame() );
|
||||
//m_pcFrameProperties->setSelection( m_pcCurrentSubWindow->getViewArea()->selectedArea() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcStreamProperties->setData( m_pcCurrentSubWindow->getInputStream() );
|
||||
m_pcFrameProperties->setData( m_pcCurrentSubWindow->getInputStream()->getCurrFrame() );
|
||||
//m_pcFrameProperties->setSelection( m_pcCurrentSubWindow->getViewArea()->selectedArea() );
|
||||
}
|
||||
}
|
||||
|
||||
void plaYUVerApp::updatePropertiesSelectedArea( QRect area )
|
||||
{
|
||||
if( m_pcCurrentSubWindow )
|
||||
{
|
||||
if( area.isNull() )
|
||||
{
|
||||
m_pcFrameProperties->setData( m_pcCurrentSubWindow->getInputStream()->getCurrFrame() );
|
||||
m_pcFrameProperties->setSelection( area );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcFrameProperties->setSelection( area );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcFrameProperties->setData( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,8 @@ private Q_SLOTS:
|
||||
|
||||
void updatePixelValueStatusBar(const QPoint & pos, InputStream* stream);
|
||||
|
||||
void updatePropertiesSelectedArea( QRect area );
|
||||
|
||||
void setAllSubWindowTool( );
|
||||
void setNavigationTool( );
|
||||
void setSelectionTool( );
|
||||
|
||||
Reference in new issue
Block a user