Skip to content
Snippets Groups Projects
Commit 45ef298b authored by Jan Möbius's avatar Jan Möbius
Browse files

Save on exit added to ini interface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6118 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 533710d1
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,16 @@ class INIInterface {
*/
virtual void saveIniFileOptions( INIFile& /*_ini*/ ) {};
/** \brief Save per Plugin settings when application is about to quit
*
* Before the Core is closed, this slot will be called per plugin to
* save per plugin settings.
*
* @param _ini ini file
*/
virtual void saveOnExit( INIFile& /*_ini*/ ) {};
/** @} */
......
......@@ -203,6 +203,9 @@ signals:
/// This signal is used to tell the plugins to load their new status after objects are loaded
void iniLoadOptionsLast( INIFile& _ini );
/// This signal is emitted before the core deletes its data and exits
void saveOnExit( INIFile& _ini );
/// Tell plugins to create a backup
void createBackup( int _id , QString _name , int nextBackupId_);
......
......@@ -553,6 +553,8 @@ void Core::writeApplicationOptions(INIFile& _ini) {
_ini.add_entry("Options" , "CustomAnaglyphRightEye", OpenFlipper::Options::anaglyphRightEyeColorMatrix() );
}
emit saveOnExit(_ini);
// _ini.add_entry("Options","Stereo",OpenFlipper::Options::stereo() );
}
......
......@@ -770,6 +770,10 @@ void Core::loadPlugin(QString filename, bool silent){
connect(this , SIGNAL(iniSaveOptions( INIFile& )),
plugin , SLOT( saveIniFileOptions( INIFile& ) ),Qt::DirectConnection);
if ( checkSlot( plugin , "saveOnExit(INIFile&)" ) )
connect(this , SIGNAL(saveOnExit( INIFile& )),
plugin , SLOT( saveOnExit( INIFile& ) ),Qt::DirectConnection);
if ( checkSlot( plugin , "loadIniFileOptions(INIFile&)" ) )
connect(this , SIGNAL(iniLoadOptions( INIFile& )),
plugin , SLOT( loadIniFileOptions( INIFile& ) ),Qt::DirectConnection);
......
......@@ -24,7 +24,7 @@
<View0 Encoding="" Type="Source" />
</Doc6>
<Doc7 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/widgets/glWidget/QtBaseViewer.cc" >
<View0 Encoding="" line="372" Type="Source" />
<View0 Encoding="" line="387" Type="Source" />
</Doc7>
</DocsAndViews>
<pluginList>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment