Minor changes in histogram widget and seekstreamdialog

This commit is contained in:
2015-04-16 17:45:40 +01:00
parent 10b6090e0b
commit d42b202b4c
4 changed files with 23 additions and 27 deletions
+1 -2
View File
@@ -134,8 +134,7 @@ FramePropertiesDock::FramePropertiesDock( QWidget* parent, Bool* pbMainPlaySwitc
// -------------------------------------------------------------
histogramWidget = new HistogramWidget( 256, 100 );
histogramWidget->setOptions( HistogramWidget::BlinkComputation | HistogramWidget::SelectMode | HistogramWidget::ShowLumaChannel );
histogramWidget = new HistogramWidget( 100, 100 );
histogramWidget->setWhatsThis( tr( "<p>This is the histogram drawing of "
"the selected image channel" ) );
+15 -19
View File
@@ -177,7 +177,20 @@ HistogramWidget::HistogramWidget( Int width, Int height, QWidget *parent ) :
setAttribute( Qt::WA_DeleteOnClose );
d = new HistogramWidgetPrivate;
setupWidget( width, height );
m_channelType = LumaHistogram;
m_scaleType = LogScaleHistogram;
m_colorType = FirstChannelColor;
m_renderingType = FullImageHistogram;
setOptions( HistogramWidget::BlinkComputation | HistogramWidget::SelectMode | HistogramWidget::ShowLumaChannel );
setMouseTracking( true );
setMinimumSize( width, height );
d->blinkTimer = new QTimer( this );
connect( d->blinkTimer, SIGNAL( timeout() ), this, SLOT( slotBlinkTimerDone() ) );
m_imageHistogram = 0;
m_selectionHistogram = 0;
@@ -210,23 +223,6 @@ HistogramWidget::~HistogramWidget()
// Setup Functions
////////////////////////////////////////////////////////////////////////////////
Void HistogramWidget::setupWidget( Int width, Int height, HistogramOptions options )
{
m_channelType = LumaHistogram;
m_scaleType = LogScaleHistogram;
m_colorType = FirstChannelColor;
m_renderingType = FullImageHistogram;
setOptions( options );
setMouseTracking( true );
setMinimumSize( width, height );
d->blinkTimer = new QTimer( this );
connect( d->blinkTimer, SIGNAL( timeout() ), this, SLOT( slotBlinkTimerDone() ) );
}
Void HistogramWidget::setOptions( HistogramOptions options )
{
d->statisticsVisible = ( bool )( options & ShowStatistics );
@@ -1037,7 +1033,7 @@ Void HistogramWidget::mouseMoveEvent( QMouseEvent * e )
{
if( d->selectMode == true && d->clearFlag == HistogramWidgetPrivate::HistogramCompleted )
{
setCursor( Qt::CrossCursor );
setCursor( Qt::SizeHorCursor );
if( d->inSelected )
{
-3
View File
@@ -109,9 +109,6 @@ public :
*/
HistogramWidget( Int width, Int height, QWidget *parent = 0 );
Void setupWidget( Int width, Int height,
HistogramOptions options = AllOptions );
~HistogramWidget();
/** Stop current histogram computations.*/
+7 -3
View File
@@ -34,16 +34,20 @@ namespace plaYUVer
{
SeekStreamDialog::SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *parent ) :
QDialog( parent ),
QDialog( parent, Qt::Dialog | Qt::WindowTitleHint ),
m_iSelectedFrameNum()
{
m_iSelectedFrameNum = pcCurrStream->getCurrFrameNum();
setWindowTitle( "Go to frame" );
setWindowModality( Qt::ApplicationModal );
setWindowTitle( "Seek Video" );
QFont labelFont;
labelFont.setStretch( 110 );
QLabel* pcLabel = new QLabel;
pcLabel->setText( QString( "Go to frame (0 - %1)" ).arg( pcCurrStream->getFrameNum() - 1 ) );
pcLabel->setFont( labelFont );
m_spinFrameNum = new QSpinBox;
m_spinFrameNum->setMinimumSize( 70, 5 );
@@ -63,7 +67,7 @@ SeekStreamDialog::SeekStreamDialog( PlaYUVerStream *pcCurrStream, QWidget *paren
mainLayout->addWidget( dialogButtonOkCancel, 1, 0, 1, 2, Qt::AlignRight );
setLayout( mainLayout );
setFixedSize( 250, mainLayout->sizeHint().height() );
setFixedSize( 220, mainLayout->sizeHint().height() );
connect( dialogButtonOkCancel, SIGNAL( accepted() ), this, SLOT( accept() ) );
connect( dialogButtonOkCancel, SIGNAL( rejected() ), this, SLOT( reject() ) );