diff --git a/source/app/PlaYUVerSettings.cpp b/source/app/PlaYUVerSettings.cpp index a89127b..5fea89b 100755 --- a/source/app/PlaYUVerSettings.cpp +++ b/source/app/PlaYUVerSettings.cpp @@ -28,7 +28,7 @@ namespace plaYUVer { PlaYUVerSettings::PlaYUVerSettings() : - m_settings( "IT", "YUV Player" ) + m_settings( "IT", "YUV Player" ) { } // - - - - - - - - - - - - Main Window Settings - - - - - - - - - - - - - - - - @@ -63,6 +63,16 @@ Void PlaYUVerSettings::setLastOpenPath( const QString & path ) m_settings.setValue( "MainWindow/lastOpenPath", path ); } +Int PlaYUVerSettings::getSelectedTool() +{ + return m_settings.value( "MainWindow/SelectedTool", NavigationTool ).toInt(); +} + +Void PlaYUVerSettings::setSelectedTool( Int tool ) +{ + m_settings.setValue( "MainWindow/SelectedTool", tool ); +} + // - - - - - - - - - - - - PLaying Settings - - - - - - - - - - - - - - - - Bool PlaYUVerSettings::getRepeat() diff --git a/source/app/PlaYUVerSettings.h b/source/app/PlaYUVerSettings.h index d093142..23a7da2 100755 --- a/source/app/PlaYUVerSettings.h +++ b/source/app/PlaYUVerSettings.h @@ -50,6 +50,9 @@ public: QString lastOpenPath(); Void setLastOpenPath( const QString &v ); + Int getSelectedTool(); + Void setSelectedTool( Int); + Bool getRepeat(); Bool getVideoLock(); Void setPlayingSettings( Bool repeat, Bool lock ); diff --git a/source/app/plaYUVerApp.cpp b/source/app/plaYUVerApp.cpp index e7891cb..e0755da 100644 --- a/source/app/plaYUVerApp.cpp +++ b/source/app/plaYUVerApp.cpp @@ -158,8 +158,7 @@ Void plaYUVerApp::loadFile( QString fileName ) interfaceChild->show(); connect( interfaceChild->getViewArea(), SIGNAL( positionChanged(const QPoint &, PlaYUVerFrame *) ), this, SLOT( updatePixelValueStatusBar(const QPoint &, PlaYUVerFrame *) ) ); - connect( interfaceChild->getViewArea(), SIGNAL( selectionChanged( QRect ) ), this, - SLOT( updatePropertiesSelectedArea( QRect ) ) ); + connect( interfaceChild->getViewArea(), SIGNAL( selectionChanged( QRect ) ), this, SLOT( updatePropertiesSelectedArea( QRect ) ) ); interfaceChild->zoomToFit(); interfaceChild->getViewArea()->setTool( m_appTool ); @@ -676,17 +675,13 @@ Void plaYUVerApp::dragEnterEvent( QDragEnterEvent *event ) { //setText(tr("")); setBackgroundRole( QPalette::Highlight ); - event->acceptProposedAction(); } Void plaYUVerApp::dropEvent( QDropEvent *event ) { - const QMimeData *mimeData = event->mimeData(); - QList urlList = mimeData->urls(); - if( urlList.size() == 1 ) { QString fileName = urlList.at( 0 ).toLocalFile(); @@ -1127,6 +1122,8 @@ Void plaYUVerApp::readSettings() move( pos ); resize( size ); m_cLastOpenPath = settings.lastOpenPath(); + m_appTool = ( enum eTool )settings.getSelectedTool(); + setAllSubWindowTool(); m_arrayActions[VIDEO_LOOP_ACT]->setChecked( settings.getRepeat() ); m_arrayActions[VIDEO_LOCK_ACT]->setChecked( settings.getVideoLock() ); } @@ -1137,6 +1134,7 @@ Void plaYUVerApp::writeSettings() settings.setMainWindowPos( pos() ); settings.setMainWindowSize( size() ); settings.setLastOpenPath( m_cLastOpenPath ); + settings.setSelectedTool( (Int)m_appTool ); settings.setPlayingSettings( m_arrayActions[VIDEO_LOOP_ACT]->isChecked(), m_arrayActions[VIDEO_LOCK_ACT]->isChecked() ); }