FreeCAD

Форк
0
/
DlgPrefsTechDrawAdvancedImp.cpp 
96 строк · 3.6 Кб
1
/***************************************************************************
2
 *   Copyright (c) 2015 FreeCAD Developers                                 *
3
 *   Author: WandererFan <wandererfan@gmail.com>                           *
4
 *   Based on src/Mod/FEM/Gui/DlgSettingsFEMImp.cpp                        *
5
 *                                                                         *
6
 *   This file is part of the FreeCAD CAx development system.              *
7
 *                                                                         *
8
 *   This library is free software; you can redistribute it and/or         *
9
 *   modify it under the terms of the GNU Library General Public           *
10
 *   License as published by the Free Software Foundation; either          *
11
 *   version 2 of the License, or (at your option) any later version.      *
12
 *                                                                         *
13
 *   This library  is distributed in the hope that it will be useful,      *
14
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
15
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
16
 *   GNU Library General Public License for more details.                  *
17
 *                                                                         *
18
 *   You should have received a copy of the GNU Library General Public     *
19
 *   License along with this library; see the file COPYING.LIB. If not,    *
20
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
21
 *   Suite 330, Boston, MA  02111-1307, USA                                *
22
 *                                                                         *
23
 ***************************************************************************/
24

25
#include "PreCompiled.h"
26

27
#include "DlgPrefsTechDrawAdvancedImp.h"
28
#include "ui_DlgPrefsTechDrawAdvanced.h"
29

30

31
using namespace TechDrawGui;
32

33
DlgPrefsTechDrawAdvancedImp::DlgPrefsTechDrawAdvancedImp( QWidget* parent )
34
  : PreferencePage( parent )
35
  , ui(new Ui_DlgPrefsTechDrawAdvancedImp)
36
{
37
    ui->setupUi(this);
38
}
39

40
DlgPrefsTechDrawAdvancedImp::~DlgPrefsTechDrawAdvancedImp()
41
{
42
    // no need to delete child widgets, Qt does it all for us
43
}
44

45
void DlgPrefsTechDrawAdvancedImp::saveSettings()
46
{
47
    ui->cbDetectFaces->onSave();
48
    ui->cbShowSectionEdges->onSave();
49
    ui->cbDebugSection->onSave();
50
    ui->cbDebugDetail->onSave();
51
    ui->cbCrazyEdges->onSave();
52
    ui->cbFuseBeforeSection->onSave();
53
    ui->pdsbEdgeFuzz->onSave();
54
    ui->pdsbMarkFuzz->onSave();
55
    ui->sbMaxTiles->onSave();
56
    ui->sbMaxPat->onSave();
57
    ui->cbReportProgress->onSave();
58
    ui->cbAutoCorrectRefs->onSave();
59
    ui->cbNewFaceFinder->onSave();
60
    ui->sbScrubCount->onSave();
61
}
62

63
void DlgPrefsTechDrawAdvancedImp::loadSettings()
64
{
65
    ui->cbDetectFaces->onRestore();
66
    ui->cbShowSectionEdges->onRestore();
67
    ui->cbDebugSection->onRestore();
68
    ui->cbDebugDetail->onRestore();
69
    ui->cbCrazyEdges->onRestore();
70
    ui->cbFuseBeforeSection->onRestore();
71
    ui->pdsbEdgeFuzz->onRestore();
72
    ui->pdsbMarkFuzz->onRestore();
73
    ui->sbMaxTiles->onRestore();
74
    ui->sbMaxPat->onRestore();
75
    ui->cbReportProgress->onRestore();
76
    ui->cbAutoCorrectRefs->onRestore();
77
    ui->cbNewFaceFinder->onRestore();
78
    ui->sbScrubCount->onRestore();
79
}
80

81
/**
82
 * Sets the strings of the subwidgets using the current language.
83
 */
84
void DlgPrefsTechDrawAdvancedImp::changeEvent(QEvent *e)
85
{
86
    if (e->type() == QEvent::LanguageChange) {
87
        saveSettings();
88
        ui->retranslateUi(this);
89
        loadSettings();
90
    }
91
    else {
92
        QWidget::changeEvent(e);
93
    }
94
}
95

96
#include <Mod/TechDraw/Gui/moc_DlgPrefsTechDrawAdvancedImp.cpp>
97

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.