Skip to content

Commit

Permalink
Solved large empty areas problem after changing visibiliy
Browse files Browse the repository at this point in the history
When choosing the 'LC matching' topolgy after 'Multistage lambda/4'
there were large empty areas. This problem is solved by setting a size
constraint in the main layout...

I also renamed 'LC matching' as 'L-section' since I reckon that it is
more meaninful and replaced the 'Ohms' labels by the Greek letter \Omega
  • Loading branch information
andresmmera committed Feb 19, 2017
1 parent d39781d commit 600ea38
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions qucs/qucs/dialogs/matchdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ MatchDialog::MatchDialog(QWidget *parent)
DoubleVal = new QDoubleValidator(this);

all = new QHBoxLayout(this);
all->setSizeConstraint(QLayout::SetFixedSize);

/* The main frame was divided into two vertical layouts. The first one, on the left side, is much the
old matching tool whereas the other layout was included specifically for microstrip synthesis.
Expand Down Expand Up @@ -124,8 +125,6 @@ MatchDialog::MatchDialog(QWidget *parent)
hsubs->addWidget(ResistivityLabel, 6, 0);
hsubs->addWidget(ResistivityEdit, 6, 1);

// hsubs->insertStretch(-1, 1); // Remove spacing between layouts.

QHBoxLayout *h4 = new QHBoxLayout();
h4->setSpacing(3);
TopoLabel = new QLabel(tr("Method"));
Expand All @@ -134,12 +133,12 @@ MatchDialog::MatchDialog(QWidget *parent)
// Matching network topology
TopoCombo = new QComboBox();
TopoCombo->setFixedWidth(220);
TopoCombo->addItem(tr("LC matching"));
TopoCombo->addItem(tr("L-section"));
TopoCombo->addItem(tr("Single stub"));
TopoCombo->addItem(tr("Double stub"));
QString str = tr("Multistage ") + QString(QChar(0xBB, 0x03)) + "/4";
TopoCombo->addItem(str);
TopoCombo->addItem("Cascaded LC sections");
TopoCombo->addItem("Cascaded L-sections");
str = QString(QChar(0xBB, 0x03)) + "/8 +" + QString(QChar(0xBB, 0x03)) + "/4 transformer";
TopoCombo->addItem(str);

Expand Down Expand Up @@ -233,14 +232,14 @@ MatchDialog::MatchDialog(QWidget *parent)
Ref1Edit = new QLineEdit("50");
Ref1Edit->setMaximumWidth(75);
Ref1Edit->setValidator(DoubleVal);
Ohm1Label = new QLabel(tr("Ohms"));
Ohm1Label = new QLabel(QString(QChar(0xA9, 0x03)));
connect(Ref1Edit, SIGNAL(textChanged(const QString&)),
SLOT(slotImpedanceChanged(const QString&)));
Port2Label = new QLabel(tr("Port 2"));
Ref2Edit = new QLineEdit("50");
Ref2Edit->setMaximumWidth(75);
Ref2Edit->setValidator(DoubleVal);
Ohm2Label = new QLabel(tr("Ohms"));
Ohm2Label = new QLabel(QString(QChar(0xA9, 0x03)));
ImpLayout->addWidget(Port1Label);
ImpLayout->addWidget(Ref1Edit);
ImpLayout->addWidget(Ohm1Label);
Expand Down Expand Up @@ -401,7 +400,6 @@ MatchDialog::MatchDialog(QWidget *parent)

slotReflexionChanged(""); // calculate impedance
setFrequency(1e9); // set 1GHz
this->adjustSize();
}

MatchDialog::~MatchDialog()
Expand Down Expand Up @@ -536,7 +534,6 @@ void MatchDialog::slotChangeMode_TopoCombo()
OrderLabel->setVisible(false);
OrderEdit->setVisible(false);
}
this->adjustSize();
}

// -----------------------------------------------------------------------
Expand Down

0 comments on commit 600ea38

Please sign in to comment.