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 | Close | 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 setButtonPosition( Right, Close );
31 setDialogFlags( AlignOnce );
33 connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
34 connect( this, SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
40 SalomeApp_PreferencesDlg::~SalomeApp_PreferencesDlg()
45 myPrefs->reparent( 0, QPoint( 0, 0 ), false );
50 void SalomeApp_PreferencesDlg::show()
58 /*!Store preferences on accept.*/
59 void SalomeApp_PreferencesDlg::accept()
66 /*!Reject. Restore preferences from backup.*/
67 void SalomeApp_PreferencesDlg::reject()
71 myPrefs->fromBackup();
75 void SalomeApp_PreferencesDlg::onHelp()
79 /*!Store preferences on apply.*/
80 void SalomeApp_PreferencesDlg::onApply()