Format code
This commit is contained in:
1 parent
501e24fc5d
commit
404e58e0ce
109 files changed
+494
-593
No files matched your search
+25
-30
@@ -17,14 +17,12 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file AboutDialog.cpp
|
||||
* \brief About Dialog
|
||||
* Based on the work of Glad Deschrijver <glad.deschrijver@gmail.com> in KTikZ project
|
||||
*/
|
||||
|
||||
|
||||
#include "AboutDialog.h"
|
||||
#include <QApplication>
|
||||
#include <QDialogButtonBox>
|
||||
@@ -32,27 +30,25 @@
|
||||
#include <QTextEdit>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
AboutDialog::AboutDialog( QWidget *parent ) :
|
||||
QDialog( parent )
|
||||
{
|
||||
QPixmap logo = QPixmap(":/images/playuver-backgroud-logo.png").scaled( QSize( 350,350), Qt::KeepAspectRatio );
|
||||
QLabel *pixmapLabel = new QLabel;
|
||||
pixmapLabel->setPixmap( logo );
|
||||
QPixmap logo = QPixmap( ":/images/playuver-backgroud-logo.png" ).scaled( QSize( 350, 350 ), Qt::KeepAspectRatio );
|
||||
QLabel *pixmapLabel = new QLabel;
|
||||
pixmapLabel->setPixmap( logo );
|
||||
|
||||
QLabel *label = new QLabel( QString( "<h1>%1 Version %2</h1><p>%3</p><p>%4</p>" )
|
||||
.arg( QApplication::applicationName() )
|
||||
.arg( QApplication::applicationVersion() )
|
||||
.arg( tr( "Enhanced open-source Qt-based raw video player" ) )
|
||||
.arg( tr( "Copyright © 2014–2015 Luis Lucas and Joao Carreira" ) ) );
|
||||
label->setWordWrap( true );
|
||||
|
||||
QLabel *label = new QLabel(QString("<h1>%1 Version %2</h1><p>%3</p><p>%4</p>")
|
||||
.arg(QApplication::applicationName())
|
||||
.arg(QApplication::applicationVersion())
|
||||
.arg(tr("Enhanced open-source Qt-based raw video player"))
|
||||
.arg(tr("Copyright © 2014–2015 Luis Lucas and Joao Carreira")));
|
||||
label->setWordWrap(true);
|
||||
|
||||
QWidget *topWidget = new QWidget;
|
||||
QVBoxLayout *topLayout = new QVBoxLayout;
|
||||
topLayout->addWidget(pixmapLabel);
|
||||
topLayout->addWidget(label);
|
||||
topWidget->setLayout(topLayout);
|
||||
QWidget *topWidget = new QWidget;
|
||||
QVBoxLayout *topLayout = new QVBoxLayout;
|
||||
topLayout->addWidget( pixmapLabel );
|
||||
topLayout->addWidget( label );
|
||||
topWidget->setLayout( topLayout );
|
||||
|
||||
// QTextEdit *textEdit = new QTextEdit(tr("<p>This program is free "
|
||||
// "software; you can redistribute it and/or modify it under the "
|
||||
@@ -64,17 +60,16 @@ AboutDialog::AboutDialog(QWidget *parent)
|
||||
// "warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "
|
||||
// "See the GNU General Public License for more details.</p>"));
|
||||
// textEdit->setReadOnly(true);
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok );
|
||||
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->addWidget(topWidget);
|
||||
//mainLayout->addWidget(textEdit);
|
||||
mainLayout->addWidget(buttonBox);
|
||||
mainLayout->setSpacing(10);
|
||||
buttonBox->setFocus();
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout( this );
|
||||
mainLayout->addWidget( topWidget );
|
||||
//mainLayout->addWidget(textEdit);
|
||||
mainLayout->addWidget( buttonBox );
|
||||
mainLayout->setSpacing( 10 );
|
||||
buttonBox->setFocus();
|
||||
|
||||
setWindowTitle(tr("About %1").arg(QApplication::applicationName()));
|
||||
setWindowTitle( tr( "About %1" ).arg( QApplication::applicationName() ) );
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -28,13 +28,12 @@
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
||||
class AboutDialog : public QDialog
|
||||
class AboutDialog: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AboutDialog(QWidget *parent = 0);
|
||||
AboutDialog( QWidget *parent = 0 );
|
||||
};
|
||||
|
||||
#endif // __ABOUTDIALOG_H__
|
||||
@@ -181,7 +181,6 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
|
||||
pixelGridLayout->addItem( new QSpacerItem( 10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 1 );
|
||||
pixelGridLayout->addWidget( m_comboBoxPixelFormat, 1, 2 );
|
||||
|
||||
|
||||
QLabel* bitsPerPelLabel = new QLabel();
|
||||
bitsPerPelLabel->setFont( normalFont );
|
||||
bitsPerPelLabel->setText( "Pixel bit depth" );
|
||||
@@ -205,13 +204,13 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
|
||||
m_comboBoxEndianness->setFont( normalFont );
|
||||
m_comboBoxEndianness->setSizePolicy( sizePolicy );
|
||||
m_comboBoxEndianness->clear();
|
||||
m_comboBoxEndianness->addItem( QStringLiteral("Big Endian") );
|
||||
m_comboBoxEndianness->addItem( QStringLiteral("Little Endian") );
|
||||
m_comboBoxEndianness->addItem( QStringLiteral( "Big Endian" ) );
|
||||
m_comboBoxEndianness->addItem( QStringLiteral( "Little Endian" ) );
|
||||
endiannessLayout->addWidget( endiannessLabel );
|
||||
endiannessLayout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
|
||||
endiannessLayout->addWidget( m_comboBoxEndianness );
|
||||
m_widgetEndianness = new QWidget();
|
||||
m_widgetEndianness->setContentsMargins( 0,0,0,0 );
|
||||
m_widgetEndianness->setContentsMargins( 0, 0, 0, 0 );
|
||||
m_widgetEndianness->setLayout( endiannessLayout );
|
||||
m_widgetEndianness->setVisible( true );
|
||||
|
||||
@@ -231,7 +230,7 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
|
||||
framerateFormatLayout->addItem( new QSpacerItem( 20, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
|
||||
framerateFormatLayout->addWidget( m_spinBoxFrameRate );
|
||||
QWidget* framerateWidget = new QWidget();
|
||||
framerateWidget->setContentsMargins( 0,0,0,0 );
|
||||
framerateWidget->setContentsMargins( 0, 0, 0, 0 );
|
||||
framerateWidget->setLayout( framerateFormatLayout );
|
||||
|
||||
/*
|
||||
@@ -267,7 +266,8 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) :
|
||||
|
||||
}
|
||||
|
||||
Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBits, Int& rEndianess, UInt& rFrameRate )
|
||||
Int ConfigureFormatDialog::runConfigureFormatDialog( QString Filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rBits, Int& rEndianess,
|
||||
UInt& rFrameRate )
|
||||
{
|
||||
// Set default values
|
||||
//setWindowTitle( "Configure resolution for " + Filename );
|
||||
@@ -392,4 +392,3 @@ Void ConfigureFormatDialog::slotBitsChange( Int idx )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "DialogSubWindowSelector.h"
|
||||
#include "VideoSubWindow.h"
|
||||
|
||||
|
||||
DialogSubWindowSelector::DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWindowHandle *windowManager, UInt uiCategory, Int minWindowsSelected,
|
||||
Int maxWindowsSelected ) :
|
||||
QDialog( parent ),
|
||||
|
||||
@@ -41,7 +41,6 @@ class QColor;
|
||||
class QCheckBox;
|
||||
class QGroupBox;
|
||||
|
||||
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class SubWindowAbstract;
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <QtDebug>
|
||||
#include "FramePropertiesDock.h"
|
||||
|
||||
|
||||
FramePropertiesDock::FramePropertiesDock( QWidget* parent, Bool* pbMainPlaySwitch ) :
|
||||
QWidget( parent ),
|
||||
m_pbIsPlaying( pbMainPlaySwitch )
|
||||
@@ -615,5 +614,3 @@ Void FramePropertiesDock::slotUpdateIntervRange( Int range )
|
||||
maxInterv->blockSignals( false );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,11 +37,10 @@
|
||||
#include "lib/PlaYUVerFrame.h"
|
||||
#include "HistogramWidget.h"
|
||||
|
||||
|
||||
class FramePropertiesDock: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
public:
|
||||
FramePropertiesDock( QWidget* parent, Bool* pbMainPlaySwitch );
|
||||
~FramePropertiesDock();
|
||||
|
||||
@@ -76,7 +75,6 @@ private:
|
||||
|
||||
Bool* m_pbIsPlaying;
|
||||
|
||||
|
||||
QComboBox *channelCB;
|
||||
QComboBox *colorsCB;
|
||||
QComboBox *renderingCB;
|
||||
|
||||
+5
-6
@@ -34,7 +34,6 @@
|
||||
|
||||
#include "GridManager.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -67,8 +66,8 @@ void GridManager::drawGrid( QPixmap &image, const QRect& area, QPainter *painter
|
||||
switch( style )
|
||||
{
|
||||
case IntersectionDot:
|
||||
case IntersectionCross:
|
||||
{
|
||||
case IntersectionCross:
|
||||
{
|
||||
painter->setPen( mainPen );
|
||||
// Draw crosses or dots on intersections
|
||||
for( int x = offsetx; x <= area.right(); x += hSpacing )
|
||||
@@ -96,7 +95,7 @@ void GridManager::drawGrid( QPixmap &image, const QRect& area, QPainter *painter
|
||||
break;
|
||||
}
|
||||
case Dashed:
|
||||
{
|
||||
{
|
||||
// Change pen to the dashed line
|
||||
mainPen.setStyle( Qt::DashLine );
|
||||
}
|
||||
@@ -136,12 +135,12 @@ void GridManager::drawGrid( QPixmap &image, const QRect& area, QPainter *painter
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
QRect GridManager::rectContains( const QPoint &pos ) const
|
||||
{
|
||||
{
|
||||
return rectContains( pos.x(), pos.y() );
|
||||
}
|
||||
|
||||
QRect GridManager::rectContains( int x, int y ) const
|
||||
{
|
||||
{
|
||||
QRect rect;
|
||||
QPoint pos;
|
||||
int multiPosX;
|
||||
|
||||
+4
-2
@@ -36,7 +36,6 @@ class QPoint;
|
||||
class QBitmap;
|
||||
class QPainter;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -46,7 +45,10 @@ public:
|
||||
|
||||
enum Style
|
||||
{
|
||||
IntersectionDot = 0, IntersectionCross, Dashed, Solid
|
||||
IntersectionDot = 0,
|
||||
IntersectionCross,
|
||||
Dashed,
|
||||
Solid
|
||||
};
|
||||
|
||||
GridManager();
|
||||
|
||||
+12
-14
@@ -31,7 +31,6 @@
|
||||
#include <QtDebug>
|
||||
#include "HistogramWidget.h"
|
||||
|
||||
|
||||
class HistogramWorker: public QThread
|
||||
{
|
||||
private:
|
||||
@@ -97,17 +96,18 @@ public:
|
||||
};
|
||||
|
||||
const QBrush g_eColorPallet[][3] =
|
||||
{
|
||||
{
|
||||
Qt::darkGray, // Luma
|
||||
Qt::blue, // Cb
|
||||
Qt::red, // Cr
|
||||
},
|
||||
{
|
||||
Qt::red, // Channel Red
|
||||
Qt::green, // Channel Green
|
||||
Qt::blue, // Channel Blue
|
||||
}, };
|
||||
{
|
||||
{
|
||||
Qt::darkGray, // Luma
|
||||
Qt::blue, // Cb
|
||||
Qt::red, // Cr
|
||||
},
|
||||
{
|
||||
Qt::red, // Channel Red
|
||||
Qt::green, // Channel Green
|
||||
Qt::blue, // Channel Blue
|
||||
},
|
||||
};
|
||||
|
||||
class HistogramWidgetPrivate
|
||||
{
|
||||
@@ -1099,5 +1099,3 @@ Void HistogramWidget::slotMaxValueChanged( int max )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
class QEvent;
|
||||
|
||||
|
||||
class HistogramWorker;
|
||||
class HistogramWidgetPrivate;
|
||||
|
||||
@@ -170,7 +169,6 @@ private:
|
||||
HistogramWidgetPrivate* d;
|
||||
};
|
||||
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS( HistogramWidget::HistogramOptions )
|
||||
|
||||
#endif // __HISTOGRAMWIDGET_H__
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "PlaYUVerAppModuleIf.h"
|
||||
#include "ModulesHandle.h"
|
||||
|
||||
|
||||
ModuleHandleDock::ModuleHandleDock( QWidget* parent, PlaYUVerAppModuleIf* moduleIf ) :
|
||||
QWidget( parent ),
|
||||
m_pcCurrModuleIf( moduleIf )
|
||||
@@ -88,5 +87,3 @@ QSize ModuleHandleDock::sizeHint() const
|
||||
return currSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,14 +34,12 @@
|
||||
#include <QWidget>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class PlaYUVerAppModuleIf;
|
||||
|
||||
class ModuleHandleDock: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_OBJECT
|
||||
public:
|
||||
ModuleHandleDock( QWidget* parent, PlaYUVerAppModuleIf* moduleIf );
|
||||
~ModuleHandleDock();
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "ModulesHandleOptDialog.h"
|
||||
#include "modules/PlaYUVerModuleFactory.h"
|
||||
|
||||
|
||||
ModulesHandle::ModulesHandle( QWidget* parent, PlaYUVerSubWindowHandle *windowManager, VideoHandle *moduleVideo ) :
|
||||
QWidget( parent ),
|
||||
m_pcParent( parent ),
|
||||
@@ -593,5 +592,3 @@ Void ModulesHandle::customEvent( QEvent *event )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-3
@@ -39,7 +39,6 @@
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#include "lib/PlaYUVerFrame.h"
|
||||
|
||||
|
||||
class VideoHandle;
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class PlaYUVerAppModuleIf;
|
||||
@@ -48,7 +47,7 @@ class SubWindowHandle;
|
||||
class ModulesHandle: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
public:
|
||||
ModulesHandle( QWidget*, PlaYUVerSubWindowHandle*, VideoHandle* );
|
||||
~ModulesHandle();
|
||||
|
||||
@@ -62,7 +61,7 @@ public:
|
||||
Void writeSettings();
|
||||
|
||||
static Void destroyModuleIf( PlaYUVerAppModuleIf* pcCurrModuleIf );
|
||||
static Void applyModuleIf( QList<PlaYUVerAppModuleIf*> pcCurrModuleIfList, Bool isPlaying = false, Bool disableThreads = false );
|
||||
static Void applyModuleIf( QList<PlaYUVerAppModuleIf*> pcCurrModuleIfList, Bool isPlaying = false, Bool disableThreads = false );
|
||||
|
||||
private:
|
||||
QWidget* m_pcParent;
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include "lib/PlaYUVerOptions.h"
|
||||
|
||||
|
||||
class OpionConfiguration: public QWidget
|
||||
{
|
||||
public:
|
||||
@@ -147,4 +146,3 @@ Int ModulesHandleOptDialog::runConfiguration()
|
||||
return QDialog::Accepted;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <QDialog>
|
||||
#include <QVector>
|
||||
|
||||
|
||||
class OpionConfiguration;
|
||||
|
||||
/**
|
||||
@@ -44,7 +43,7 @@ Q_OBJECT
|
||||
public:
|
||||
ModulesHandleOptDialog( QWidget *parent, PlaYUVerAppModuleIf *pcCurrModuleIf );
|
||||
Int runConfiguration();
|
||||
private:
|
||||
private:
|
||||
PlaYUVerAppModuleIf *m_pcCurrModuleIf;
|
||||
QVector<OpionConfiguration*> m_apcOptionList;
|
||||
};
|
||||
|
||||
+8
-9
@@ -46,7 +46,6 @@
|
||||
|
||||
#define SYNCHRONISED_ZOON 1
|
||||
|
||||
|
||||
PlaYUVerApp::PlaYUVerApp() :
|
||||
m_pcCurrentSubWindow( NULL ),
|
||||
m_pcCurrentVideoSubWindow( NULL ),
|
||||
@@ -110,13 +109,13 @@ Bool PlaYUVerApp::parseArgs( Int argc, Char *argv[] )
|
||||
bRet |= true;
|
||||
}
|
||||
|
||||
if( pcCmdParser.hasOpt("help") )
|
||||
if( pcCmdParser.hasOpt( "help" ) )
|
||||
{
|
||||
printf( "Usage: %s [options] input_file[s]\n", argv[0] );
|
||||
pcCmdParser.doHelp( std::cout );
|
||||
bRet |= true;
|
||||
}
|
||||
if( pcCmdParser.hasOpt("input") )
|
||||
if( pcCmdParser.hasOpt( "input" ) )
|
||||
{
|
||||
for( UInt i = 1; i < m_apcInputs.size(); i++ )
|
||||
{
|
||||
@@ -175,7 +174,7 @@ Void PlaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
}
|
||||
break;
|
||||
case QMessageBox::No:
|
||||
default:
|
||||
default:
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
@@ -380,10 +379,11 @@ Void PlaYUVerApp::reload()
|
||||
Void PlaYUVerApp::reloadAll()
|
||||
{
|
||||
UInt windowCategoryOrder[] =
|
||||
{
|
||||
SubWindowAbstract::VIDEO_STREAM_SUBWINDOW,
|
||||
SubWindowAbstract::MODULE_SUBWINDOW,
|
||||
SubWindowAbstract::MODULE_SUBWINDOW };
|
||||
{
|
||||
SubWindowAbstract::VIDEO_STREAM_SUBWINDOW,
|
||||
SubWindowAbstract::MODULE_SUBWINDOW,
|
||||
SubWindowAbstract::MODULE_SUBWINDOW,
|
||||
};
|
||||
|
||||
for( UInt c = 0; c < 3; c++ )
|
||||
{
|
||||
@@ -919,4 +919,3 @@ Void PlaYUVerApp::writeSettings()
|
||||
m_pcWindowHandle->writeSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ class QActionGroup;
|
||||
class QAction;
|
||||
class QSignalMapper;
|
||||
|
||||
|
||||
class PlaYUVerOptions;
|
||||
class PlaYUVerStream;
|
||||
class PlaYUVerSubWindowHandle;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "PlaYUVerAppAdaptor.h"
|
||||
#include "PlaYUVerApp.h"
|
||||
|
||||
|
||||
PlaYUVerAppAdaptor::PlaYUVerAppAdaptor( PlaYUVerApp *app ) :
|
||||
QDBusAbstractAdaptor( app ),
|
||||
m_app( app )
|
||||
@@ -62,4 +61,3 @@ bool PlaYUVerAppAdaptor::loadFile( const QString& filename )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include <QtDBus>
|
||||
#include <QtCore>
|
||||
|
||||
|
||||
#define PLAYUVER_DBUS_SESSION_NAME "org.pixlra.PlaYUVer.application"
|
||||
#define PLAYUVER_DBUS_PATH "/MainApplication"
|
||||
|
||||
@@ -41,7 +40,7 @@ class PlaYUVerApp;
|
||||
class PlaYUVerAppAdaptor: public QDBusAbstractAdaptor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.pixlra.PlaYUVer.application")
|
||||
Q_CLASSINFO("D-Bus Interface", "org.pixlra.PlaYUVer.application")
|
||||
Q_PROPERTY(QString activeSession READ activeSession)
|
||||
public:
|
||||
PlaYUVerAppAdaptor( PlaYUVerApp *app );
|
||||
@@ -75,7 +74,7 @@ Q_SIGNALS:
|
||||
//void documentClosed(const QString &token);
|
||||
public:
|
||||
QString activeSession();
|
||||
private:
|
||||
private:
|
||||
PlaYUVerApp *m_app;
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "lib/PlaYUVerDefs.h"
|
||||
|
||||
|
||||
// ====================================================================================================================
|
||||
// Qt compatibility redefinition
|
||||
// ====================================================================================================================
|
||||
@@ -39,7 +38,4 @@
|
||||
# define QStringLiteral(str) QString::fromUtf8("" str "", sizeof(str) - 1)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __PLAYUVERAPPDEFS_H__
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "VideoSubWindow.h"
|
||||
#include "VideoSubWindow.h"
|
||||
|
||||
|
||||
PlaYUVerAppModuleIf::PlaYUVerAppModuleIf( QObject* parent, QAction* action, PlaYUVerModuleIf* module ) :
|
||||
m_bIsRunning( false ),
|
||||
m_pcModuleAction( action ),
|
||||
@@ -141,7 +140,7 @@ Void PlaYUVerAppModuleIf::run()
|
||||
#ifdef PLAYUVER_THREADED_MODULES
|
||||
EventData *eventData = new EventData( true, this );
|
||||
if( parent() )
|
||||
QCoreApplication::postEvent( parent(), eventData );
|
||||
QCoreApplication::postEvent( parent(), eventData );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -217,5 +216,3 @@ Void PlaYUVerAppModuleIf::destroy()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,16 +37,15 @@
|
||||
|
||||
class QAction;
|
||||
|
||||
|
||||
//#define PLAYUVER_THREADED_MODULES
|
||||
|
||||
class VideoSubWindow;
|
||||
|
||||
class PlaYUVerAppModuleIf
|
||||
#ifdef PLAYUVER_THREADED_MODULES
|
||||
#ifdef PLAYUVER_THREADED_MODULES
|
||||
: public QThread
|
||||
#else
|
||||
: public QObject
|
||||
: public QObject
|
||||
#endif
|
||||
{
|
||||
friend class ModulesHandle;
|
||||
@@ -113,7 +112,7 @@ public:
|
||||
Bool apply( Bool isPlaying = false, Bool disableThreads = false );
|
||||
Void show();
|
||||
Void destroy();
|
||||
protected:
|
||||
protected:
|
||||
virtual void run();
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
|
||||
|
||||
PlaYUVerMdiSubWindow::PlaYUVerMdiSubWindow( QWidget *parent ) :
|
||||
QMdiSubWindow( parent )
|
||||
{
|
||||
@@ -49,4 +48,3 @@ Void PlaYUVerMdiSubWindow::closeEvent( QCloseEvent *event )
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#include <QMdiSubWindow>
|
||||
|
||||
|
||||
|
||||
class PlaYUVerMdiSubWindow: public QMdiSubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
#include "SubWindowAbstract.h"
|
||||
|
||||
|
||||
class PlaYUVerMdiArea: public QMdiArea
|
||||
{
|
||||
public:
|
||||
@@ -304,7 +303,7 @@ SubWindowAbstract* PlaYUVerSubWindowHandle::activeSubWindow() const
|
||||
}
|
||||
|
||||
QList<SubWindowAbstract*> PlaYUVerSubWindowHandle::findSubWindow( const UInt uiCategory ) const
|
||||
{
|
||||
{
|
||||
QList<SubWindowAbstract*> apcSubWindowList;
|
||||
if( uiCategory == 0 )
|
||||
{
|
||||
@@ -322,7 +321,7 @@ QList<SubWindowAbstract*> PlaYUVerSubWindowHandle::findSubWindow( const UInt uiC
|
||||
}
|
||||
|
||||
QList<SubWindowAbstract*> PlaYUVerSubWindowHandle::findSubWindow( const QString &windowName, const UInt uiCategory ) const
|
||||
{
|
||||
{
|
||||
QList<SubWindowAbstract*> subWindowList = findSubWindow( uiCategory );
|
||||
QList<SubWindowAbstract*> apcSubWindowList;
|
||||
if( !windowName.isEmpty() )
|
||||
@@ -337,7 +336,7 @@ QList<SubWindowAbstract*> PlaYUVerSubWindowHandle::findSubWindow( const QString
|
||||
}
|
||||
|
||||
SubWindowAbstract* PlaYUVerSubWindowHandle::findSubWindow( const SubWindowAbstract* subWindow ) const
|
||||
{
|
||||
{
|
||||
QList<SubWindowAbstract*> subWindowList = findSubWindow();
|
||||
for( Int i = 0; i < subWindowList.size(); i++ )
|
||||
{
|
||||
@@ -588,4 +587,3 @@ Void PlaYUVerSubWindowHandle::writeSettings()
|
||||
appSettings.setValue( "SubWindowManager/SubWindowMode", m_iWindowMode );
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "PlotSubWindow.h"
|
||||
#include "qcustomplot.h"
|
||||
|
||||
|
||||
Void PlotSubWindow::definePlotColors()
|
||||
{
|
||||
m_arrayColorList.append( Qt::blue );
|
||||
@@ -175,7 +174,7 @@ QSize PlotSubWindow::sizeHint() const
|
||||
}
|
||||
|
||||
QSize PlotSubWindow::sizeHint( const QSize & maxSize ) const
|
||||
{
|
||||
{
|
||||
return maxSize * 2 / 3;
|
||||
}
|
||||
|
||||
@@ -239,4 +238,3 @@ Void PlotSubWindow::addPlot( const QVector<Double> &arrayX, const QVector<Double
|
||||
m_iNumberPlots++;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
class QCustomPlot;
|
||||
|
||||
|
||||
class PlotSubWindow: public SubWindowAbstract
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <QProgressBar>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
|
||||
ProgressBar::ProgressBar( QWidget *parent, UInt maxValue ) :
|
||||
QWidget( parent ),
|
||||
m_uiTotalProgress( maxValue ),
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
class QProgressBar;
|
||||
|
||||
|
||||
class ProgressBar: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "QtConcurrent/qtconcurrentrun.h"
|
||||
#endif
|
||||
|
||||
|
||||
QualityHandle::QualityHandle( QWidget* parent, PlaYUVerSubWindowHandle* windowManager ) :
|
||||
m_pcParet( parent ),
|
||||
m_pcMainWindowManager( windowManager )
|
||||
@@ -328,5 +327,3 @@ Void QualityHandle::slotPlotQualitySeveral()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -36,14 +36,13 @@
|
||||
#include "QFuture"
|
||||
#include "QualityMeasurementSidebar.h"
|
||||
|
||||
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class VideoSubWindow;
|
||||
|
||||
class QualityHandle: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
public:
|
||||
QualityHandle( QWidget*, PlaYUVerSubWindowHandle * );
|
||||
~QualityHandle();
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "QualityMeasurementSidebar.h"
|
||||
#include "VideoSubWindow.h"
|
||||
|
||||
|
||||
QualityMeasurementSidebar::QualityMeasurementSidebar( QWidget* parent, PlaYUVerSubWindowHandle *windowManager ) :
|
||||
QWidget( parent ),
|
||||
m_pcMainWindowManager( windowManager ),
|
||||
@@ -258,5 +257,3 @@ Void QualityMeasurementSidebar::slotQualityMetricChanged( Int idx )
|
||||
//updateQualityMetric( idx );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,14 +37,13 @@
|
||||
#include "lib/PlaYUVerFrame.h"
|
||||
#include "HistogramWidget.h"
|
||||
|
||||
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class VideoSubWindow;
|
||||
|
||||
class QualityMeasurementSidebar: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
public:
|
||||
QualityMeasurementSidebar( QWidget*, PlaYUVerSubWindowHandle * );
|
||||
~QualityMeasurementSidebar();
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <QGridLayout>
|
||||
#include <QSpinBox>
|
||||
|
||||
|
||||
SeekStreamDialog::SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *parent ) :
|
||||
QDialog( parent, Qt::Dialog | Qt::WindowTitleHint ),
|
||||
m_iSelectedFrameNum()
|
||||
@@ -81,4 +80,3 @@ Int SeekStreamDialog::runDialog()
|
||||
return m_iSelectedFrameNum;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <QDialog>
|
||||
#include <QVector>
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -42,7 +41,7 @@ Q_OBJECT
|
||||
public:
|
||||
SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *parent = 0 );
|
||||
Int runDialog();
|
||||
private:
|
||||
private:
|
||||
QSpinBox* m_spinFrameNum;
|
||||
Int m_iSelectedFrameNum;
|
||||
};
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "SubWindowAbstract.h"
|
||||
#include "PlaYUVerMdiSubWindow.h"
|
||||
|
||||
|
||||
SubWindowAbstract::SubWindowAbstract( QWidget * parent, UInt category ) :
|
||||
QWidget( parent ),
|
||||
m_cSubWindow( NULL )
|
||||
@@ -38,7 +37,7 @@ SubWindowAbstract::SubWindowAbstract( QWidget * parent, UInt category ) :
|
||||
setParent( parent );
|
||||
setVisible( false );
|
||||
//setFocusPolicy( Qt::WheelFocus );
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
setAttribute( Qt::WA_DeleteOnClose );
|
||||
setBackgroundRole( QPalette::Background );
|
||||
|
||||
@@ -91,7 +90,7 @@ QSize SubWindowAbstract::sizeHint() const
|
||||
}
|
||||
|
||||
QSize SubWindowAbstract::sizeHint( const QSize & ) const
|
||||
{
|
||||
{
|
||||
return QSize();
|
||||
}
|
||||
|
||||
@@ -113,4 +112,3 @@ Void SubWindowAbstract::closeSubWindow()
|
||||
m_cSubWindow->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ class QHBoxLayout;
|
||||
class QFocusEvent;
|
||||
class QCloseEvent;
|
||||
|
||||
|
||||
class PlaYUVerMdiSubWindow;
|
||||
|
||||
class SubWindowAbstract: public QWidget
|
||||
@@ -70,10 +69,9 @@ public:
|
||||
VIDEO_STREAM_SUBWINDOW = 2,
|
||||
MODULE_SUBWINDOW = 4,
|
||||
PLOT_SUBWINDOW = 8,
|
||||
}; Q_DECLARE_FLAGS( SubWindowCategories, SubWindowCategory )
|
||||
};Q_DECLARE_FLAGS( SubWindowCategories, SubWindowCategory )
|
||||
|
||||
|
||||
SubWindowAbstract( QWidget *, UInt );
|
||||
SubWindowAbstract ( QWidget *, UInt );
|
||||
~SubWindowAbstract();
|
||||
|
||||
/**
|
||||
@@ -152,7 +150,7 @@ protected:
|
||||
|
||||
Void setWidget( QWidget* widget );
|
||||
|
||||
Q_SIGNALS:
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* Notify that zoom factor was changed by internal event (e.g. by mouse wheel)
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <QElapsedTimer>
|
||||
#endif
|
||||
|
||||
|
||||
VideoHandle::VideoHandle( QWidget* parent, PlaYUVerSubWindowHandle* windowManager ) :
|
||||
m_pcParet( parent ),
|
||||
m_pcMainWindowManager( windowManager )
|
||||
@@ -774,5 +773,3 @@ Void VideoHandle::toggleGrid( Bool checked )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -42,7 +42,6 @@ class QLabel;
|
||||
class QSlider;
|
||||
class QElapsedTimer;
|
||||
|
||||
|
||||
class PlaYUVerSubWindowHandle;
|
||||
class SubWindowAbstract;
|
||||
class VideoSubWindow;
|
||||
@@ -52,7 +51,7 @@ class WidgetFrameNumber;
|
||||
class VideoHandle: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
public:
|
||||
VideoHandle( QWidget*, PlaYUVerSubWindowHandle * );
|
||||
~VideoHandle();
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "QtConcurrent/qtconcurrentrun.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief Functions to control data stream from stream information
|
||||
*/
|
||||
@@ -96,7 +95,7 @@ private:
|
||||
QFont m_cTopLeftTextFont;
|
||||
QFont m_cCenterTextFont;
|
||||
Bool m_bBusyWindow;
|
||||
public:
|
||||
public:
|
||||
VideoInformation( QWidget *parent ) :
|
||||
QWidget( parent ),
|
||||
m_bBusyWindow( false )
|
||||
@@ -259,7 +258,7 @@ QSize VideoSubWindow::sizeHint() const
|
||||
}
|
||||
|
||||
QSize VideoSubWindow::sizeHint( const QSize & maxSize ) const
|
||||
{
|
||||
{
|
||||
QSize isize;
|
||||
if( m_pcCurrFrame )
|
||||
isize = QSize( m_pcCurrFrame->getWidth() + 50, m_pcCurrFrame->getHeight() + 50 );
|
||||
@@ -320,7 +319,8 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog )
|
||||
|
||||
if( guessFormat( cFilename, Width, Height, InputFormat, FrameRate ) || bForceDialog )
|
||||
{
|
||||
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate ) == QDialog::Rejected )
|
||||
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate )
|
||||
== QDialog::Rejected )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -332,7 +332,8 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog )
|
||||
}
|
||||
catch( const char *msg )
|
||||
{
|
||||
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate ) == QDialog::Rejected )
|
||||
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate )
|
||||
== QDialog::Rejected )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -367,7 +368,7 @@ Bool VideoSubWindow::loadFile( PlaYUVerStreamInfo* streamInfo )
|
||||
}
|
||||
|
||||
if( !m_pCurrStream->open( streamInfo->m_cFilename.toStdString(), streamInfo->m_uiWidth, streamInfo->m_uiHeight, streamInfo->m_iPelFormat,
|
||||
streamInfo->m_uiBitsPelPixel, streamInfo->m_iEndianness, streamInfo->m_uiFrameRate, true) )
|
||||
streamInfo->m_uiBitsPelPixel, streamInfo->m_iEndianness, streamInfo->m_uiFrameRate, true ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -621,7 +622,7 @@ Void VideoSubWindow::refreshFrameOperation()
|
||||
if( m_pcCurrentDisplayModule )
|
||||
{
|
||||
m_bWindowBusy = true;
|
||||
m_pcCurrentDisplayModule->apply( m_bIsPlaying, !m_bIsPlaying && m_apcCurrentModule.size() );
|
||||
m_pcCurrentDisplayModule->apply( m_bIsPlaying, !m_bIsPlaying && m_apcCurrentModule.size() );
|
||||
bSetFrame = false;
|
||||
}
|
||||
if( bSetFrame )
|
||||
@@ -643,7 +644,7 @@ Void VideoSubWindow::refreshFrame( Bool bThreaded )
|
||||
m_cRefreshResult = QtConcurrent::run( this, &VideoSubWindow::refreshFrameOperation );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
refreshFrameOperation();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
class QScrollArea;
|
||||
|
||||
|
||||
class VideoInformation;
|
||||
class VideoSubWindow;
|
||||
class PlaYUVerAppModuleIf;
|
||||
|
||||
+9
-10
@@ -39,7 +39,6 @@
|
||||
#include "ViewArea.h"
|
||||
#include "GridManager.h"
|
||||
|
||||
|
||||
static const QColor selectionColor = Qt::cyan;
|
||||
static const QColor imageMaskColor = Qt::green;
|
||||
static const QColor eraserColor = Qt::red;
|
||||
@@ -686,7 +685,7 @@ Void ViewArea::paintEvent( QPaintEvent *event )
|
||||
switch( tool() )
|
||||
{
|
||||
case MaskTool:
|
||||
{
|
||||
{
|
||||
if( m_maskColor.isValid() )
|
||||
color = m_maskColor;
|
||||
else
|
||||
@@ -695,7 +694,7 @@ Void ViewArea::paintEvent( QPaintEvent *event )
|
||||
break;
|
||||
}
|
||||
case EraserTool:
|
||||
{
|
||||
{
|
||||
color = eraserColor;
|
||||
break;
|
||||
}
|
||||
@@ -999,7 +998,7 @@ Void ViewArea::mouseReleaseEvent( QMouseEvent *event )
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Bool ViewArea::isPosValid( const QPoint &pos ) const
|
||||
{
|
||||
{
|
||||
|
||||
if( pos.x() < 0 || pos.y() < 0 || pos.x() >= m_pixmap.width() || pos.y() >= m_pixmap.height() )
|
||||
return false;
|
||||
@@ -1010,7 +1009,7 @@ Bool ViewArea::isPosValid( const QPoint &pos ) const
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
QPoint ViewArea::windowToView( const QPoint& pt ) const
|
||||
{
|
||||
{
|
||||
QPoint p;
|
||||
p.setX( static_cast<Int>( ( pt.x() - m_xOffset ) / m_dZoomFactor ) );
|
||||
p.setY( static_cast<Int>( ( pt.y() - m_yOffset ) / m_dZoomFactor ) );
|
||||
@@ -1019,7 +1018,7 @@ QPoint ViewArea::windowToView( const QPoint& pt ) const
|
||||
}
|
||||
|
||||
QRect ViewArea::windowToView( const QRect& rc ) const
|
||||
{
|
||||
{
|
||||
QRect r;
|
||||
|
||||
r.setTopLeft( windowToView( rc.topLeft() ) );
|
||||
@@ -1032,7 +1031,7 @@ QRect ViewArea::windowToView( const QRect& rc ) const
|
||||
}
|
||||
|
||||
QPoint ViewArea::viewToWindow( const QPoint& pt ) const
|
||||
{
|
||||
{
|
||||
QPoint p;
|
||||
|
||||
p.setX( static_cast<Int>( pt.x() * m_dZoomFactor + m_xOffset ) );
|
||||
@@ -1042,7 +1041,7 @@ QPoint ViewArea::viewToWindow( const QPoint& pt ) const
|
||||
}
|
||||
|
||||
QRect ViewArea::viewToWindow( const QRect& rc ) const
|
||||
{
|
||||
{
|
||||
QRect r;
|
||||
|
||||
r.setTopLeft( viewToWindow( rc.topLeft() ) );
|
||||
@@ -1066,7 +1065,7 @@ Void ViewArea::updateMask( const QRect &rect )
|
||||
switch( tool() )
|
||||
{
|
||||
case MaskTool:
|
||||
{
|
||||
{
|
||||
// Add rect to the mask
|
||||
QPainter paInter( &m_mask );
|
||||
paInter.setBrush( Qt::color1 );
|
||||
@@ -1076,7 +1075,7 @@ Void ViewArea::updateMask( const QRect &rect )
|
||||
break;
|
||||
}
|
||||
case EraserTool:
|
||||
{
|
||||
{
|
||||
// Clears rect area in the mask
|
||||
QPainter paInter( &m_mask );
|
||||
paInter.setBrush( Qt::color0 );
|
||||
|
||||
+1
-2
@@ -36,7 +36,6 @@
|
||||
#include "GridManager.h"
|
||||
#include "lib/PlaYUVerFrame.h"
|
||||
|
||||
|
||||
class PlaYUVerStream;
|
||||
|
||||
/**
|
||||
@@ -124,7 +123,7 @@ public Q_SLOTS:
|
||||
// Void setNormalSelectionTool();
|
||||
// Void setBlockSelectionTool();
|
||||
void setSnapToGrid( bool enable );
|
||||
// void setSelectedArea( QRect &rect );
|
||||
// void setSelectedArea( QRect &rect );
|
||||
|
||||
protected:
|
||||
Void paintEvent( QPaintEvent *event );
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#endif
|
||||
#include "WidgetFrameNumber.h"
|
||||
|
||||
|
||||
WidgetFrameNumber::WidgetFrameNumber( QWidget *parent ) :
|
||||
QWidget( parent )
|
||||
{
|
||||
@@ -67,5 +66,3 @@ Void WidgetFrameNumber::clear()
|
||||
m_pcTotalFrameNumLabel->setText( "-" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#ifndef __WIDGETFRAMENUMBER_H__
|
||||
#define __WIDGETFRAMENUMBER_H__
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include "PlaYUVerAppDefs.h"
|
||||
#include <QtCore>
|
||||
@@ -35,7 +34,6 @@
|
||||
#include <QtGui>
|
||||
#endif
|
||||
|
||||
|
||||
class WidgetFrameNumber: public QWidget
|
||||
{
|
||||
public:
|
||||
@@ -43,7 +41,7 @@ public:
|
||||
Void setCurrFrameNum( Int number );
|
||||
Void setTotalFrameNum( Int number );
|
||||
Void clear();
|
||||
private:
|
||||
private:
|
||||
QLabel *m_pcCurrFrameNumLabel;
|
||||
QLabel *m_pcTotalFrameNumLabel;
|
||||
|
||||
|
||||
+20
-19
@@ -45,7 +45,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
QApplication application( argc, argv );
|
||||
QApplication::setApplicationName( "PlaYUVer" );
|
||||
QApplication::setApplicationVersion( PLAYUVER_VERSION_STRING );
|
||||
QApplication::setApplicationVersion (PLAYUVER_VERSION_STRING);
|
||||
QApplication::setOrganizationName( "PixLRA" );
|
||||
|
||||
#ifdef USE_QTDBUS
|
||||
@@ -90,32 +90,33 @@ int main( int argc, char *argv[] )
|
||||
QStringList tokens;
|
||||
|
||||
// open given files...
|
||||
foreach(const QString & file, filenameList){
|
||||
QDBusMessage m = QDBusMessage::createMethodCall(PLAYUVER_DBUS_SESSION_NAME,
|
||||
QStringLiteral(PLAYUVER_DBUS_PATH), QStringLiteral(PLAYUVER_DBUS_SESSION_NAME), QStringLiteral("loadFile"));
|
||||
|
||||
QList<QVariant> dbusargs;
|
||||
dbusargs.append( file );
|
||||
m.setArguments(dbusargs);
|
||||
|
||||
QDBusMessage res = QDBusConnection::sessionBus().call(m);
|
||||
if (res.type() == QDBusMessage::ReplyMessage)
|
||||
foreach(const QString & file, filenameList)
|
||||
{
|
||||
if (res.arguments().count() == 1)
|
||||
QDBusMessage m = QDBusMessage::createMethodCall(PLAYUVER_DBUS_SESSION_NAME,
|
||||
QStringLiteral(PLAYUVER_DBUS_PATH), QStringLiteral(PLAYUVER_DBUS_SESSION_NAME), QStringLiteral("loadFile"));
|
||||
|
||||
QList<QVariant> dbusargs;
|
||||
dbusargs.append( file );
|
||||
m.setArguments(dbusargs);
|
||||
|
||||
QDBusMessage res = QDBusConnection::sessionBus().call(m);
|
||||
if (res.type() == QDBusMessage::ReplyMessage)
|
||||
{
|
||||
QVariant v = res.arguments()[0];
|
||||
if (v.isValid())
|
||||
if (res.arguments().count() == 1)
|
||||
{
|
||||
QString s = v.toString();
|
||||
if ((!s.isEmpty()) && (s != QStringLiteral("ERROR")))
|
||||
QVariant v = res.arguments()[0];
|
||||
if (v.isValid())
|
||||
{
|
||||
tokens << s;
|
||||
QString s = v.toString();
|
||||
if ((!s.isEmpty()) && (s != QStringLiteral("ERROR")))
|
||||
{
|
||||
tokens << s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// this will wait until exiting is emitted by the used instance, if wanted...
|
||||
// this will wait until exiting is emitted by the used instance, if wanted...
|
||||
return needToBlock ? application.exec() : 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user