Skip to content

Commit

Permalink
liteeditor: fix goaddtags ui size
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Feb 17, 2018
1 parent eb11fd4 commit b6e0d4b
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 14 deletions.
23 changes: 17 additions & 6 deletions liteidex/src/plugins/golangedit/goaddtagsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,22 @@ GoAddTagsDialog::GoAddTagsDialog(QWidget *parent) :
ui(new Ui::GoAddTagsDialog)
{
ui->setupUi(this);
connect(ui->jsonGroupBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));

connect(ui->jsonCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->jsonCheckBox,SIGNAL(toggled(bool)),ui->jsonGroupBox,SLOT(setEnabled(bool)));

connect(ui->jsonOptionsCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->jsonOptionsLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));

connect(ui->xmlGroupBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->xmlCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->xmlCheckBox,SIGNAL(toggled(bool)),ui->xmlGroupBox,SLOT(setEnabled(bool)));

connect(ui->xmlOptionsCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->xmlOptionsLineEdit,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));

connect(ui->customGroupBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->customCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));
connect(ui->customCheckBox,SIGNAL(toggled(bool)),ui->customGroupBox,SLOT(setEnabled(bool)));

connect(ui->customTagNameLineEdit1,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));
connect(ui->customTagOptionLineEdit1,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));
connect(ui->customTagNameLineEdit2,SIGNAL(textChanged(QString)),this,SLOT(updateaAguments()));
Expand All @@ -60,6 +67,10 @@ GoAddTagsDialog::GoAddTagsDialog(QWidget *parent) :
connect(ui->sortCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateaAguments()));

ui->snakeCaseRadioButton->setChecked(true);

ui->jsonGroupBox->setEnabled(false);
ui->xmlGroupBox->setEnabled(false);
ui->customGroupBox->setEnabled(false);
}

GoAddTagsDialog::~GoAddTagsDialog()
Expand Down Expand Up @@ -90,7 +101,7 @@ void GoAddTagsDialog::updateaAguments()
QStringList tagList;
QStringList optList;
QString tranform;
if (ui->jsonGroupBox->isChecked()) {
if (ui->jsonCheckBox->isChecked()) {
tagList << "json";
if (ui->jsonOptionsCheckBox->isChecked()) {
QStringList opt = ui->jsonOptionsLineEdit->text().trimmed().split(",",QString::SkipEmptyParts);
Expand All @@ -99,7 +110,7 @@ void GoAddTagsDialog::updateaAguments()
}
}
}
if (ui->xmlGroupBox->isChecked()) {
if (ui->xmlCheckBox->isChecked()) {
tagList << "xml";
if (ui->xmlOptionsCheckBox->isChecked()) {
QStringList opt = ui->xmlOptionsLineEdit->text().trimmed().split(",",QString::SkipEmptyParts);
Expand All @@ -108,7 +119,7 @@ void GoAddTagsDialog::updateaAguments()
}
}
}
if (ui->customGroupBox->isChecked()) {
if (ui->customCheckBox->isChecked()) {
QString tag1 = ui->customTagNameLineEdit1->text().trimmed();
QStringList opt1 = ui->customTagOptionLineEdit1->text().trimmed().split(",",QString::SkipEmptyParts);
QString tag2 = ui->customTagNameLineEdit2->text().trimmed();
Expand Down
51 changes: 44 additions & 7 deletions liteidex/src/plugins/golangedit/goaddtagsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,30 @@
<x>0</x>
<y>0</y>
<width>550</width>
<height>400</height>
<height>441</height>
</rect>
</property>
<property name="windowTitle">
<string>Add Tags To Struct Field</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QCheckBox" name="jsonCheckBox">
<property name="text">
<string>Add JSON Tag</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="jsonGroupBox">
<property name="title">
<string>Add JSON Tag</string>
<string/>
</property>
<property name="checkable">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
Expand Down Expand Up @@ -58,13 +68,20 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="xmlCheckBox">
<property name="text">
<string>Add XML Tag</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="xmlGroupBox">
<property name="title">
<string>Add XML Tag</string>
<string/>
</property>
<property name="checkable">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
Expand Down Expand Up @@ -102,13 +119,20 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="customCheckBox">
<property name="text">
<string>Add Custom Tags</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="customGroupBox">
<property name="title">
<string>Add Custom Tags</string>
<string/>
</property>
<property name="checkable">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
Expand Down Expand Up @@ -296,6 +320,19 @@
<item>
<widget class="QPlainTextEdit" name="argumentsEdit"/>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
Expand Down
18 changes: 17 additions & 1 deletion liteidex/src/plugins/golangedit/goremovetagsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
<x>0</x>
<y>0</y>
<width>550</width>
<height>360</height>
<height>395</height>
</rect>
</property>
<property name="windowTitle">
<string>Remove Tags From Struct Field</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
Expand Down Expand Up @@ -132,6 +135,19 @@
<item>
<widget class="QPlainTextEdit" name="argumentsEdit"/>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
Expand Down

0 comments on commit b6e0d4b

Please sign in to comment.