Rename some class and files
This commit is contained in:
+2
-2
@@ -48,13 +48,13 @@ set(plaYUVer_App_SRCS
|
||||
PlaYUVerApp.cpp
|
||||
PlaYUVerSubWindowHandle.cpp
|
||||
PlaYUVerMdiSubWindow.cpp
|
||||
SubWindowHandle.cpp
|
||||
SubWindowAbstract.cpp
|
||||
Settings.cpp
|
||||
# Module Video
|
||||
VideoSubWindow.cpp
|
||||
ViewArea.cpp
|
||||
VideoHandle.cpp
|
||||
FramePropertiesSidebar.cpp
|
||||
FramePropertiesDock.cpp
|
||||
# Module Quality
|
||||
QualityHandle.cpp
|
||||
QualityMeasurementSidebar.cpp
|
||||
|
||||
@@ -84,7 +84,7 @@ DialogSubWindowSelector::DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWi
|
||||
m_mapperWindowsList = new QSignalMapper( this );
|
||||
connect( m_mapperWindowsList, SIGNAL( mapped(int) ), this, SLOT( toggleSubWindow(int) ) );
|
||||
|
||||
SubWindowHandle *subWindow;
|
||||
SubWindowAbstract *subWindow;
|
||||
QString currSubWindowName;
|
||||
QCheckBox* windowCheckBox;
|
||||
m_apcSubWindowList = m_pcMainWindowManager->findSubWindow( m_uiCategory );
|
||||
@@ -143,7 +143,7 @@ Void DialogSubWindowSelector::updateSubWindowList()
|
||||
// << m_apcSelectedSubWindowList.size();
|
||||
}
|
||||
|
||||
Void DialogSubWindowSelector::selectSubWindow( SubWindowHandle * subWindow )
|
||||
Void DialogSubWindowSelector::selectSubWindow( SubWindowAbstract * subWindow )
|
||||
{
|
||||
Int iIdx = m_apcSubWindowList.indexOf( subWindow );
|
||||
if( iIdx >= 0 )
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace plaYUVer
|
||||
{
|
||||
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class SubWindowHandle;
|
||||
class SubWindowAbstract;
|
||||
|
||||
/**
|
||||
* Class to define the dialog box to select sub windows
|
||||
@@ -58,8 +58,8 @@ Q_OBJECT
|
||||
public:
|
||||
DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWindowHandle *windowManager, UInt uiCategory, Int minWindowsSelected = 1, Int maxWindowsSelected = -1 );
|
||||
|
||||
Void selectSubWindow( SubWindowHandle* subWindow );
|
||||
QList<SubWindowHandle*> getSelectedWindows()
|
||||
Void selectSubWindow( SubWindowAbstract* subWindow );
|
||||
QList<SubWindowAbstract*> getSelectedWindows()
|
||||
{
|
||||
return m_apcSelectedSubWindowList;
|
||||
}
|
||||
@@ -69,8 +69,8 @@ private:
|
||||
Int m_iMaxSlectedWindows;
|
||||
PlaYUVerSubWindowHandle* m_pcMainWindowManager;
|
||||
|
||||
QList<SubWindowHandle*> m_apcSubWindowList;
|
||||
QList<SubWindowHandle*> m_apcSelectedSubWindowList;
|
||||
QList<SubWindowAbstract*> m_apcSubWindowList;
|
||||
QList<SubWindowAbstract*> m_apcSelectedSubWindowList;
|
||||
|
||||
QSignalMapper* m_mapperWindowsList;
|
||||
QGroupBox* m_pcGroupCheckBox;
|
||||
|
||||
@@ -18,19 +18,19 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file FramePropertiesSideBar.cpp
|
||||
* \file FramePropertiesDock.cpp
|
||||
* \brief Main side bar definition
|
||||
*/
|
||||
|
||||
#include <cmath>
|
||||
#include <QtGui>
|
||||
#include <QtDebug>
|
||||
#include "FramePropertiesSidebar.h"
|
||||
#include "FramePropertiesDock.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
FramePropertiesSideBar::FramePropertiesSideBar( QWidget* parent, Bool* pbMainPlaySwitch ) :
|
||||
FramePropertiesDock::FramePropertiesDock( QWidget* parent, Bool* pbMainPlaySwitch ) :
|
||||
QWidget( parent ),
|
||||
pbMainPlaySwitch( pbMainPlaySwitch )
|
||||
{
|
||||
@@ -242,7 +242,7 @@ FramePropertiesSideBar::FramePropertiesSideBar( QWidget* parent, Bool* pbMainPla
|
||||
|
||||
}
|
||||
|
||||
FramePropertiesSideBar::~FramePropertiesSideBar()
|
||||
FramePropertiesDock::~FramePropertiesDock()
|
||||
{
|
||||
// If there is a currently histogram computation when dialog is closed,
|
||||
// stop it before the image data are deleted automatically!
|
||||
@@ -251,7 +251,7 @@ FramePropertiesSideBar::~FramePropertiesSideBar()
|
||||
delete histogramWidget;
|
||||
}
|
||||
|
||||
QSize FramePropertiesSideBar::sizeHint() const
|
||||
QSize FramePropertiesDock::sizeHint() const
|
||||
{
|
||||
QSize currSize = size();
|
||||
QSize bestSize( 180, currSize.height() );
|
||||
@@ -260,7 +260,7 @@ QSize FramePropertiesSideBar::sizeHint() const
|
||||
return currSize;
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::setData( PlaYUVerFrame* pcFrame, Bool isPlaying )
|
||||
Void FramePropertiesDock::setData( PlaYUVerFrame* pcFrame, Bool isPlaying )
|
||||
{
|
||||
m_pbIsPlaying = isPlaying;
|
||||
if( !pcFrame )
|
||||
@@ -348,7 +348,7 @@ Void FramePropertiesSideBar::setData( PlaYUVerFrame* pcFrame, Bool isPlaying )
|
||||
}
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::setSelection( const QRect &selectionArea )
|
||||
Void FramePropertiesDock::setSelection( const QRect &selectionArea )
|
||||
{
|
||||
// This is necessary to stop computation because image.bits() is
|
||||
// currently used by threaded histogram algorithm.
|
||||
@@ -376,7 +376,7 @@ Void FramePropertiesSideBar::setSelection( const QRect &selectionArea )
|
||||
}
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::updateDataHistogram()
|
||||
Void FramePropertiesDock::updateDataHistogram()
|
||||
{
|
||||
if( m_pcFrame->isValid() && isVisible() )
|
||||
{
|
||||
@@ -403,7 +403,7 @@ Void FramePropertiesSideBar::updateDataHistogram()
|
||||
}
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::updateStatistiques()
|
||||
Void FramePropertiesDock::updateStatistiques()
|
||||
{
|
||||
QString value;
|
||||
|
||||
@@ -444,7 +444,7 @@ Void FramePropertiesSideBar::updateStatistiques()
|
||||
}
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::stopHistogram()
|
||||
Void FramePropertiesDock::stopHistogram()
|
||||
{
|
||||
histogramWidget->stopHistogramComputation();
|
||||
}
|
||||
@@ -453,7 +453,7 @@ Void FramePropertiesSideBar::stopHistogram()
|
||||
// SLOTS
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Void FramePropertiesSideBar::slotRefreshOptions( int range )
|
||||
Void FramePropertiesDock::slotRefreshOptions( int range )
|
||||
{
|
||||
if( !isVisible() )
|
||||
return;
|
||||
@@ -476,12 +476,12 @@ Void FramePropertiesSideBar::slotRefreshOptions( int range )
|
||||
}
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotHistogramComputationFailed()
|
||||
Void FramePropertiesDock::slotHistogramComputationFailed()
|
||||
{
|
||||
m_pcFrame = NULL;
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotChannelChanged( Int channel )
|
||||
Void FramePropertiesDock::slotChannelChanged( Int channel )
|
||||
{
|
||||
if( m_pcFrame->getColorSpace() == PlaYUVerFrame::COLOR_YUV )
|
||||
channel += 1;
|
||||
@@ -519,13 +519,13 @@ Void FramePropertiesSideBar::slotChannelChanged( Int channel )
|
||||
updateStatistiques();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotScaleChanged( Int scale )
|
||||
Void FramePropertiesDock::slotScaleChanged( Int scale )
|
||||
{
|
||||
histogramWidget->m_scaleType = scale;
|
||||
histogramWidget->update();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotColorsChanged( Int color )
|
||||
Void FramePropertiesDock::slotColorsChanged( Int color )
|
||||
{
|
||||
switch( color )
|
||||
{
|
||||
@@ -544,14 +544,14 @@ Void FramePropertiesSideBar::slotColorsChanged( Int color )
|
||||
updateStatistiques();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotRenderingChanged( Int rendering )
|
||||
Void FramePropertiesDock::slotRenderingChanged( Int rendering )
|
||||
{
|
||||
histogramWidget->m_renderingType = rendering;
|
||||
histogramWidget->update();
|
||||
updateStatistiques();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotMinValueChanged( Int min )
|
||||
Void FramePropertiesDock::slotMinValueChanged( Int min )
|
||||
{
|
||||
// Called when user changes values of spin box.
|
||||
// Communicate the change to histogram widget.
|
||||
@@ -565,7 +565,7 @@ Void FramePropertiesSideBar::slotMinValueChanged( Int min )
|
||||
updateStatistiques();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotMaxValueChanged( Int max )
|
||||
Void FramePropertiesDock::slotMaxValueChanged( Int max )
|
||||
{
|
||||
if( max == minInterv->value() - 1 )
|
||||
minInterv->setValue( max );
|
||||
@@ -575,7 +575,7 @@ Void FramePropertiesSideBar::slotMaxValueChanged( Int max )
|
||||
updateStatistiques();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotUpdateInterval( Int min, Int max )
|
||||
Void FramePropertiesDock::slotUpdateInterval( Int min, Int max )
|
||||
{
|
||||
// Called when value is set from within histogram widget.
|
||||
// Block signals to prevent slotMinValueChanged and
|
||||
@@ -593,7 +593,7 @@ Void FramePropertiesSideBar::slotUpdateInterval( Int min, Int max )
|
||||
updateStatistiques();
|
||||
}
|
||||
|
||||
Void FramePropertiesSideBar::slotUpdateIntervRange( Int range )
|
||||
Void FramePropertiesDock::slotUpdateIntervRange( Int range )
|
||||
{
|
||||
maxInterv->blockSignals( true );
|
||||
maxInterv->setMaximum( range );
|
||||
@@ -18,12 +18,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file FramePropertiesSidebar.h
|
||||
* \file FramePropertiesDock.h
|
||||
* \brief Main side bar definition
|
||||
*/
|
||||
|
||||
#ifndef __FRAMEPROPERTIESSIDEBAR_H__
|
||||
#define __FRAMEPROPERTIESSIDEBAR_H__
|
||||
#ifndef __FRAMEPROPERTIESDOCK_H__
|
||||
#define __FRAMEPROPERTIESDOCK_H__
|
||||
|
||||
#include "config.h"
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
@@ -40,12 +40,12 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class FramePropertiesSideBar: public QWidget
|
||||
class FramePropertiesDock: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FramePropertiesSideBar( QWidget* parent, Bool* pbMainPlaySwitch );
|
||||
~FramePropertiesSideBar();
|
||||
FramePropertiesDock( QWidget* parent, Bool* pbMainPlaySwitch );
|
||||
~FramePropertiesDock();
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
@@ -132,4 +132,4 @@ private Q_SLOTS:
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
#endif // __FRAMEPROPERTIESSIDEBAR_H__
|
||||
#endif // __FRAMEPROPERTIESDOCK_H__
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <cstdio>
|
||||
#include "ModulesHandle.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "VideoSubWindow.h"
|
||||
#include "VideoHandle.h"
|
||||
#include "PlaYUVerModuleFactory.h"
|
||||
#include "DialogSubWindowSelector.h"
|
||||
@@ -251,8 +252,8 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
||||
Int numberOfFrames = pcCurrModuleIf->m_pcModule->m_uiNumberOfFrames;
|
||||
if( numberOfFrames > MODULE_REQUIRES_ONE_FRAME ) // Show dialog to select sub windows
|
||||
{
|
||||
DialogSubWindowSelector dialogWindowsSelection( m_pcParent, m_pcMainWindowManager, SubWindowHandle::VIDEO_SUBWINDOW, numberOfFrames, numberOfFrames );
|
||||
QList<SubWindowHandle*> windowsList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
DialogSubWindowSelector dialogWindowsSelection( m_pcParent, m_pcMainWindowManager, SubWindowAbstract::VIDEO_SUBWINDOW, numberOfFrames, numberOfFrames );
|
||||
QList<SubWindowAbstract*> windowsList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_SUBWINDOW );
|
||||
|
||||
if( windowsList.size() <= numberOfFrames )
|
||||
{
|
||||
@@ -269,7 +270,7 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
||||
if( dialogWindowsSelection.exec() == QDialog::Accepted )
|
||||
{
|
||||
VideoSubWindow *videoSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = dialogWindowsSelection.getSelectedWindows();
|
||||
QList<SubWindowAbstract*> subWindowList = dialogWindowsSelection.getSelectedWindows();
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
videoSubWindow = qobject_cast<VideoSubWindow*>( subWindowList.at( i ) );
|
||||
|
||||
+62
-52
@@ -19,16 +19,26 @@
|
||||
|
||||
/**
|
||||
* \file PlaYUVerApp.cpp
|
||||
* \brief Main definition of the plaYUVerApp app
|
||||
* \brief Main definition of the PlaYUVerApp app
|
||||
*/
|
||||
|
||||
#include <QtDebug>
|
||||
#include <QCloseEvent>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QActionGroup>
|
||||
#include <QAction>
|
||||
#include <QSignalMapper>
|
||||
#include "PlaYUVerApp.h"
|
||||
#ifdef USE_FERVOR
|
||||
#include "fvupdater.h"
|
||||
#endif
|
||||
#include "lib/PlaYUVerCmdParser.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
#include "VideoSubWindow.h"
|
||||
#include "VideoHandle.h"
|
||||
#include "QualityHandle.h"
|
||||
#include "ModulesHandle.h"
|
||||
@@ -39,7 +49,7 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
plaYUVerApp::plaYUVerApp() :
|
||||
PlaYUVerApp::PlaYUVerApp() :
|
||||
m_pcCurrentSubWindow( NULL ),
|
||||
m_pcCurrentVideoSubWindow( NULL ),
|
||||
m_pcAboutDialog( NULL )
|
||||
@@ -83,7 +93,7 @@ plaYUVerApp::plaYUVerApp() :
|
||||
|
||||
}
|
||||
|
||||
Bool plaYUVerApp::parseArgs( Int argc, Char *argv[] )
|
||||
Bool PlaYUVerApp::parseArgs( Int argc, Char *argv[] )
|
||||
{
|
||||
Bool bRet = false;
|
||||
m_pcCmdParser = new PlaYUVerCmdParser();
|
||||
@@ -126,19 +136,19 @@ Bool plaYUVerApp::parseArgs( Int argc, Char *argv[] )
|
||||
return bRet;
|
||||
}
|
||||
|
||||
Void plaYUVerApp::about()
|
||||
Void PlaYUVerApp::about()
|
||||
{
|
||||
if( !m_pcAboutDialog )
|
||||
m_pcAboutDialog = new AboutDialog( this );
|
||||
m_pcAboutDialog->exec();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
Void PlaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
{
|
||||
Int mayCloseAll = true;
|
||||
Int msgBoxCloseRet = QMessageBox::Yes;
|
||||
|
||||
QList<SubWindowHandle*> subWindowList = m_pcWindowHandle->findSubWindow();
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcWindowHandle->findSubWindow();
|
||||
if( subWindowList.size() >= 1 )
|
||||
{
|
||||
QMessageBox msgBoxClose( QMessageBox::Question, "PlaYUVer", "There are open files!", QMessageBox::Yes | QMessageBox::No, this );
|
||||
@@ -173,26 +183,26 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeAll()
|
||||
Void PlaYUVerApp::closeAll()
|
||||
{
|
||||
m_pcWindowHandle->removeAllSubWindow();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
Void PlaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
{
|
||||
if( !QFileInfo( fileName ).exists() )
|
||||
{
|
||||
statusBar()->showMessage( "File " + fileName + " do not exist!", 2000 );
|
||||
return;
|
||||
}
|
||||
VideoSubWindow *videoSubWindow = plaYUVerApp::findVideoStreamSubWindow( m_pcWindowHandle, fileName );
|
||||
VideoSubWindow *videoSubWindow = PlaYUVerApp::findVideoStreamSubWindow( m_pcWindowHandle, fileName );
|
||||
if( videoSubWindow )
|
||||
{
|
||||
m_pcWindowHandle->setActiveSubWindow( videoSubWindow );
|
||||
return;
|
||||
}
|
||||
videoSubWindow = new VideoSubWindow( VideoSubWindow::VIDEO_STREAM_SUBWINDOW ); //createSubWindow();
|
||||
SubWindowHandle *subWindow = videoSubWindow;
|
||||
SubWindowAbstract *subWindow = videoSubWindow;
|
||||
if( !pStreamInfo )
|
||||
{
|
||||
Int idx = findPlaYUVerStreamInfo( m_aRecentFileStreamInfo, fileName );
|
||||
@@ -216,7 +226,7 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
|
||||
connect( videoSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo, SLOT( updateSelectionArea( QRect ) ) );
|
||||
|
||||
connect( subWindow, SIGNAL( aboutToClose( SubWindowHandle* ) ), m_appModuleVideo, SLOT( closeSubWindow( SubWindowHandle* ) ) );
|
||||
connect( subWindow, SIGNAL( aboutToClose( SubWindowAbstract* ) ), m_appModuleVideo, SLOT( closeSubWindow( SubWindowAbstract* ) ) );
|
||||
connect( subWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo, SLOT( zoomToFactorAll( double, QPoint ) ) );
|
||||
connect( subWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo, SLOT( moveAllScrollBars( const QPoint ) ) );
|
||||
|
||||
@@ -246,7 +256,7 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
|
||||
// ----------------------- File Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::open()
|
||||
Void PlaYUVerApp::open()
|
||||
{
|
||||
QString supported = tr( "Supported Files (" );
|
||||
QStringList formatsList;
|
||||
@@ -282,7 +292,7 @@ Void plaYUVerApp::open()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::openRecent()
|
||||
Void PlaYUVerApp::openRecent()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction *>( sender() );
|
||||
PlaYUVerStreamInfo recentFile = action->data().value<PlaYUVerStreamInfo>();
|
||||
@@ -290,7 +300,7 @@ Void plaYUVerApp::openRecent()
|
||||
loadFile( recentFile.m_cFilename, &recentFile );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::save()
|
||||
Void PlaYUVerApp::save()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
@@ -333,7 +343,7 @@ Void plaYUVerApp::save()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::format()
|
||||
Void PlaYUVerApp::format()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
@@ -358,7 +368,7 @@ Void plaYUVerApp::format()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::reload()
|
||||
Void PlaYUVerApp::reload()
|
||||
{
|
||||
if( m_pcCurrentSubWindow )
|
||||
{
|
||||
@@ -368,17 +378,17 @@ Void plaYUVerApp::reload()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::reloadAll()
|
||||
Void PlaYUVerApp::reloadAll()
|
||||
{
|
||||
UInt windowCategoryOrder[] =
|
||||
{
|
||||
SubWindowHandle::VIDEO_STREAM_SUBWINDOW,
|
||||
SubWindowHandle::MODULE_SUBWINDOW,
|
||||
SubWindowHandle::MODULE_SUBWINDOW };
|
||||
SubWindowAbstract::VIDEO_STREAM_SUBWINDOW,
|
||||
SubWindowAbstract::MODULE_SUBWINDOW,
|
||||
SubWindowAbstract::MODULE_SUBWINDOW };
|
||||
|
||||
for( UInt c = 0; c < 3; c++ )
|
||||
{
|
||||
QList<SubWindowHandle*> subWindowList = m_pcWindowHandle->findSubWindow( windowCategoryOrder[c] );
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcWindowHandle->findSubWindow( windowCategoryOrder[c] );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
subWindowList.at( i )->refreshSubWindow();
|
||||
@@ -388,7 +398,7 @@ Void plaYUVerApp::reloadAll()
|
||||
update();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::loadAll()
|
||||
Void PlaYUVerApp::loadAll()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
@@ -398,11 +408,11 @@ Void plaYUVerApp::loadAll()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::setTool( Int idxTool )
|
||||
Void PlaYUVerApp::setTool( Int idxTool )
|
||||
{
|
||||
m_uiViewTool = idxTool;
|
||||
actionGroupTools->actions().at( m_uiViewTool )->setChecked( true );
|
||||
QList<SubWindowHandle*> subWindowList = m_pcWindowHandle->findSubWindow();
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcWindowHandle->findSubWindow();
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
subWindowList.at( i )->setTool( m_uiViewTool );
|
||||
@@ -411,7 +421,7 @@ Void plaYUVerApp::setTool( Int idxTool )
|
||||
|
||||
// ----------------------- Zoom Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::normalSize()
|
||||
Void PlaYUVerApp::normalSize()
|
||||
{
|
||||
if( m_pcCurrentSubWindow )
|
||||
{
|
||||
@@ -420,7 +430,7 @@ Void plaYUVerApp::normalSize()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::zoomToFit()
|
||||
Void PlaYUVerApp::zoomToFit()
|
||||
{
|
||||
if( m_pcCurrentSubWindow )
|
||||
{
|
||||
@@ -429,10 +439,10 @@ Void plaYUVerApp::zoomToFit()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::zoomToFitAll()
|
||||
Void PlaYUVerApp::zoomToFitAll()
|
||||
{
|
||||
VideoSubWindow *videoSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcWindowHandle->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcWindowHandle->findSubWindow( SubWindowAbstract::VIDEO_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
videoSubWindow = qobject_cast<VideoSubWindow*>( subWindowList.at( i ) );
|
||||
@@ -443,7 +453,7 @@ Void plaYUVerApp::zoomToFitAll()
|
||||
updateZoomFactorSBox();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::scaleFrame( int ratio )
|
||||
Void PlaYUVerApp::scaleFrame( int ratio )
|
||||
{
|
||||
if( m_pcCurrentSubWindow )
|
||||
{
|
||||
@@ -452,9 +462,9 @@ Void plaYUVerApp::scaleFrame( int ratio )
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::zoomFromSBox( double zoom )
|
||||
Void PlaYUVerApp::zoomFromSBox( double zoom )
|
||||
{
|
||||
SubWindowHandle *activeSubWindow = m_pcWindowHandle->activeSubWindow();
|
||||
SubWindowAbstract *activeSubWindow = m_pcWindowHandle->activeSubWindow();
|
||||
Double factor = zoom / 100;
|
||||
if( activeSubWindow )
|
||||
{
|
||||
@@ -462,7 +472,7 @@ Void plaYUVerApp::zoomFromSBox( double zoom )
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateZoomFactorSBox()
|
||||
Void PlaYUVerApp::updateZoomFactorSBox()
|
||||
{
|
||||
Double factor;
|
||||
if( m_pcCurrentSubWindow )
|
||||
@@ -474,14 +484,14 @@ Void plaYUVerApp::updateZoomFactorSBox()
|
||||
|
||||
// ----------------------- Drag and drop functions ----------------------
|
||||
|
||||
Void plaYUVerApp::dragEnterEvent( QDragEnterEvent *event )
|
||||
Void PlaYUVerApp::dragEnterEvent( QDragEnterEvent *event )
|
||||
{
|
||||
//setText(tr("<drop content>"));
|
||||
//mdiArea->setBackgroundRole( QPalette::Highlight );
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::dropEvent( QDropEvent *event )
|
||||
Void PlaYUVerApp::dropEvent( QDropEvent *event )
|
||||
{
|
||||
const QMimeData *mimeData = event->mimeData();
|
||||
QList<QUrl> urlList = mimeData->urls();
|
||||
@@ -495,11 +505,11 @@ Void plaYUVerApp::dropEvent( QDropEvent *event )
|
||||
|
||||
// ----------------------- Sub Window Functions -----------------------
|
||||
|
||||
VideoSubWindow* plaYUVerApp::findVideoStreamSubWindow( const PlaYUVerSubWindowHandle* windowManager, const QString& fileName )
|
||||
VideoSubWindow* PlaYUVerApp::findVideoStreamSubWindow( const PlaYUVerSubWindowHandle* windowManager, const QString& fileName )
|
||||
{
|
||||
QString canonicalFilePath = QFileInfo( fileName ).canonicalFilePath();
|
||||
VideoSubWindow* pcSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = windowManager->findSubWindow( SubWindowHandle::VIDEO_STREAM_SUBWINDOW );
|
||||
QList<SubWindowAbstract*> subWindowList = windowManager->findSubWindow( SubWindowAbstract::VIDEO_STREAM_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
pcSubWindow = qobject_cast<VideoSubWindow*>( subWindowList.at( i ) );
|
||||
@@ -511,9 +521,9 @@ VideoSubWindow* plaYUVerApp::findVideoStreamSubWindow( const PlaYUVerSubWindowHa
|
||||
|
||||
// ----------------------- Update Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::update()
|
||||
Void PlaYUVerApp::update()
|
||||
{
|
||||
SubWindowHandle *activeSubWindow = m_pcWindowHandle->activeSubWindow();
|
||||
SubWindowAbstract *activeSubWindow = m_pcWindowHandle->activeSubWindow();
|
||||
QCoreApplication::processEvents();
|
||||
//if( activeSubWindow() != m_pcCurrentSubWindow )
|
||||
{
|
||||
@@ -523,7 +533,7 @@ Void plaYUVerApp::update()
|
||||
{
|
||||
m_pcCurrentSubWindow = activeSubWindow;
|
||||
|
||||
if( m_pcCurrentSubWindow->getCategory() & SubWindowHandle::VIDEO_SUBWINDOW )
|
||||
if( m_pcCurrentSubWindow->getCategory() & SubWindowAbstract::VIDEO_SUBWINDOW )
|
||||
{
|
||||
m_pcCurrentVideoSubWindow = qobject_cast<VideoSubWindow*>( m_pcCurrentSubWindow );
|
||||
}
|
||||
@@ -543,7 +553,7 @@ Void plaYUVerApp::update()
|
||||
updateMenus();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateStatusBar( const QString& statusBarString )
|
||||
Void PlaYUVerApp::updateStatusBar( const QString& statusBarString )
|
||||
{
|
||||
if( !statusBarString.isEmpty() )
|
||||
{
|
||||
@@ -555,13 +565,13 @@ Void plaYUVerApp::updateStatusBar( const QString& statusBarString )
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateMenus()
|
||||
Void PlaYUVerApp::updateMenus()
|
||||
{
|
||||
Bool hasSubWindow = ( m_pcWindowHandle->activeSubWindow() != 0 );
|
||||
|
||||
Bool hasVideoStreamSubWindow = false;
|
||||
if( m_pcCurrentSubWindow )
|
||||
if( m_pcCurrentSubWindow->getCategory() & SubWindowHandle::VIDEO_STREAM_SUBWINDOW )
|
||||
if( m_pcCurrentSubWindow->getCategory() & SubWindowAbstract::VIDEO_STREAM_SUBWINDOW )
|
||||
hasVideoStreamSubWindow = true;
|
||||
|
||||
m_arrayMenu[RECENT_MENU]->setEnabled( m_aRecentFileStreamInfo.size() > 0 ? true : false );
|
||||
@@ -592,7 +602,7 @@ Void plaYUVerApp::updateMenus()
|
||||
|
||||
// ----------------------- Create Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::createActions()
|
||||
Void PlaYUVerApp::createActions()
|
||||
{
|
||||
m_arrayActions.resize( TOTAL_ACT );
|
||||
|
||||
@@ -732,7 +742,7 @@ Void plaYUVerApp::createActions()
|
||||
connect( m_arrayActions[ABOUTQT_ACT], SIGNAL( triggered() ), qApp, SLOT( aboutQt() ) );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::createMenus()
|
||||
Void PlaYUVerApp::createMenus()
|
||||
{
|
||||
m_arrayMenu.resize( TOTAL_MENUS );
|
||||
|
||||
@@ -800,7 +810,7 @@ Void plaYUVerApp::createMenus()
|
||||
|
||||
}
|
||||
|
||||
Void plaYUVerApp::createToolBars()
|
||||
Void PlaYUVerApp::createToolBars()
|
||||
{
|
||||
m_arrayToolBars.resize( TOTAL_TOOLBAR );
|
||||
|
||||
@@ -835,7 +845,7 @@ Void plaYUVerApp::createToolBars()
|
||||
|
||||
}
|
||||
|
||||
Void plaYUVerApp::createDockWidgets()
|
||||
Void PlaYUVerApp::createDockWidgets()
|
||||
{
|
||||
// Properties Dock Window
|
||||
m_arraySideBars.resize( TOTAL_DOCK );
|
||||
@@ -843,14 +853,14 @@ Void plaYUVerApp::createDockWidgets()
|
||||
addDockWidget( Qt::RightDockWidgetArea, m_appModuleQuality->createDock() );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::createStatusBar()
|
||||
Void PlaYUVerApp::createStatusBar()
|
||||
{
|
||||
//! Warning: the following widget cannot change size too much
|
||||
statusBar()->addPermanentWidget( m_appModuleVideo->createStatusBarMessage() );
|
||||
statusBar()->showMessage( tr( "Ready" ) );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::addStreamInfoToRecentList( PlaYUVerStreamInfo streamInfo )
|
||||
Void PlaYUVerApp::addStreamInfoToRecentList( PlaYUVerStreamInfo streamInfo )
|
||||
{
|
||||
Int idx = findPlaYUVerStreamInfo( m_aRecentFileStreamInfo, streamInfo.m_cFilename );
|
||||
if( idx >= 0 )
|
||||
@@ -861,7 +871,7 @@ Void plaYUVerApp::addStreamInfoToRecentList( PlaYUVerStreamInfo streamInfo )
|
||||
updateRecentFileActions();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateRecentFileActions()
|
||||
Void PlaYUVerApp::updateRecentFileActions()
|
||||
{
|
||||
Int numRecentFiles = m_aRecentFileStreamInfo.size();
|
||||
numRecentFiles = qMin( numRecentFiles, MAX_RECENT_FILES );
|
||||
@@ -884,7 +894,7 @@ Void plaYUVerApp::updateRecentFileActions()
|
||||
m_arrayMenu[RECENT_MENU]->setEnabled( m_aRecentFileStreamInfo.size() > 0 ? true : false );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::checkRecentFileActions()
|
||||
Void PlaYUVerApp::checkRecentFileActions()
|
||||
{
|
||||
Int i = 0;
|
||||
while( i < m_aRecentFileStreamInfo.size() )
|
||||
@@ -907,7 +917,7 @@ Void plaYUVerApp::checkRecentFileActions()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::readSettings()
|
||||
Void PlaYUVerApp::readSettings()
|
||||
{
|
||||
QSettings appSettings;
|
||||
|
||||
@@ -932,7 +942,7 @@ Void plaYUVerApp::readSettings()
|
||||
m_pcWindowHandle->readSettings();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::writeSettings()
|
||||
Void PlaYUVerApp::writeSettings()
|
||||
{
|
||||
QSettings appSettings;
|
||||
|
||||
|
||||
+19
-13
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file PlaYUVerApp.h
|
||||
* \ingroup PlaYUVerApp
|
||||
* \brief Main definition of the plaYUVerApp app
|
||||
* \brief Main definition of the PlaYUVerApp app
|
||||
*
|
||||
* @defgroup PlaYUVerApp PlaYUVer App (GUI)
|
||||
* @{
|
||||
@@ -37,21 +37,23 @@
|
||||
#define __PLAYUVERAPP_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <QMainWindow>
|
||||
#include <QVector>
|
||||
#include <QString>
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#ifdef USE_QTDBUS
|
||||
#include "PlaYUVerAppAdaptor.h"
|
||||
#endif
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "SubWindowHandle.h"
|
||||
#include "AboutDialog.h"
|
||||
#include "VideoSubWindow.h"
|
||||
|
||||
class QCloseEvent;
|
||||
class QDragEnterEvent;
|
||||
class QDropEvent;
|
||||
class QDoubleSpinBox;
|
||||
class QActionGroup;
|
||||
class QAction;
|
||||
class QSignalMapper;
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
@@ -62,13 +64,16 @@ class VideoHandle;
|
||||
class QualityHandle;
|
||||
class ModulesHandle;
|
||||
class PlaYUVerAppAdaptor;
|
||||
class VideoSubWindow;
|
||||
class SubWindowAbstract;
|
||||
class AboutDialog;
|
||||
|
||||
class plaYUVerApp: public QMainWindow
|
||||
class PlaYUVerApp: public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
plaYUVerApp();
|
||||
PlaYUVerApp();
|
||||
Bool parseArgs( Int argc, Char *argv[] );
|
||||
Void loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo = NULL );
|
||||
|
||||
@@ -118,7 +123,7 @@ private:
|
||||
/**
|
||||
* Save the current subwindow for every category
|
||||
*/
|
||||
SubWindowHandle* m_pcCurrentSubWindow; //!< General always set
|
||||
SubWindowAbstract* m_pcCurrentSubWindow; //!< General always set
|
||||
VideoSubWindow* m_pcCurrentVideoSubWindow;
|
||||
|
||||
QString m_cLastOpenPath;
|
||||
@@ -247,3 +252,4 @@ private:
|
||||
} // NAMESPACE
|
||||
|
||||
#endif // __PLAYUVERAPP_H__
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
PlaYUVerAppAdaptor::PlaYUVerAppAdaptor( plaYUVerApp *app ) :
|
||||
PlaYUVerAppAdaptor::PlaYUVerAppAdaptor( PlaYUVerApp *app ) :
|
||||
QDBusAbstractAdaptor( app ),
|
||||
m_app( app )
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace plaYUVer
|
||||
#define PLAYUVER_DBUS_SESSION_NAME "org.pixlra.PlaYUVer.application"
|
||||
#define PLAYUVER_DBUS_PATH "/MainApplication"
|
||||
|
||||
class plaYUVerApp;
|
||||
class PlaYUVerApp;
|
||||
|
||||
class PlaYUVerAppAdaptor: public QDBusAbstractAdaptor
|
||||
{
|
||||
@@ -46,7 +46,7 @@ Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.pixlra.PlaYUVer.application")
|
||||
Q_PROPERTY(QString activeSession READ activeSession)
|
||||
public:
|
||||
PlaYUVerAppAdaptor( plaYUVerApp *app );
|
||||
PlaYUVerAppAdaptor( PlaYUVerApp *app );
|
||||
~PlaYUVerAppAdaptor();
|
||||
/**
|
||||
* emit the exiting signal
|
||||
@@ -78,7 +78,7 @@ Q_SIGNALS:
|
||||
public:
|
||||
QString activeSession();
|
||||
private:
|
||||
plaYUVerApp *m_app;
|
||||
PlaYUVerApp *m_app;
|
||||
};
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "PlaYUVerAppModuleIf.h"
|
||||
#include "VideoSubWindow.h"
|
||||
#include "VideoSubWindow.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
* \brief Re-implementation QMdiSubWindow
|
||||
*/
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
#include "SubWindowHandle.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
@@ -38,7 +39,7 @@ QSize PlaYUVerMdiSubWindow::sizeHint() const
|
||||
QSize maxSize;
|
||||
if( parent() )
|
||||
maxSize = parentWidget()->size();
|
||||
QSize sizeHint = qobject_cast<SubWindowHandle*>( widget() )->sizeHint( maxSize );
|
||||
QSize sizeHint = qobject_cast<SubWindowAbstract*>( widget() )->sizeHint( maxSize );
|
||||
return sizeHint;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QMdiSubWindow>
|
||||
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "PlaYUVerApp.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
#include "SubWindowHandle.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
@@ -72,7 +72,7 @@ PlaYUVerSubWindowHandle::PlaYUVerSubWindowHandle( QWidget *parent ) :
|
||||
|
||||
Void PlaYUVerSubWindowHandle::resetWindowMode()
|
||||
{
|
||||
QList<SubWindowHandle*> apcSubWindowList = m_apcSubWindowList;
|
||||
QList<SubWindowAbstract*> apcSubWindowList = m_apcSubWindowList;
|
||||
|
||||
if( m_iWindowMode == NormalSubWindows )
|
||||
{
|
||||
@@ -146,7 +146,7 @@ Void PlaYUVerSubWindowHandle::setWindowMode( Int iWindowMode )
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
Void PlaYUVerSubWindowHandle::updateActiveSubWindow( SubWindowHandle *window )
|
||||
Void PlaYUVerSubWindowHandle::updateActiveSubWindow( SubWindowAbstract *window )
|
||||
{
|
||||
if( m_iWindowMode == NormalSubWindows )
|
||||
{
|
||||
@@ -164,7 +164,7 @@ Void PlaYUVerSubWindowHandle::updateActiveSubWindow( SubWindowHandle *window )
|
||||
if( mdiSubWindow )
|
||||
{
|
||||
QWidget* activeWidget = m_pcMdiArea->activeSubWindow()->widget();
|
||||
Int windowIdx = m_apcSubWindowList.indexOf( qobject_cast<SubWindowHandle *>( activeWidget ) );
|
||||
Int windowIdx = m_apcSubWindowList.indexOf( qobject_cast<SubWindowAbstract*>( activeWidget ) );
|
||||
if( windowIdx >= 0 )
|
||||
{
|
||||
m_pcActiveWindow = m_apcSubWindowList.at( windowIdx );
|
||||
@@ -180,7 +180,7 @@ Void PlaYUVerSubWindowHandle::updateActiveSubWindow( SubWindowHandle *window )
|
||||
|
||||
}
|
||||
|
||||
Void PlaYUVerSubWindowHandle::addMdiSubWindow( SubWindowHandle *window )
|
||||
Void PlaYUVerSubWindowHandle::addMdiSubWindow( SubWindowAbstract *window )
|
||||
{
|
||||
PlaYUVerMdiSubWindow* mdiSubWindow = new PlaYUVerMdiSubWindow;
|
||||
mdiSubWindow->setWidget( window );
|
||||
@@ -190,17 +190,17 @@ Void PlaYUVerSubWindowHandle::addMdiSubWindow( SubWindowHandle *window )
|
||||
connect( mdiSubWindow, SIGNAL( aboutToClose( PlaYUVerMdiSubWindow* ) ), this, SLOT( removeMdiSubWindow( PlaYUVerMdiSubWindow* ) ) );
|
||||
}
|
||||
|
||||
Void PlaYUVerSubWindowHandle::addSubWindow( SubWindowHandle *window, Qt::WindowFlags flags )
|
||||
Void PlaYUVerSubWindowHandle::addSubWindow( SubWindowAbstract *window, Qt::WindowFlags flags )
|
||||
{
|
||||
if( window )
|
||||
{
|
||||
connect( window, SIGNAL( updateStatusBar( const QString& ) ), qobject_cast<plaYUVerApp*>( parent() ), SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( window, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), qobject_cast<plaYUVerApp*>( parent() ),
|
||||
connect( window, SIGNAL( updateStatusBar( const QString& ) ), qobject_cast<PlaYUVerApp*>( parent() ), SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( window, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), qobject_cast<PlaYUVerApp*>( parent() ),
|
||||
SLOT( updateZoomFactorSBox() ) );
|
||||
if( m_iWindowMode == NormalSubWindows )
|
||||
{
|
||||
connect( window, SIGNAL( aboutToActivate( SubWindowHandle* ) ), this, SLOT( updateActiveSubWindow( SubWindowHandle* ) ) );
|
||||
connect( window, SIGNAL( aboutToClose( SubWindowHandle* ) ), this, SLOT( removeSubWindow( SubWindowHandle* ) ) );
|
||||
connect( window, SIGNAL( aboutToActivate( SubWindowAbstract* ) ), this, SLOT( updateActiveSubWindow( SubWindowAbstract* ) ) );
|
||||
connect( window, SIGNAL( aboutToClose( SubWindowAbstract* ) ), this, SLOT( removeSubWindow( SubWindowAbstract* ) ) );
|
||||
}
|
||||
if( m_iWindowMode == MdiWSubWindows )
|
||||
{
|
||||
@@ -216,7 +216,7 @@ Void PlaYUVerSubWindowHandle::removeSubWindow( Int windowIdx )
|
||||
{
|
||||
if( m_iWindowMode == NormalSubWindows )
|
||||
{
|
||||
SubWindowHandle* subWindow = m_apcSubWindowList.at( windowIdx );
|
||||
SubWindowAbstract* subWindow = m_apcSubWindowList.at( windowIdx );
|
||||
m_apcSubWindowList.removeAt( windowIdx );
|
||||
subWindow->close();
|
||||
}
|
||||
@@ -238,7 +238,7 @@ Void PlaYUVerSubWindowHandle::removeSubWindow( Int windowIdx )
|
||||
}
|
||||
}
|
||||
|
||||
Void PlaYUVerSubWindowHandle::removeSubWindow( SubWindowHandle* window )
|
||||
Void PlaYUVerSubWindowHandle::removeSubWindow( SubWindowAbstract* window )
|
||||
{
|
||||
removeSubWindow( m_apcSubWindowList.indexOf( window ) );
|
||||
}
|
||||
@@ -261,14 +261,14 @@ Void PlaYUVerSubWindowHandle::removeActiveSubWindow()
|
||||
removeSubWindow( m_pcActiveWindow );
|
||||
}
|
||||
|
||||
SubWindowHandle* PlaYUVerSubWindowHandle::activeSubWindow() const
|
||||
SubWindowAbstract* PlaYUVerSubWindowHandle::activeSubWindow() const
|
||||
{
|
||||
return m_pcActiveWindow;
|
||||
}
|
||||
|
||||
QList<SubWindowHandle*> PlaYUVerSubWindowHandle::findSubWindow( const UInt uiCategory ) const
|
||||
QList<SubWindowAbstract*> PlaYUVerSubWindowHandle::findSubWindow( const UInt uiCategory ) const
|
||||
{
|
||||
QList<SubWindowHandle*> apcSubWindowList;
|
||||
QList<SubWindowAbstract*> apcSubWindowList;
|
||||
if( uiCategory == 0 )
|
||||
{
|
||||
apcSubWindowList = m_apcSubWindowList;
|
||||
@@ -284,10 +284,10 @@ QList<SubWindowHandle*> PlaYUVerSubWindowHandle::findSubWindow( const UInt uiCat
|
||||
return apcSubWindowList;
|
||||
}
|
||||
|
||||
QList<SubWindowHandle*> PlaYUVerSubWindowHandle::findSubWindow( const QString &windowName, const UInt uiCategory ) const
|
||||
QList<SubWindowAbstract*> PlaYUVerSubWindowHandle::findSubWindow( const QString &windowName, const UInt uiCategory ) const
|
||||
{
|
||||
QList<SubWindowHandle*> subWindowList = findSubWindow( uiCategory );
|
||||
QList<SubWindowHandle*> apcSubWindowList;
|
||||
QList<SubWindowAbstract*> subWindowList = findSubWindow( uiCategory );
|
||||
QList<SubWindowAbstract*> apcSubWindowList;
|
||||
if( !windowName.isEmpty() )
|
||||
{
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
@@ -299,9 +299,9 @@ QList<SubWindowHandle*> PlaYUVerSubWindowHandle::findSubWindow( const QString &w
|
||||
return apcSubWindowList;
|
||||
}
|
||||
|
||||
SubWindowHandle* PlaYUVerSubWindowHandle::findSubWindow( const SubWindowHandle* subWindow ) const
|
||||
SubWindowAbstract* PlaYUVerSubWindowHandle::findSubWindow( const SubWindowAbstract* subWindow ) const
|
||||
{
|
||||
QList<SubWindowHandle*> subWindowList = findSubWindow();
|
||||
QList<SubWindowAbstract*> subWindowList = findSubWindow();
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
if( subWindow == subWindowList.at( i ) )
|
||||
@@ -315,7 +315,7 @@ Void PlaYUVerSubWindowHandle::setActiveSubWindow( QWidget *window )
|
||||
if( !window )
|
||||
return;
|
||||
|
||||
m_pcActiveWindow = qobject_cast<SubWindowHandle *>( window );
|
||||
m_pcActiveWindow = qobject_cast<SubWindowAbstract *>( window );
|
||||
|
||||
if( m_iWindowMode == NormalSubWindows )
|
||||
{
|
||||
@@ -453,7 +453,7 @@ Void PlaYUVerSubWindowHandle::updateMenu()
|
||||
|
||||
for( Int i = 0; i < number_windows; ++i )
|
||||
{
|
||||
SubWindowHandle *subWindow = m_apcSubWindowList.at( i );
|
||||
SubWindowAbstract *subWindow = m_apcSubWindowList.at( i );
|
||||
|
||||
QString text;
|
||||
if( i < 9 )
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class SubWindowHandle;
|
||||
class SubWindowAbstract;
|
||||
class PlaYUVerMdiArea;
|
||||
class PlaYUVerMdiSubWindow;
|
||||
|
||||
@@ -47,13 +47,13 @@ Q_OBJECT
|
||||
public:
|
||||
PlaYUVerSubWindowHandle( QWidget *parent );
|
||||
|
||||
Void addSubWindow( SubWindowHandle *widget, Qt::WindowFlags flags = 0 );
|
||||
Void addSubWindow( SubWindowAbstract *widget, Qt::WindowFlags flags = 0 );
|
||||
|
||||
SubWindowHandle *activeSubWindow() const;
|
||||
SubWindowAbstract *activeSubWindow() const;
|
||||
|
||||
QList<SubWindowHandle*> findSubWindow( const UInt uiCategory = 0 ) const;
|
||||
QList<SubWindowHandle*> findSubWindow( const QString &aName, const UInt uiCategory = 0 ) const;
|
||||
SubWindowHandle* findSubWindow( const SubWindowHandle* subWindow ) const;
|
||||
QList<SubWindowAbstract*> findSubWindow( const UInt uiCategory = 0 ) const;
|
||||
QList<SubWindowAbstract*> findSubWindow( const QString &aName, const UInt uiCategory = 0 ) const;
|
||||
SubWindowAbstract* findSubWindow( const SubWindowAbstract* subWindow ) const;
|
||||
|
||||
Void createActions();
|
||||
QMenu* createMenu();
|
||||
@@ -69,13 +69,13 @@ public:
|
||||
|
||||
private:
|
||||
Int m_iWindowMode;
|
||||
QList<SubWindowHandle*> m_apcSubWindowList;
|
||||
QList<SubWindowAbstract*> m_apcSubWindowList;
|
||||
|
||||
QHBoxLayout* m_pcWindowManagerLayout;
|
||||
PlaYUVerMdiArea* m_pcMdiArea;
|
||||
QList<PlaYUVerMdiSubWindow*> m_apcMdiSubWindowList;
|
||||
|
||||
SubWindowHandle* m_pcActiveWindow;
|
||||
SubWindowAbstract* m_pcActiveWindow;
|
||||
|
||||
QPoint m_cMdiModeWindowPosition;
|
||||
QSize m_cMdiModeWindowSize;
|
||||
@@ -102,15 +102,15 @@ private:
|
||||
/**
|
||||
* Internal functions
|
||||
*/
|
||||
Void addMdiSubWindow( SubWindowHandle *window );
|
||||
Void addMdiSubWindow( SubWindowAbstract *window );
|
||||
Void resetWindowMode();
|
||||
Void removeSubWindow( Int windowIdx );
|
||||
|
||||
public Q_SLOTS:
|
||||
void setWindowMode( int iWindowMode );
|
||||
void updateActiveSubWindow( SubWindowHandle *window = 0 );
|
||||
void updateActiveSubWindow( SubWindowAbstract *window = 0 );
|
||||
void setActiveSubWindow( QWidget *window );
|
||||
void removeSubWindow( SubWindowHandle *window );
|
||||
void removeSubWindow( SubWindowAbstract *window );
|
||||
void removeMdiSubWindow( PlaYUVerMdiSubWindow* window );
|
||||
void removeActiveSubWindow();
|
||||
void removeAllSubWindow();
|
||||
|
||||
@@ -48,7 +48,7 @@ Void PlotSubWindow::definePlotColors()
|
||||
}
|
||||
|
||||
PlotSubWindow::PlotSubWindow( const QString& windowTitle, QWidget * parent ) :
|
||||
SubWindowHandle( parent, SubWindowHandle::PLOT_SUBWINDOW )
|
||||
SubWindowAbstract( parent, SubWindowAbstract::PLOT_SUBWINDOW )
|
||||
{
|
||||
|
||||
definePlotColors();
|
||||
|
||||
+3
-3
@@ -32,14 +32,14 @@
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include "SubWindowHandle.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
|
||||
class QCustomPlot;
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class PlotSubWindow: public SubWindowHandle
|
||||
class PlotSubWindow: public SubWindowAbstract
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Virtual functions from SubWindowHandle
|
||||
* Virtual functions from SubWindowAbstract
|
||||
*/
|
||||
Void normalSize();
|
||||
Void zoomToFit();
|
||||
|
||||
@@ -117,7 +117,7 @@ Void QualityHandle::updateMenus()
|
||||
if( hasSubWindow && !hasReference )
|
||||
{
|
||||
VideoSubWindow* pcVideoSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_STREAM_SUBWINDOW );
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_STREAM_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
pcVideoSubWindow = qobject_cast<VideoSubWindow *>( subWindowList.at( i ) );
|
||||
@@ -255,7 +255,7 @@ Void QualityHandle::slotSelectCurrentAsReference()
|
||||
if( pcRefSubWindow )
|
||||
{
|
||||
VideoSubWindow* pcVideoSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
pcVideoSubWindow = qobject_cast<VideoSubWindow*>( subWindowList.at( i ) );
|
||||
@@ -305,7 +305,7 @@ Void QualityHandle::slotPlotQualitySeveral()
|
||||
}
|
||||
|
||||
VideoSubWindow* pcVideoSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_STREAM_SUBWINDOW );
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_STREAM_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
pcVideoSubWindow = qobject_cast<VideoSubWindow *>( subWindowList.at( i ) );
|
||||
|
||||
@@ -136,7 +136,7 @@ Void QualityMeasurementSidebar::updateSubWindowList()
|
||||
m_pcVideoWindowList.clear();
|
||||
|
||||
VideoSubWindow* pcVideoSubWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
pcVideoSubWindow = qobject_cast<VideoSubWindow*>( subWindowList.at( i ) );
|
||||
|
||||
@@ -18,16 +18,21 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SubWindowHandle.cpp
|
||||
* \brief Sub windows handling
|
||||
* \file SubWindowAbstract.cpp
|
||||
* \brief Abstract class to handle subwindows
|
||||
*/
|
||||
|
||||
#include "SubWindowHandle.h"
|
||||
#include <QFocusEvent>
|
||||
#include <QCloseEvent>
|
||||
#include <QScrollBar>
|
||||
#include <QIcon>
|
||||
#include "SubWindowAbstract.h"
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
SubWindowHandle::SubWindowHandle( QWidget * parent, UInt category ) :
|
||||
SubWindowAbstract::SubWindowAbstract( QWidget * parent, UInt category ) :
|
||||
QScrollArea( parent ),
|
||||
m_cSubWindow( NULL )
|
||||
{
|
||||
@@ -52,22 +57,22 @@ SubWindowHandle::SubWindowHandle( QWidget * parent, UInt category ) :
|
||||
connect(this, SIGNAL(destroyed()), this, SLOT(onDestroyed()));
|
||||
}
|
||||
|
||||
void SubWindowHandle::onDestroyed()
|
||||
void SubWindowAbstract::onDestroyed()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SubWindowHandle::~SubWindowHandle()
|
||||
SubWindowAbstract::~SubWindowAbstract()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QSize SubWindowHandle::getScrollSize()
|
||||
QSize SubWindowAbstract::getScrollSize()
|
||||
{
|
||||
return QSize( viewport()->size().width() - 5, viewport()->size().height() - 5 );
|
||||
}
|
||||
|
||||
Void SubWindowHandle::adjustScrollBarByOffset( QPoint Offset )
|
||||
Void SubWindowAbstract::adjustScrollBarByOffset( QPoint Offset )
|
||||
{
|
||||
QPoint cLastScroll = m_cCurrScroll;
|
||||
QScrollBar *scrollBarH, *scrollBarV;
|
||||
@@ -97,7 +102,7 @@ Void SubWindowHandle::adjustScrollBarByOffset( QPoint Offset )
|
||||
|
||||
// This function was developed with help of the schematics presented in
|
||||
// http://stackoverflow.com/questions/13155382/jscrollpane-zoom-relative-to-mouse-position
|
||||
Void SubWindowHandle::adjustScrollBarByScale( Double scale, QPoint center )
|
||||
Void SubWindowAbstract::adjustScrollBarByScale( Double scale, QPoint center )
|
||||
{
|
||||
QPoint cLastScroll = m_cCurrScroll;
|
||||
QScrollBar *scrollBarH, *scrollBarV;
|
||||
@@ -140,7 +145,7 @@ Void SubWindowHandle::adjustScrollBarByScale( Double scale, QPoint center )
|
||||
|
||||
}
|
||||
|
||||
Void SubWindowHandle::updateCurScrollValues()
|
||||
Void SubWindowAbstract::updateCurScrollValues()
|
||||
{
|
||||
QScrollBar *scrollBar = horizontalScrollBar();
|
||||
m_cCurrScroll.setX( scrollBar->value() );
|
||||
@@ -148,7 +153,7 @@ Void SubWindowHandle::updateCurScrollValues()
|
||||
m_cCurrScroll.setY( scrollBar->value() );
|
||||
}
|
||||
|
||||
Void SubWindowHandle::setCurScrollValues()
|
||||
Void SubWindowAbstract::setCurScrollValues()
|
||||
{
|
||||
QScrollBar *scrollBar = horizontalScrollBar();
|
||||
scrollBar->setValue(m_cCurrScroll.x() );
|
||||
@@ -156,44 +161,44 @@ Void SubWindowHandle::setCurScrollValues()
|
||||
scrollBar->setValue(m_cCurrScroll.y() );
|
||||
}
|
||||
|
||||
Void SubWindowHandle::setWindowName( QString name )
|
||||
Void SubWindowAbstract::setWindowName( QString name )
|
||||
{
|
||||
m_cWindowName = name;
|
||||
setWindowTitle( m_cWindowName );
|
||||
}
|
||||
|
||||
QString SubWindowHandle::getWindowName()
|
||||
QString SubWindowAbstract::getWindowName()
|
||||
{
|
||||
return m_cWindowName;
|
||||
}
|
||||
|
||||
Bool SubWindowHandle::mayClose()
|
||||
Bool SubWindowAbstract::mayClose()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QSize SubWindowHandle::sizeHint( ) const
|
||||
QSize SubWindowAbstract::sizeHint( ) const
|
||||
{
|
||||
return QSize();
|
||||
}
|
||||
|
||||
QSize SubWindowHandle::sizeHint( const QSize & ) const
|
||||
QSize SubWindowAbstract::sizeHint( const QSize & ) const
|
||||
{
|
||||
return QSize();
|
||||
}
|
||||
|
||||
Void SubWindowHandle::focusInEvent( QFocusEvent * event )
|
||||
Void SubWindowAbstract::focusInEvent( QFocusEvent * event )
|
||||
{
|
||||
emit aboutToActivate( this );
|
||||
}
|
||||
|
||||
Void SubWindowHandle::closeEvent( QCloseEvent *event )
|
||||
Void SubWindowAbstract::closeEvent( QCloseEvent *event )
|
||||
{
|
||||
emit aboutToClose( this );
|
||||
event->accept();
|
||||
}
|
||||
|
||||
Void SubWindowHandle::closeSubWindow()
|
||||
Void SubWindowAbstract::closeSubWindow()
|
||||
{
|
||||
close();
|
||||
if( m_cSubWindow )
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SubWindowHandle.h
|
||||
* \file SubWindowAbstract.h
|
||||
* \ingroup PlaYUVerApp PlaYUVerApp_Subwindow
|
||||
* \brief Sub windows handling
|
||||
* \brief Abstract class to handle subwindows
|
||||
*
|
||||
* @defgroup PlaYUVerApp_Subwindow SubWindow definition
|
||||
* @{
|
||||
@@ -34,23 +34,25 @@
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifndef __SUBWINDOWHANDLE_H__
|
||||
#define __SUBWINDOWHANDLE_H__
|
||||
#ifndef __SUBWINDOWABSTRACT_H__
|
||||
#define __SUBWINDOWABSTRACT_H__
|
||||
|
||||
#include "config.h"
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QScrollArea>
|
||||
#include <QString>
|
||||
#include <QPoint>
|
||||
#include <QSize>
|
||||
|
||||
class QFocusEvent;
|
||||
class QCloseEvent;
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class PlaYUVerMdiSubWindow;
|
||||
|
||||
class SubWindowHandle: public QScrollArea
|
||||
class SubWindowAbstract: public QScrollArea
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -73,8 +75,8 @@ public:
|
||||
PLOT_SUBWINDOW = 8,
|
||||
};
|
||||
|
||||
SubWindowHandle( QWidget *, UInt );
|
||||
~SubWindowHandle();
|
||||
SubWindowAbstract( QWidget *, UInt );
|
||||
~SubWindowAbstract();
|
||||
|
||||
/**
|
||||
* Show the image at its original size
|
||||
@@ -170,8 +172,8 @@ Q_SIGNALS:
|
||||
*/
|
||||
void updateStatusBar( const QString& );
|
||||
|
||||
void aboutToActivate( SubWindowHandle* );
|
||||
void aboutToClose( SubWindowHandle* );
|
||||
void aboutToActivate( SubWindowAbstract* );
|
||||
void aboutToClose( SubWindowAbstract* );
|
||||
|
||||
public Q_SLOTS:
|
||||
void onDestroyed();
|
||||
@@ -184,5 +186,5 @@ public Q_SLOTS:
|
||||
|
||||
} // NAMESPACE
|
||||
|
||||
#endif // __SUBWINDOWHANDLE_H__
|
||||
#endif // __SUBWINDOWABSTRACT_H__
|
||||
|
||||
+19
-10
@@ -22,10 +22,19 @@
|
||||
* \brief Class to handle video playback
|
||||
*/
|
||||
|
||||
#include <QtGui>
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "VideoHandle.h"
|
||||
#include "VideoSubWindow.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "DialogSubWindowSelector.h"
|
||||
#include "FramePropertiesDock.h"
|
||||
#include "WidgetFrameNumber.h"
|
||||
#include <QtGui>
|
||||
#include <QToolBar>
|
||||
#include <QDockWidget>
|
||||
#include <QSignalMapper>
|
||||
#include <QSlider>
|
||||
#include <QLabel>
|
||||
#include <QElapsedTimer>
|
||||
#if( _CONTROL_PLAYING_TIME_ == 1 )
|
||||
#include <QElapsedTimer>
|
||||
#endif
|
||||
@@ -137,7 +146,7 @@ QToolBar* VideoHandle::createToolBar()
|
||||
|
||||
QDockWidget* VideoHandle::createDock()
|
||||
{
|
||||
m_pcFramePropertiesSideBar = new FramePropertiesSideBar( this, &m_bIsPlaying );
|
||||
m_pcFramePropertiesSideBar = new FramePropertiesDock( this, &m_bIsPlaying );
|
||||
m_pcFramePropertiesDock = new QDockWidget( tr( "Frame Information" ), this );
|
||||
m_pcFramePropertiesDock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
||||
m_pcFramePropertiesDock->setWidget( m_pcFramePropertiesSideBar );
|
||||
@@ -278,7 +287,7 @@ Void VideoHandle::updateSelectionArea( QRect area )
|
||||
}
|
||||
}
|
||||
|
||||
Void VideoHandle::closeSubWindow( SubWindowHandle* subWindow )
|
||||
Void VideoHandle::closeSubWindow( SubWindowAbstract* subWindow )
|
||||
{
|
||||
VideoSubWindow* videoSubWindow = qobject_cast<VideoSubWindow *>( subWindow );
|
||||
|
||||
@@ -303,8 +312,8 @@ Void VideoHandle::zoomToFactorAll( const Double scale, const QPoint center )
|
||||
|
||||
factor = m_pcCurrentVideoSubWindow->getScaleFactor();
|
||||
|
||||
SubWindowHandle *subWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
SubWindowAbstract *subWindow;
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_SUBWINDOW );
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
subWindow = subWindowList.at( i );
|
||||
@@ -323,8 +332,8 @@ Void VideoHandle::moveAllScrollBars( const QPoint offset )
|
||||
QPoint newOffset = offset;
|
||||
if( m_arrayActions[VIDEO_ZOOM_LOCK_ACT]->isChecked() )
|
||||
{
|
||||
SubWindowHandle *subWindow;
|
||||
QList<SubWindowHandle*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW );
|
||||
SubWindowAbstract *subWindow;
|
||||
QList<SubWindowAbstract*> subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowAbstract::VIDEO_SUBWINDOW );
|
||||
|
||||
QScrollBar *scrollBar;
|
||||
scrollBar = m_pcCurrentVideoSubWindow->horizontalScrollBar();
|
||||
@@ -574,7 +583,7 @@ Void VideoHandle::seekSliderEvent( Int new_frame_num )
|
||||
|
||||
Void VideoHandle::videoSelectionButtonEvent()
|
||||
{
|
||||
DialogSubWindowSelector dialogWindowsSelection( this, m_pcMainWindowManager, SubWindowHandle::VIDEO_STREAM_SUBWINDOW );
|
||||
DialogSubWindowSelector dialogWindowsSelection( this, m_pcMainWindowManager, SubWindowAbstract::VIDEO_STREAM_SUBWINDOW );
|
||||
QStringList cWindowListNames;
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
@@ -584,7 +593,7 @@ Void VideoHandle::videoSelectionButtonEvent()
|
||||
{
|
||||
m_acPlayingSubWindows.clear();
|
||||
VideoSubWindow *videoSubWindow;
|
||||
QList<SubWindowHandle*> selectedSubWindowList = dialogWindowsSelection.getSelectedWindows();
|
||||
QList<SubWindowAbstract*> selectedSubWindowList = dialogWindowsSelection.getSelectedWindows();
|
||||
for( Int i = 0; i < selectedSubWindowList.size(); i++ )
|
||||
{
|
||||
videoSubWindow = qobject_cast<VideoSubWindow*>( selectedSubWindowList.at( i ) );
|
||||
|
||||
+15
-11
@@ -27,25 +27,29 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#include <QtCore>
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include "VideoSubWindow.h"
|
||||
#include "WidgetFrameNumber.h"
|
||||
#include "FramePropertiesSidebar.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QMenu>
|
||||
#include <QVector>
|
||||
#include <QPoint>
|
||||
|
||||
#define _CONTROL_PLAYING_TIME_ 0
|
||||
|
||||
class QToolBar;
|
||||
class QDockWidget;
|
||||
class QSignalMapper;
|
||||
class QLabel;
|
||||
class QSlider;
|
||||
class QElapsedTimer;
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class SubWindowAbstract;
|
||||
class VideoSubWindow;
|
||||
class FramePropertiesDock;
|
||||
class WidgetFrameNumber;
|
||||
|
||||
class VideoHandle: public QWidget
|
||||
{
|
||||
@@ -91,7 +95,7 @@ private:
|
||||
QToolBar* m_toolbarVideo;
|
||||
|
||||
QDockWidget* m_pcFramePropertiesDock;
|
||||
FramePropertiesSideBar* m_pcFramePropertiesSideBar;
|
||||
FramePropertiesDock* m_pcFramePropertiesSideBar;
|
||||
|
||||
QLabel* m_pcVideoFormatLabel;
|
||||
QLabel* m_pcResolutionLabel;
|
||||
@@ -117,7 +121,7 @@ Q_SIGNALS:
|
||||
private Q_SLOTS:
|
||||
void update();
|
||||
void updateSelectionArea( QRect area );
|
||||
void closeSubWindow( SubWindowHandle* subWindow );
|
||||
void closeSubWindow( SubWindowAbstract* subWindow );
|
||||
void zoomToFactorAll( const double factor, const QPoint center = QPoint() );
|
||||
void moveAllScrollBars( const QPoint offset );
|
||||
void play();
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
#include "VideoSubWindow.h"
|
||||
#include "ModulesHandle.h"
|
||||
#include "SubWindowHandle.h"
|
||||
#include "ConfigureFormatDialog.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include "QtConcurrent/qtconcurrentrun.h"
|
||||
#endif
|
||||
@@ -78,7 +78,7 @@ Int findPlaYUVerStreamInfo( PlaYUVerStreamInfoVector array, QString filename )
|
||||
}
|
||||
|
||||
VideoSubWindow::VideoSubWindow( enum VideoSubWindowCategories category, QWidget * parent ) :
|
||||
SubWindowHandle( parent, SubWindowHandle::VIDEO_SUBWINDOW | category ),
|
||||
SubWindowAbstract( parent, SubWindowAbstract::VIDEO_SUBWINDOW | category ),
|
||||
m_pCurrStream( NULL ),
|
||||
m_pcCurrFrame( NULL ),
|
||||
m_pcCurrentDisplayModule( NULL ),
|
||||
@@ -128,7 +128,7 @@ Void VideoSubWindow::loadAll()
|
||||
|
||||
Void VideoSubWindow::refreshSubWindow()
|
||||
{
|
||||
if( getCategory() & SubWindowHandle::VIDEO_STREAM_SUBWINDOW )
|
||||
if( getCategory() & SubWindowAbstract::VIDEO_STREAM_SUBWINDOW )
|
||||
{
|
||||
Int currFrameNum = m_pCurrStream->getCurrFrameNum();
|
||||
if( !loadFile( m_cFilename, false ) )
|
||||
|
||||
@@ -26,15 +26,14 @@
|
||||
#define __VIDEOSUBWINDOW_H__
|
||||
|
||||
#include "config.h"
|
||||
#include <QFuture>
|
||||
#include <QDataStream>
|
||||
#include <QVector>
|
||||
#include <QString>
|
||||
#include <QRect>
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include "QFuture"
|
||||
#include "lib/PlaYUVerStream.h"
|
||||
#include "SubWindowHandle.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
#include "ViewArea.h"
|
||||
|
||||
namespace plaYUVer
|
||||
@@ -59,7 +58,7 @@ QDataStream& operator<<( QDataStream& out, const PlaYUVerStreamInfoVector& d );
|
||||
QDataStream& operator>>( QDataStream& in, PlaYUVerStreamInfoVector& d );
|
||||
Int findPlaYUVerStreamInfo( PlaYUVerStreamInfoVector array, QString filename );
|
||||
|
||||
class VideoSubWindow: public SubWindowHandle
|
||||
class VideoSubWindow: public SubWindowAbstract
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -202,7 +201,7 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Virtual functions from SubWindowHandle
|
||||
* Virtual functions from SubWindowAbstract
|
||||
*/
|
||||
Void normalSize();
|
||||
Void zoomToFit();
|
||||
|
||||
+3
-3
@@ -23,10 +23,10 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#include <QApplication>
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#include "PlaYUVerApp.h"
|
||||
#include "SubWindowHandle.h"
|
||||
#include "VideoSubWindow.h"
|
||||
#ifdef USE_QTDBUS
|
||||
#include "PlaYUVerAppAdaptor.h"
|
||||
#endif
|
||||
@@ -128,7 +128,7 @@ int main( int argc, char *argv[] )
|
||||
*/
|
||||
QDBusConnection::sessionBus().registerService( PLAYUVER_DBUS_SESSION_NAME );
|
||||
#endif
|
||||
plaYUVerApp mainwindow;
|
||||
PlaYUVerApp mainwindow;
|
||||
mainwindow.show();
|
||||
if( mainwindow.parseArgs( argc, argv ) )
|
||||
{
|
||||
|
||||
@@ -316,8 +316,7 @@ Bool LibAvContextHandle::decodeVideoPkt()
|
||||
{
|
||||
pkt.size = 0;
|
||||
}
|
||||
Bool bRet = got_frame > 0 ? true : false;
|
||||
return bRet;
|
||||
return got_frame > 0 ? true : false;
|
||||
}
|
||||
|
||||
Bool LibAvContextHandle::decodeAvFormat()
|
||||
@@ -356,6 +355,7 @@ Bool LibAvContextHandle::decodeAvFormat()
|
||||
av_image_copy_to_buffer( m_pchFrameBuffer, m_uiFrameBufferSize, frame->data, frame->linesize, video_dec_ctx->pix_fmt, video_dec_ctx->width,
|
||||
video_dec_ctx->height, 1 );
|
||||
|
||||
if( orig_pkt.size )
|
||||
av_free_packet( &orig_pkt );
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user