@@ -38,15 +38,22 @@ GoAddTagsDialog::GoAddTagsDialog(QWidget *parent) :
38
38
ui(new Ui::GoAddTagsDialog)
39
39
{
40
40
ui->setupUi (this );
41
- connect (ui->jsonGroupBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
41
+
42
+ connect (ui->jsonCheckBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
43
+ connect (ui->jsonCheckBox ,SIGNAL (toggled (bool )),ui->jsonGroupBox ,SLOT (setEnabled (bool )));
44
+
42
45
connect (ui->jsonOptionsCheckBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
43
46
connect (ui->jsonOptionsLineEdit ,SIGNAL (textChanged (QString)),this ,SLOT (updateaAguments ()));
44
47
45
- connect (ui->xmlGroupBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
48
+ connect (ui->xmlCheckBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
49
+ connect (ui->xmlCheckBox ,SIGNAL (toggled (bool )),ui->xmlGroupBox ,SLOT (setEnabled (bool )));
50
+
46
51
connect (ui->xmlOptionsCheckBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
47
52
connect (ui->xmlOptionsLineEdit ,SIGNAL (textChanged (QString)),this ,SLOT (updateaAguments ()));
48
53
49
- connect (ui->customGroupBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
54
+ connect (ui->customCheckBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
55
+ connect (ui->customCheckBox ,SIGNAL (toggled (bool )),ui->customGroupBox ,SLOT (setEnabled (bool )));
56
+
50
57
connect (ui->customTagNameLineEdit1 ,SIGNAL (textChanged (QString)),this ,SLOT (updateaAguments ()));
51
58
connect (ui->customTagOptionLineEdit1 ,SIGNAL (textChanged (QString)),this ,SLOT (updateaAguments ()));
52
59
connect (ui->customTagNameLineEdit2 ,SIGNAL (textChanged (QString)),this ,SLOT (updateaAguments ()));
@@ -60,6 +67,10 @@ GoAddTagsDialog::GoAddTagsDialog(QWidget *parent) :
60
67
connect (ui->sortCheckBox ,SIGNAL (toggled (bool )),this ,SLOT (updateaAguments ()));
61
68
62
69
ui->snakeCaseRadioButton ->setChecked (true );
70
+
71
+ ui->jsonGroupBox ->setEnabled (false );
72
+ ui->xmlGroupBox ->setEnabled (false );
73
+ ui->customGroupBox ->setEnabled (false );
63
74
}
64
75
65
76
GoAddTagsDialog::~GoAddTagsDialog ()
@@ -90,7 +101,7 @@ void GoAddTagsDialog::updateaAguments()
90
101
QStringList tagList;
91
102
QStringList optList;
92
103
QString tranform;
93
- if (ui->jsonGroupBox ->isChecked ()) {
104
+ if (ui->jsonCheckBox ->isChecked ()) {
94
105
tagList << " json" ;
95
106
if (ui->jsonOptionsCheckBox ->isChecked ()) {
96
107
QStringList opt = ui->jsonOptionsLineEdit ->text ().trimmed ().split (" ," ,QString::SkipEmptyParts);
@@ -99,7 +110,7 @@ void GoAddTagsDialog::updateaAguments()
99
110
}
100
111
}
101
112
}
102
- if (ui->xmlGroupBox ->isChecked ()) {
113
+ if (ui->xmlCheckBox ->isChecked ()) {
103
114
tagList << " xml" ;
104
115
if (ui->xmlOptionsCheckBox ->isChecked ()) {
105
116
QStringList opt = ui->xmlOptionsLineEdit ->text ().trimmed ().split (" ," ,QString::SkipEmptyParts);
@@ -108,7 +119,7 @@ void GoAddTagsDialog::updateaAguments()
108
119
}
109
120
}
110
121
}
111
- if (ui->customGroupBox ->isChecked ()) {
122
+ if (ui->customCheckBox ->isChecked ()) {
112
123
QString tag1 = ui->customTagNameLineEdit1 ->text ().trimmed ();
113
124
QStringList opt1 = ui->customTagOptionLineEdit1 ->text ().trimmed ().split (" ," ,QString::SkipEmptyParts);
114
125
QString tag2 = ui->customTagNameLineEdit2 ->text ().trimmed ();
0 commit comments