00001 /*************************************************************************** 00002 * Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> * 00003 * * 00004 * This file is part of the FreeCAD CAx development system. * 00005 * * 00006 * This library is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU Library General Public * 00008 * License as published by the Free Software Foundation; either * 00009 * version 2 of the License, or (at your option) any later version. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU Library General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Library General Public * 00017 * License along with this library; see the file COPYING.LIB. If not, * 00018 * write to the Free Software Foundation, Inc., 59 Temple Place, * 00019 * Suite 330, Boston, MA 02111-1307, USA * 00020 * * 00021 ***************************************************************************/ 00022 00023 00024 #include "PreCompiled.h" 00025 00026 #include "DlgSettingsDocumentImp.h" 00027 #include "PrefWidgets.h" 00028 00029 using namespace Gui::Dialog; 00030 00031 /* TRANSLATOR Gui::Dialog::DlgSettingsDocumentImp */ 00032 00037 DlgSettingsDocumentImp::DlgSettingsDocumentImp( QWidget* parent ) 00038 : PreferencePage( parent ) 00039 { 00040 this->setupUi(this); 00041 } 00042 00046 DlgSettingsDocumentImp::~DlgSettingsDocumentImp() 00047 { 00048 // no need to delete child widgets, Qt does it all for us 00049 } 00050 00051 00052 void DlgSettingsDocumentImp::saveSettings() 00053 { 00054 prefCheckNewDoc->onSave(); 00055 prefCompression->onSave(); 00056 00057 prefUndoRedo->onSave(); 00058 prefUndoRedoSize->onSave(); 00059 prefSaveTransaction->onSave(); 00060 prefDiscardTransaction->onSave(); 00061 prefSaveThumbnail->onSave(); 00062 prefSaveBackupFiles->onSave(); 00063 prefCountBackupFiles->onSave(); 00064 prefDuplicateLabel->onSave(); 00065 } 00066 00067 void DlgSettingsDocumentImp::loadSettings() 00068 { 00069 prefCheckNewDoc->onRestore(); 00070 prefCompression->onRestore(); 00071 00072 prefUndoRedo->onRestore(); 00073 prefUndoRedoSize->onRestore(); 00074 prefSaveTransaction->onRestore(); 00075 prefDiscardTransaction->onRestore(); 00076 prefSaveThumbnail->onRestore(); 00077 prefSaveBackupFiles->onRestore(); 00078 prefCountBackupFiles->onRestore(); 00079 prefDuplicateLabel->onRestore(); 00080 } 00081 00085 void DlgSettingsDocumentImp::changeEvent(QEvent *e) 00086 { 00087 if (e->type() == QEvent::LanguageChange) { 00088 retranslateUi(this); 00089 } 00090 else { 00091 QWidget::changeEvent(e); 00092 } 00093 } 00094 00095 #include "moc_DlgSettingsDocumentImp.cpp"