+ mySaved = true;
+}
+
+/*! Restore default preferences*/
+void LightApp_PreferencesDlg::onDefault()
+{
+ if( SUIT_MessageBox::Ok == SUIT_MessageBox::question( this, tr( "WARNING" ), tr( "DEFAULT_QUESTION" ),
+ SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
+ SUIT_MessageBox::Ok ) )
+ {
+ if ( myPrefs && myPrefs->resourceMgr() )
+ {
+ QtxResourceMgr::WorkingMode prev = myPrefs->resourceMgr()->workingMode();
+ myPrefs->resourceMgr()->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
+ myPrefs->retrieve();
+ myPrefs->resourceMgr()->setWorkingMode( prev );
+ }
+ }
+}
+
+/*! Import preferences from some file */
+void LightApp_PreferencesDlg::onImportPref()
+{
+ QtxResourceMgr* mgr = myPrefs->resourceMgr();
+ QStringList filtersList;
+ filtersList.append(tr("XML_FILES_FILTER"));
+ QString anInitialPath = "";
+ if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+ anInitialPath = QDir::currentPath();
+
+ QString aName = SUIT_FileDlg::getFileName( this, anInitialPath, filtersList, tr("IMPORT_PREFERENCES"), true, true );
+
+ if( mgr->import( aName ) )
+ {
+ myPrefs->retrieve();
+ myPrefs->toBackup();
+ }