diff options
author | willemferguson <willemferguson@zoology.up.ac.za> | 2019-12-07 20:27:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-25 02:57:42 +0900 |
commit | 3e853e37a5b0b9509fb92b1ddb3031f117578fb9 (patch) | |
tree | 35281a57f8ca70611c78a85ef3dbfa459d9efacb /tests/testqPrefTechnicalDetails.cpp | |
parent | c121afc96c0135ada550de4504153434fa83feb4 (diff) | |
download | subsurface-3e853e37a5b0b9509fb92b1ddb3031f117578fb9.tar.gz |
Preferences UI: create new equipment tab
Remove the "Show unused cylinders" checkbox (Profile tab) and the
"Set default cylinder" qTextEdit box (General tab) and put them in a
separate and new Equipment tab. This sounds like a simple task but,
as can be seen from the files changed, was actually a complex matter.
Adapt the existing test programs (General and TechDetails) for creating
a test program that tests parts of the Equipment tab.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'tests/testqPrefTechnicalDetails.cpp')
-rw-r--r-- | tests/testqPrefTechnicalDetails.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/testqPrefTechnicalDetails.cpp b/tests/testqPrefTechnicalDetails.cpp index 9b6d88a45..b6272dbff 100644 --- a/tests/testqPrefTechnicalDetails.cpp +++ b/tests/testqPrefTechnicalDetails.cpp @@ -29,7 +29,6 @@ void TestQPrefTechnicalDetails::test_struct_get() prefs.calcndltts = true; prefs.dcceiling = true; prefs.display_deco_mode = BUEHLMANN; - prefs.display_unused_tanks = true; prefs.ead = true; prefs.gfhigh = 27; prefs.gflow = 25; @@ -56,7 +55,6 @@ void TestQPrefTechnicalDetails::test_struct_get() QCOMPARE(tst->calcndltts(), prefs.calcndltts); QCOMPARE(tst->dcceiling(), prefs.dcceiling); QCOMPARE(tst->display_deco_mode(), prefs.display_deco_mode); - QCOMPARE(tst->display_unused_tanks(), prefs.display_unused_tanks); QCOMPARE(tst->ead(), prefs.ead); QCOMPARE(tst->gfhigh(), prefs.gfhigh); QCOMPARE(tst->gflow(), prefs.gflow); @@ -91,7 +89,6 @@ void TestQPrefTechnicalDetails::test_set_struct() tst->set_calcndltts(false); tst->set_dcceiling(false); tst->set_display_deco_mode(RECREATIONAL); - tst->set_display_unused_tanks(false); tst->set_ead(false); tst->set_gfhigh(29); tst->set_gflow(24); @@ -118,7 +115,6 @@ void TestQPrefTechnicalDetails::test_set_struct() QCOMPARE(prefs.calcndltts, false); QCOMPARE(prefs.dcceiling, false); QCOMPARE(prefs.display_deco_mode, RECREATIONAL); - QCOMPARE(prefs.display_unused_tanks, false); QCOMPARE(prefs.ead, false); QCOMPARE(prefs.gfhigh, 29); QCOMPARE(prefs.gflow, 24); @@ -153,7 +149,6 @@ void TestQPrefTechnicalDetails::test_set_load_struct() tst->set_calcndltts(false); tst->set_dcceiling(true); tst->set_display_deco_mode(RECREATIONAL); - tst->set_display_unused_tanks(false); tst->set_ead(false); tst->set_gfhigh(29); tst->set_gflow(24); @@ -181,7 +176,6 @@ void TestQPrefTechnicalDetails::test_set_load_struct() prefs.calcndltts = true; prefs.dcceiling = false; prefs.display_deco_mode = BUEHLMANN; - prefs.display_unused_tanks = true; prefs.ead = true; prefs.gfhigh = 27; prefs.gflow = 25; @@ -209,7 +203,6 @@ void TestQPrefTechnicalDetails::test_set_load_struct() QCOMPARE(prefs.calcndltts, false); QCOMPARE(prefs.dcceiling, true); QCOMPARE(prefs.display_deco_mode, RECREATIONAL); - QCOMPARE(prefs.display_unused_tanks, false); QCOMPARE(prefs.ead, false); QCOMPARE((int)prefs.gfhigh, 29); QCOMPARE((int)prefs.gflow, 24); @@ -244,7 +237,6 @@ void TestQPrefTechnicalDetails::test_struct_disk() prefs.calcndltts = true; prefs.dcceiling = true; prefs.display_deco_mode = BUEHLMANN; - prefs.display_unused_tanks = true; prefs.ead = true; prefs.gfhigh = 11; prefs.gflow = 12; @@ -273,7 +265,6 @@ void TestQPrefTechnicalDetails::test_struct_disk() prefs.calcndltts = false; prefs.dcceiling = false; prefs.display_deco_mode = RECREATIONAL; - prefs.display_unused_tanks = false; prefs.ead = false; prefs.gfhigh = 27; prefs.gflow = 25; @@ -301,7 +292,6 @@ void TestQPrefTechnicalDetails::test_struct_disk() QCOMPARE(prefs.calcndltts, true); QCOMPARE(prefs.dcceiling, true); QCOMPARE(prefs.display_deco_mode, BUEHLMANN); - QCOMPARE(prefs.display_unused_tanks, true); QCOMPARE(prefs.ead, true); QCOMPARE(prefs.gfhigh, 11); QCOMPARE(prefs.gflow, 12); @@ -399,8 +389,6 @@ void TestQPrefTechnicalDetails::test_oldPreferences() TEST(tecDetails->zoomed_plot(), true); tecDetails->set_show_sac(true); TEST(tecDetails->show_sac(), true); - tecDetails->set_display_unused_tanks(true); - TEST(tecDetails->display_unused_tanks(), true); tecDetails->set_show_average_depth(true); TEST(tecDetails->show_average_depth(), true); tecDetails->set_show_pictures_in_profile(true); @@ -438,8 +426,6 @@ void TestQPrefTechnicalDetails::test_oldPreferences() TEST(tecDetails->zoomed_plot(), false); tecDetails->set_show_sac(false); TEST(tecDetails->show_sac(), false); - tecDetails->set_display_unused_tanks(false); - TEST(tecDetails->display_unused_tanks(), false); tecDetails->set_show_average_depth(false); TEST(tecDetails->show_average_depth(), false); tecDetails->set_show_pictures_in_profile(false); @@ -454,7 +440,6 @@ void TestQPrefTechnicalDetails::test_signals() QSignalSpy spy4(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::calcndlttsChanged); QSignalSpy spy5(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::dcceilingChanged); QSignalSpy spy6(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::display_deco_modeChanged); - QSignalSpy spy7(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::display_unused_tanksChanged); QSignalSpy spy8(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::eadChanged); QSignalSpy spy9(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::gfhighChanged); QSignalSpy spy10(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::gflowChanged); @@ -487,8 +472,6 @@ void TestQPrefTechnicalDetails::test_signals() prefs.dcceiling = true; qPrefTechnicalDetails::set_dcceiling(false); qPrefTechnicalDetails::set_display_deco_mode(VPMB); - prefs.display_unused_tanks = true; - qPrefTechnicalDetails::set_display_unused_tanks(false); prefs.ead = true; qPrefTechnicalDetails::set_ead(false); qPrefTechnicalDetails::set_gfhigh(-29); @@ -532,7 +515,6 @@ void TestQPrefTechnicalDetails::test_signals() QCOMPARE(spy4.count(), 1); QCOMPARE(spy5.count(), 1); QCOMPARE(spy6.count(), 1); - QCOMPARE(spy7.count(), 1); QCOMPARE(spy8.count(), 1); QCOMPARE(spy9.count(), 1); QCOMPARE(spy10.count(), 1); @@ -560,7 +542,6 @@ void TestQPrefTechnicalDetails::test_signals() QVERIFY(spy4.takeFirst().at(0).toBool() == false); QVERIFY(spy5.takeFirst().at(0).toBool() == false); QVERIFY(spy6.takeFirst().at(0).toInt() == VPMB); - QVERIFY(spy7.takeFirst().at(0).toBool() == false); QVERIFY(spy8.takeFirst().at(0).toBool() == false); QVERIFY(spy9.takeFirst().at(0).toInt() == -29); QVERIFY(spy10.takeFirst().at(0).toInt() == -24); |