forked from goldendict/goldendict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chineseconversion.cc
30 lines (25 loc) · 982 Bytes
/
chineseconversion.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* This file is (c) 2015 Zhe Wang <[email protected]>
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include "chineseconversion.hh"
#include "ui_chineseconversion.h"
ChineseConversion::ChineseConversion(QWidget * parent, Config::Chinese const & cfg) :
QGroupBox(parent),
ui(new Ui::ChineseConversion)
{
ui->setupUi( this );
setChecked( cfg.enable );
ui->enableSCToTWConversion->setChecked( cfg.enableSCToTWConversion );
ui->enableSCToHKConversion->setChecked( cfg.enableSCToHKConversion );
ui->enableTCToSCConversion->setChecked( cfg.enableTCToSCConversion );
}
ChineseConversion::~ChineseConversion()
{
delete ui;
}
void ChineseConversion::getConfig( Config::Chinese & cfg ) const
{
cfg.enable = isChecked();
cfg.enableSCToTWConversion = ui->enableSCToTWConversion->isChecked();
cfg.enableSCToHKConversion = ui->enableSCToHKConversion->isChecked();
cfg.enableTCToSCConversion = ui->enableTCToSCConversion->isChecked();
}