FreeCAD

Форк
0
/
DlgPrefsMeasureAppearanceImp.cpp 
70 строк · 2.6 Кб
1
/**************************************************************************
2
 *   Copyright (c) 2023 Wanderer Fan <wandererfan@gmail.com>               *
3
 *                                                                         *
4
 *   This file is part of FreeCAD.                                         *
5
 *                                                                         *
6
 *   FreeCAD is free software: you can redistribute it and/or modify it    *
7
 *   under the terms of the GNU Lesser General Public License as           *
8
 *   published by the Free Software Foundation, either version 2.1 of the  *
9
 *   License, or (at your option) any later version.                       *
10
 *                                                                         *
11
 *   FreeCAD is distributed in the hope that it will be useful, but        *
12
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      *
14
 *   Lesser General Public License for more details.                       *
15
 *                                                                         *
16
 *   You should have received a copy of the GNU Lesser General Public      *
17
 *   License along with FreeCAD. If not, see                               *
18
 *   <https://www.gnu.org/licenses/>.                                      *
19
 *                                                                         *
20
 **************************************************************************/
21

22
#include "PreCompiled.h"
23

24
#include "DlgPrefsMeasureAppearanceImp.h"
25
#include "ui_DlgPrefsMeasureAppearanceImp.h"
26

27
using namespace MeasureGui;
28

29
DlgPrefsMeasureAppearanceImp::DlgPrefsMeasureAppearanceImp(QWidget* parent)
30
    : PreferencePage(parent)
31
    , ui(new Ui_DlgPrefsMeasureAppearanceImp)
32
{
33
    ui->setupUi(this);
34
}
35

36
DlgPrefsMeasureAppearanceImp::~DlgPrefsMeasureAppearanceImp()
37
{
38
    // no need to delete child widgets, Qt does it all for us
39
}
40

41
void DlgPrefsMeasureAppearanceImp::saveSettings()
42
{
43
    ui->sbFontSize->onSave();
44
    ui->cbText->onSave();
45
    ui->cbLine->onSave();
46
    ui->cbBackground->onSave();
47
}
48

49
void DlgPrefsMeasureAppearanceImp::loadSettings()
50
{
51
    ui->sbFontSize->onRestore();
52
    ui->cbText->onRestore();
53
    ui->cbBackground->onRestore();
54
    ui->cbLine->onRestore();
55
}
56

57
/**
58
 * Sets the strings of the subwidgets using the current language.
59
 */
60
void DlgPrefsMeasureAppearanceImp::changeEvent(QEvent* e)
61
{
62
    if (e->type() == QEvent::LanguageChange) {
63
        ui->retranslateUi(this);
64
    }
65
    else {
66
        QWidget::changeEvent(e);
67
    }
68
}
69

70
#include <Mod/Measure/Gui/moc_DlgPrefsMeasureAppearanceImp.cpp>
71

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

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

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

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