1 // File: SalomeApp_PreferencesDlg.cxx
2 // Author: Sergey TELKOV
4 #include "SalomeApp_PreferencesDlg.h"
6 #include "SalomeApp_Preferences.h"
14 SalomeApp_PreferencesDlg::SalomeApp_PreferencesDlg( SalomeApp_Preferences* prefs, QWidget* parent )
15 : QtxDialog( parent, 0, true, false, OK | Cancel | Apply ),
18 setCaption( tr( "CAPTION" ) );
20 QVBoxLayout* main = new QVBoxLayout( mainFrame(), 5 );
22 QVBox* base = new QVBox( mainFrame() );
23 main->addWidget( base );
25 myPrefs->reparent( base, QPoint( 0, 0 ), true );
27 setFocusProxy( myPrefs );
29 setDialogFlags( AlignOnce );
31 connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
32 connect( this, SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
38 SalomeApp_PreferencesDlg::~SalomeApp_PreferencesDlg()
43 myPrefs->reparent( 0, QPoint( 0, 0 ), false );
48 void SalomeApp_PreferencesDlg::show()
56 /*!Store preferences on accept.*/
57 void SalomeApp_PreferencesDlg::accept()
64 /*!Reject. Restore preferences from backup.*/
65 void SalomeApp_PreferencesDlg::reject()
69 myPrefs->fromBackup();
73 void SalomeApp_PreferencesDlg::onHelp()
77 /*!Store preferences on apply.*/
78 void SalomeApp_PreferencesDlg::onApply()