-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
74 lines (61 loc) · 1.87 KB
/
Copy pathmainwindow.cpp
File metadata and controls
74 lines (61 loc) · 1.87 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtDebug>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_checkBox_co_stateChanged(int arg1)
{
ui->checkBox_chi->blockSignals(true);
ui->checkBox_eng->blockSignals(true);
ui->checkBox_jp->blockSignals(true);
ui->checkBox_chi->setChecked(arg1 == Qt::Checked);
ui->checkBox_eng->setChecked(arg1 == Qt::Checked);
ui->checkBox_jp->setChecked(arg1 == Qt::Checked);
ui->checkBox_chi->blockSignals(false);
ui->checkBox_eng->blockSignals(false);
ui->checkBox_jp->blockSignals(false);
}
void MainWindow::on_checkBox_chi_stateChanged(int arg1)
{
Qt::CheckState state;
if (arg1 == ui->checkBox_eng->checkState() && arg1 == ui->checkBox_jp->checkState()){
state = (Qt::CheckState)arg1;
} else {
state = Qt::PartiallyChecked;
}
ui->checkBox_co->blockSignals(true);
ui->checkBox_co->setCheckState( state);
ui->checkBox_co->blockSignals(false);
}
void MainWindow::on_checkBox_eng_stateChanged(int arg1)
{
Qt::CheckState state;
if (arg1 == ui->checkBox_chi->checkState() && arg1 == ui->checkBox_jp->checkState()){
state = (Qt::CheckState)arg1;
} else {
state = Qt::PartiallyChecked;
}
ui->checkBox_co->blockSignals(true);
ui->checkBox_co->setCheckState( state);
ui->checkBox_co->blockSignals(false);
}
void MainWindow::on_checkBox_jp_stateChanged(int arg1)
{
Qt::CheckState state;
if (arg1 == ui->checkBox_chi->checkState() && arg1 == ui->checkBox_eng->checkState()){
state = (Qt::CheckState)arg1;
} else {
state = Qt::PartiallyChecked;
}
ui->checkBox_co->blockSignals(true);
ui->checkBox_co->setCheckState( state);
ui->checkBox_co->blockSignals(false);
}