Skip to content

Commit

Permalink
fmk - toggling h1radio depending if 1x1 plan is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Jul 6, 2019
1 parent a381135 commit b99bb12
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 18 additions & 2 deletions DEDM_HRP.cpp
Expand Up @@ -123,8 +123,8 @@ DEDM_HRP::DEDM_HRP(RandomVariablesContainer *theRandomVariableIW, QWidget *paren
QLabel *h3Label = new QLabel("H=3");
QLabel *h4Label = new QLabel("H=4");
QLabel *h5Label = new QLabel("H=5");
QRadioButton *h1Radio = new QRadioButton();
QRadioButton *h2Radio = new QRadioButton();
h1Radio = new QRadioButton();
h2Radio = new QRadioButton();
QRadioButton *h3Radio = new QRadioButton();
QRadioButton *h4Radio = new QRadioButton();
QRadioButton *h5Radio = new QRadioButton();
Expand Down Expand Up @@ -253,10 +253,26 @@ DEDM_HRP::DEDM_HRP(RandomVariablesContainer *theRandomVariableIW, QWidget *paren
h1Radio->setChecked(true);
exp1Radio->setChecked(true);

connect(the1x1RadioButton, SIGNAL(toggled(bool)), this, SLOT(oneByOneToggled(bool)));
this->setLayout(layout);

}

void
DEDM_HRP::oneByOneToggled(bool toggle) {
qDebug() << "toggled" << toggle;
if (toggle == true) {
h1Radio->setEnabled(true);
} else {
if (h1Radio->isChecked() == true) {
h1Radio->setChecked(false);
h2Radio->setChecked(true);
}
h1Radio->setEnabled(false);
}

}

DEDM_HRP::~DEDM_HRP()
{

Expand Down
4 changes: 4 additions & 0 deletions DEDM_HRP.h
Expand Up @@ -51,6 +51,7 @@ class InputWidgetParameters;
class RandomVariablesContainer;
class QButtonGroup;
class QComboBox;
class QRadioButton;

class DEDM_HRP : public SimCenterAppWidget
{
Expand All @@ -69,9 +70,12 @@ class DEDM_HRP : public SimCenterAppWidget

public slots:
void clear(void);
void oneByOneToggled(bool);

private:

QRadioButton *h1Radio;
QRadioButton *h2Radio;
QVBoxLayout *layout;
QWidget *femSpecific;

Expand Down

0 comments on commit b99bb12

Please sign in to comment.