Some fixes. WA_StaticContents attributted is removed. This was causing overlapping bug.

This commit is contained in:
Luis Lucas committed 2015-02-22 02:28:18 +00:00
1 parent 2b68739d5a
commit 3bc693515b
4 files changed
+14 -22

No files matched your search

-1
View File
@@ -49,7 +49,6 @@ Q_SIGNALS:
protected:
QSize sizeHint() const;
void closeEvent( QCloseEvent *event );
};
} // NAMESPACE
+13 -18
View File
@@ -39,8 +39,8 @@ SubWindowHandle::SubWindowHandle( QWidget * parent, UInt category ) :
setWindowIcon( QIcon( ":/images/playuver.png" ) );
// Create a new scroll area inside the sub-window
connect( horizontalScrollBar(), SIGNAL( actionTriggered( int ) ), this, SLOT( updateCurScrollValue() ) );
connect( verticalScrollBar(), SIGNAL( actionTriggered( int ) ), this, SLOT( updateCurScrollValue() ) );
connect( horizontalScrollBar(), SIGNAL( actionTriggered( int ) ), this, SLOT( updateCurScrollValues() ) );
connect( verticalScrollBar(), SIGNAL( actionTriggered( int ) ), this, SLOT( updateCurScrollValues() ) );
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
@@ -75,13 +75,11 @@ Void SubWindowHandle::adjustScrollBarByOffset( QPoint Offset )
m_cCurrScroll.setX(int( cLastScroll.x() + Offset.x() ));
m_cCurrScroll.setY(int( cLastScroll.y() + Offset.y() ));
if(!widget()->visibleRegion().isEmpty())
{
QScrollBar *scrollBar = horizontalScrollBar();
scrollBar->setValue( m_cCurrScroll.x() );
scrollBar = verticalScrollBar();
scrollBar->setValue( m_cCurrScroll.y() );
}
// Update window scroll
QScrollBar *scrollBar = horizontalScrollBar();
scrollBar->setValue( m_cCurrScroll.x() );
scrollBar = verticalScrollBar();
scrollBar->setValue( m_cCurrScroll.y() );
}
// This function was developed with help of the schematics presented in
@@ -121,18 +119,15 @@ Void SubWindowHandle::adjustScrollBarByScale( Double scale, QPoint center )
m_cCurrScroll.setY(value);
}
if(!widget()->visibleRegion().isEmpty())
{
scrollBar = horizontalScrollBar();
scrollBar->setValue( m_cCurrScroll.x() );
scrollBar = verticalScrollBar();
scrollBar->setValue( m_cCurrScroll.y() );
}
// Update window scroll
scrollBar = horizontalScrollBar();
scrollBar->setValue( m_cCurrScroll.x() );
scrollBar = verticalScrollBar();
scrollBar->setValue( m_cCurrScroll.y() );
update();
}
Void SubWindowHandle::updateCurScrollValue()
Void SubWindowHandle::updateCurScrollValues()
{
QScrollBar *scrollBar = horizontalScrollBar();
m_cCurrScroll.setX( scrollBar->value() );
+1 -1
View File
@@ -138,7 +138,7 @@ public Q_SLOTS:
void onDestroyed();
void adjustScrollBarByScale( double scale, QPoint center );
void adjustScrollBarByOffset( QPoint Offset );
void updateCurScrollValue();
void updateCurScrollValues();
void setCurScrollValues();
};
-2
View File
@@ -49,8 +49,6 @@ static const QColor eraserColor = Qt::red;
ViewArea::ViewArea( QWidget *parent ) :
QWidget( parent )
{
setAttribute( Qt::WA_StaticContents );
// setAttribute( Qt::WA_NoBackground );
setMouseTracking( true );
m_pcCurrFrame = NULL;