Changeset View
Changeset View
Standalone View
Standalone View
src/kdefrontend/dockwidgets/HypothesisTestDock.cpp
Context not available. | |||||
77 | 77 | | |||
---|---|---|---|---|---|
78 | ui.lPopulationSigma->setText( UTF8_QSTRING("σ")); | 78 | ui.lPopulationSigma->setText( UTF8_QSTRING("σ")); | ||
79 | 79 | | |||
80 | ui.chbCalculateStats->setChecked(true); | ||||
81 | | ||||
80 | // making all test blocks invisible at starting. | 82 | // making all test blocks invisible at starting. | ||
81 | ui.pbLeveneTest->hide(); | 83 | ui.pbLeveneTest->hide(); | ||
82 | ui.lCategorical->hide(); | 84 | ui.lCategorical->hide(); | ||
Context not available. | |||||
286 | 288 | | |||
287 | m_test |= ui.cbTestType->currentData().toInt(); | 289 | m_test |= ui.cbTestType->currentData().toInt(); | ||
288 | 290 | | |||
289 | ui.lCol1->show(); | | |||
290 | ui.cbCol1->show(); | | |||
291 | | ||||
292 | ui.lCol2->setVisible(testSubtype(m_test) != HypothesisTest::OneSample); | | |||
293 | ui.cbCol2->setVisible(testSubtype(m_test) != HypothesisTest::OneSample); | | |||
294 | | ||||
295 | ui.lCol3->setVisible(m_test == (HypothesisTest::Anova | HypothesisTest::TwoWay)); | | |||
296 | ui.cbCol3->setVisible(m_test == (HypothesisTest::Anova | HypothesisTest::TwoWay)); | | |||
297 | 291 | | |||
298 | ui.lCalculateStats->show(); | 292 | ui.lCalculateStats->show(); | ||
299 | ui.chbCalculateStats->show(); | 293 | ui.chbCalculateStats->show(); | ||
300 | ui.chbCalculateStats->setChecked(true); | | |||
301 | 294 | | |||
302 | ui.lEqualVariance->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | 295 | ui.lEqualVariance->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | ||
303 | ui.chbEqualVariance->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | 296 | ui.chbEqualVariance->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | ||
304 | ui.chbEqualVariance->setChecked(true); | | |||
305 | | ||||
306 | ui.lCategorical->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | | |||
307 | ui.chbCategorical->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | | |||
308 | | ||||
309 | 297 | | |||
310 | ui.lPopulationSigma->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::OneSample) || | 298 | ui.lPopulationSigma->setVisible(m_test == (HypothesisTest::TTest | HypothesisTest::OneSample) || | ||
311 | m_test == (HypothesisTest::ZTest | HypothesisTest::OneSample)); | 299 | m_test == (HypothesisTest::ZTest | HypothesisTest::OneSample)); | ||
Context not available. | |||||
578 | } | 566 | } | ||
579 | 567 | | |||
580 | void HypothesisTestDock::chbCalculateStatsStateChanged() { | 568 | void HypothesisTestDock::chbCalculateStatsStateChanged() { | ||
581 | if (!ui.chbCalculateStats->isChecked()) { | 569 | bool calculateStats = ui.chbCalculateStats->isChecked(); | ||
582 | ui.lVariables->hide(); | 570 | | ||
583 | ui.lCol1->hide(); | 571 | ui.lVariables->setVisible(calculateStats); | ||
584 | ui.cbCol1->hide(); | 572 | ui.lCol1->setVisible(calculateStats); | ||
585 | ui.lCol2->hide(); | 573 | ui.cbCol1->setVisible(calculateStats); | ||
586 | ui.cbCol2->hide(); | 574 | | ||
587 | ui.lCol3->hide(); | 575 | ui.lCol2->setVisible(calculateStats && testSubtype(m_test) != HypothesisTest::OneSample); | ||
588 | ui.cbCol3->hide(); | 576 | ui.cbCol2->setVisible(calculateStats && testSubtype(m_test) != HypothesisTest::OneSample); | ||
589 | } else { | 577 | | ||
590 | ui.lVariables->show(); | 578 | ui.lCol3->setVisible(calculateStats && m_test == (HypothesisTest::Anova | HypothesisTest::TwoWay)); | ||
591 | showHypothesisTest(); | 579 | ui.cbCol3->setVisible(calculateStats && m_test == (HypothesisTest::Anova | HypothesisTest::TwoWay)); | ||
592 | } | 580 | | ||
581 | ui.lCategorical->setVisible(calculateStats && m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | ||||
582 | ui.chbCategorical->setVisible(calculateStats && m_test == (HypothesisTest::TTest | HypothesisTest::TwoSampleIndependent)); | ||||
593 | 583 | | |||
594 | if (m_hypothesisTest != nullptr) | 584 | if (m_hypothesisTest != nullptr) | ||
595 | m_hypothesisTest->initInputStatsTable(m_test, ui.chbCalculateStats->isChecked()); | 585 | m_hypothesisTest->initInputStatsTable(m_test, ui.chbCalculateStats->isChecked()); | ||
Context not available. |