Pan all images synchronously. First version.
This commit is contained in:
1 parent
92775fac48
commit
bb42e04dbf
4 files changed
+26
-3
No files matched your search
@@ -99,6 +99,7 @@ protected:
|
||||
|
||||
Q_SIGNALS:
|
||||
void zoomChangedOnSubWindow();
|
||||
void scrollBarMoved( const QPoint );
|
||||
void updateStatusBar( const QString& );
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
@@ -83,8 +83,9 @@ VideoSubWindow::VideoSubWindow( QWidget * parent, Bool isModule ) :
|
||||
|
||||
// Create a new interface to show images
|
||||
m_cViewArea = new ViewArea( this );
|
||||
connect( m_cViewArea, SIGNAL( zoomFactorChanged( double , QPoint) ), this, SLOT( processZoomChange(double, QPoint) ) );
|
||||
connect( m_cViewArea, SIGNAL( moveScroll( QPoint ) ), this, SLOT( adjustScrollBarByOffset(QPoint) ) );
|
||||
connect( m_cViewArea, SIGNAL( zoomFactorChanged( double , QPoint) ), this, SLOT( processZoomChange( double, QPoint ) ) );
|
||||
connect( m_cViewArea, SIGNAL( moveScroll( QPoint ) ), this, SLOT( adjustScrollBarByOffset( QPoint ) ) );
|
||||
connect( m_cViewArea, SIGNAL( moveScroll( QPoint ) ), this, SIGNAL( scrollBarMoved( QPoint ) ) );
|
||||
|
||||
connect( m_cViewArea, SIGNAL( selectionChanged( QRect ) ), this, SLOT( updateSelectedArea( QRect ) ) );
|
||||
connect( m_cViewArea, SIGNAL( positionChanged( const QPoint & ) ), this, SLOT( updatePixelValueStatusBar( const QPoint & ) ) );
|
||||
|
||||
+20
-1
@@ -196,6 +196,7 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
|
||||
connect( subWindow, SIGNAL( updateStatusBar( const QString& ) ), this, SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( subWindow, SIGNAL( zoomChangedOnSubWindow() ), this, SLOT( updateZoomFactorSBox() ) );
|
||||
connect( subWindow, SIGNAL( scrollBarMoved( const QPoint ) ), this, SLOT( moveAllScrollBars( const QPoint ) ) );
|
||||
|
||||
videoSubWindow->zoomToFit();
|
||||
videoSubWindow->getViewArea()->setTool( m_appTool );
|
||||
@@ -422,7 +423,10 @@ Void plaYUVerApp::zoomToFactorAll( double factor )
|
||||
for( Int i = 0; i < mdiArea->subWindowList().size(); i++ )
|
||||
{
|
||||
subWindow = qobject_cast<SubWindowHandle *>( mdiArea->subWindowList().at( i ) );
|
||||
subWindow->zoomToFactor(factor);
|
||||
if( m_pcCurrentSubWindow == subWindow )
|
||||
continue;
|
||||
else
|
||||
subWindow->zoomToFactor(factor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -459,6 +463,21 @@ Void plaYUVerApp::updateZoomFactorSBox()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::moveAllScrollBars( const QPoint offset )
|
||||
{
|
||||
SubWindowHandle *subWindow;
|
||||
for( Int i = 0; i < mdiArea->subWindowList().size(); i++ )
|
||||
{
|
||||
subWindow = qobject_cast<SubWindowHandle *>( mdiArea->subWindowList().at( i ) );
|
||||
|
||||
if( m_pcCurrentSubWindow == subWindow )
|
||||
continue;
|
||||
else
|
||||
subWindow->adjustScrollBarByOffset(offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----------------------- Drag and drop functions ----------------------
|
||||
|
||||
Void plaYUVerApp::dragEnterEvent( QDragEnterEvent *event )
|
||||
|
||||
@@ -105,6 +105,8 @@ private Q_SLOTS:
|
||||
void updateZoomFactorSBox();
|
||||
void updateStatusBar( const QString& );
|
||||
|
||||
void moveAllScrollBars( const QPoint offset );
|
||||
|
||||
private:
|
||||
|
||||
class PlaYUVerMdiArea: public QMdiArea
|
||||
|
||||
Reference in new issue
Block a user