00001 /*************************************************************************** 00002 * Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net> * 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 #ifndef _PreComp_ 00026 # include <QMessageBox> 00027 #endif 00028 00029 #include "DlgReportViewImp.h" 00030 #include "PrefWidgets.h" 00031 00032 00033 using namespace Gui::Dialog; 00034 00035 /* TRANSLATOR Gui::Dialog::DlgReportViewImp */ 00036 00044 DlgReportViewImp::DlgReportViewImp( QWidget* parent ) 00045 : PreferencePage(parent) 00046 { 00047 this->setupUi(this); 00048 } 00049 00053 DlgReportViewImp::~DlgReportViewImp() 00054 { 00055 } 00056 00057 void DlgReportViewImp::saveSettings() 00058 { 00059 checkLogging->onSave(); 00060 checkWarning->onSave(); 00061 checkError->onSave(); 00062 colorText->onSave(); 00063 colorLogging->onSave(); 00064 colorWarning->onSave(); 00065 colorError->onSave(); 00066 pythonOutput->onSave(); 00067 pythonError->onSave(); 00068 } 00069 00070 void DlgReportViewImp::loadSettings() 00071 { 00072 checkLogging->onRestore(); 00073 checkWarning->onRestore(); 00074 checkError->onRestore(); 00075 colorText->onRestore(); 00076 colorLogging->onRestore(); 00077 colorWarning->onRestore(); 00078 colorError->onRestore(); 00079 pythonOutput->blockSignals(true); 00080 pythonOutput->onRestore(); 00081 pythonOutput->blockSignals(false); 00082 pythonError->blockSignals(true); 00083 pythonError->onRestore(); 00084 pythonError->blockSignals(false); 00085 } 00086 00090 void DlgReportViewImp::changeEvent(QEvent *e) 00091 { 00092 if (e->type() == QEvent::LanguageChange) { 00093 retranslateUi(this); 00094 } 00095 else { 00096 QWidget::changeEvent(e); 00097 } 00098 } 00099 00100 #include "moc_DlgReportViewImp.cpp"