~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Mod/Raytracing/Gui/DlgSettingsRayImp.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-07-16 18:37:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090716183741-oww9kcxqrk991i1n
Tags: upstream-0.8.2237
Import upstream version 0.8.2237

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (c) 2002 J�rgen Riegel <juergen.riegel@web.de>              *
 
3
 *                                                                         *
 
4
 *   This file is part of the FreeCAD CAx development system.              *
 
5
 *                                                                         *
 
6
 *   This library is free software; you can redistribute it and/or         *
 
7
 *   modify it under the terms of the GNU Library General Public           *
 
8
 *   License as published by the Free Software Foundation; either          *
 
9
 *   version 2 of the License, or (at your option) any later version.      *
 
10
 *                                                                         *
 
11
 *   This library  is distributed in the hope that it will be useful,      *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU Library General Public License for more details.                  *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU Library General Public     *
 
17
 *   License along with this library; see the file COPYING.LIB. If not,    *
 
18
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
 
19
 *   Suite 330, Boston, MA  02111-1307, USA                                *
 
20
 *                                                                         *
 
21
 ***************************************************************************/
 
22
 
 
23
 
 
24
#include "PreCompiled.h"
 
25
 
 
26
#include "DlgSettingsRayImp.h"
 
27
#include <Gui/PrefWidgets.h>
 
28
#include <Base/Console.h>
 
29
 
 
30
using namespace RaytracingGui;
 
31
 
 
32
/**
 
33
 *  Constructs a DlgSettings3DViewImp which is a child of 'parent', with the 
 
34
 *  name 'name' and widget flags set to 'f' 
 
35
 */
 
36
DlgSettingsRayImp::DlgSettingsRayImp( QWidget* parent )
 
37
  : PreferencePage( parent )
 
38
{
 
39
    this->setupUi(this);
 
40
}
 
41
 
 
42
/** 
 
43
 *  Destroys the object and frees any allocated resources
 
44
 */
 
45
DlgSettingsRayImp::~DlgSettingsRayImp()
 
46
{
 
47
    // no need to delete child widgets, Qt does it all for us
 
48
}
 
49
 
 
50
void DlgSettingsRayImp::saveSettings()
 
51
{
 
52
    prefFileChooser1->onSave();
 
53
    prefLineEdit2->onSave();
 
54
    prefLineEdit3->onSave();
 
55
    prefFloatSpinBox1->onSave();
 
56
    prefCheckBox8->onSave();
 
57
    prefCheckBox9->onSave();
 
58
}
 
59
 
 
60
void DlgSettingsRayImp::loadSettings()
 
61
{
 
62
    prefFileChooser1->onRestore();
 
63
    prefLineEdit2->onRestore();
 
64
    prefLineEdit3->onRestore();
 
65
    prefFloatSpinBox1->onRestore();
 
66
    prefCheckBox8->onRestore();
 
67
    prefCheckBox9->onRestore();
 
68
}
 
69
 
 
70
/**
 
71
 * Sets the strings of the subwidgets using the current language.
 
72
 */
 
73
void DlgSettingsRayImp::changeEvent(QEvent *e)
 
74
{
 
75
    if (e->type() == QEvent::LanguageChange) {
 
76
        retranslateUi(this);
 
77
    }
 
78
    else {
 
79
        QWidget::changeEvent(e);
 
80
    }
 
81
}
 
82
 
 
83
#include "moc_DlgSettingsRayImp.cpp"