Rename some class and files
This commit is contained in:
1 parent
148981528d
commit
a4b140c7c8
27 files changed
+275
-240
No files matched your search
+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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user