Changeset bd0c99d in subsurface


Ignore:
Timestamp:
Mar 26, 2017, 9:57:57 PM (6 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
588a83e3
Parents:
ae79135
git-author:
Joakim Bygdell <j.bygdell@…> (03/25/17 05:03:37)
git-committer:
Dirk Hohndel <dirk@…> (03/26/17 21:57:57)
Message:

MOBILE: Display pO2 and Setpoint for CCR dives

For CCR dives we want to display the setpoint and pO2 information,
due to the limited screensize we have to remove the temperature graph or
the view will be to cluttered.

Signed-off-by: Joakim Bygdell <j.bygdell@…>

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    rd87d97a rbd0c99d  
    160160                prefs.tankbar = git_prefs.tankbar;
    161161                prefs.dcceiling = git_prefs.dcceiling;
     162                prefs.show_ccr_setpoint = git_prefs.show_ccr_setpoint;
     163                prefs.show_ccr_sensors = git_prefs.show_ccr_sensors;
     164                prefs.pp_graphs.po2 = git_prefs.pp_graphs.po2;
    162165                process_dives(false, false);
    163166                DiveListModel::instance()->clear();
     
    549552        prefs.tankbar = git_prefs.tankbar;
    550553        prefs.dcceiling = git_prefs.dcceiling;
     554        prefs.show_ccr_setpoint = git_prefs.show_ccr_setpoint;
     555        prefs.show_ccr_sensors = git_prefs.show_ccr_sensors;
     556        prefs.pp_graphs.po2 = git_prefs.pp_graphs.po2;
    551557        DiveListModel::instance()->clear();
    552558        process_dives(false, false);
  • profile-widget/profilewidget2.cpp

    r597539c rbd0c99d  
    102102        diveComputerText(new DiveTextItem()),
    103103        reportedCeiling(new DiveReportedCeiling()),
    104 #ifndef SUBSURFACE_MOBILE
    105         diveCeiling(new DiveCalculatedCeiling(this)),
    106         decoModelParameters(new DiveTextItem()),
    107104        pn2GasItem(new PartialPressureGasItem()),
    108105        pheGasItem(new PartialPressureGasItem()),
     
    112109        ccrsensor2GasItem(new PartialPressureGasItem()),
    113110        ccrsensor3GasItem(new PartialPressureGasItem()),
     111#ifndef SUBSURFACE_MOBILE
     112        diveCeiling(new DiveCalculatedCeiling(this)),
     113        decoModelParameters(new DiveTextItem()),
    114114        heartBeatAxis(new DiveCartesianAxis(this)),
    115115        heartBeatItem(new DiveHeartrateItem()),
     
    181181        delete diveComputerText;
    182182        delete reportedCeiling;
    183 #ifndef SUBSURFACE_MOBILE
    184         delete toolTipItem;
    185         delete diveCeiling;
    186183        delete pn2GasItem;
    187184        delete pheGasItem;
     
    191188        delete ccrsensor2GasItem;
    192189        delete ccrsensor3GasItem;
     190#ifndef SUBSURFACE_MOBILE
     191        delete toolTipItem;
     192        delete diveCeiling;
    193193        delete heartBeatAxis;
    194194        delete heartBeatItem;
     
    226226        scene()->addItem(reportedCeiling);
    227227        scene()->addItem(tankItem);
    228 #ifndef SUBSURFACE_MOBILE
    229         scene()->addItem(toolTipItem);
    230         scene()->addItem(diveCeiling);
    231         scene()->addItem(decoModelParameters);
    232228        scene()->addItem(pn2GasItem);
    233229        scene()->addItem(pheGasItem);
     
    237233        scene()->addItem(ccrsensor2GasItem);
    238234        scene()->addItem(ccrsensor3GasItem);
     235#ifndef SUBSURFACE_MOBILE
     236        scene()->addItem(toolTipItem);
     237        scene()->addItem(diveCeiling);
     238        scene()->addItem(decoModelParameters);
    239239        scene()->addItem(percentageAxis);
    240240        scene()->addItem(heartBeatAxis);
     
    343343        setupItem(meanDepthItem, timeAxis, profileYAxis, dataModel, DivePlotDataModel::INSTANT_MEANDEPTH, DivePlotDataModel::TIME, 1);
    344344
    345 #ifndef SUBSURFACE_MOBILE
    346345#define CREATE_PP_GAS(ITEM, VERTICAL_COLUMN, COLOR, COLOR_ALERT, THRESHOULD_SETTINGS)              \
    347346        setupItem(ITEM, timeAxis, gasYAxis, dataModel, DivePlotDataModel::VERTICAL_COLUMN, DivePlotDataModel::TIME, 0); \
     
    358357        CREATE_PP_GAS(ccrsensor2GasItem, CCRSENSOR2, CCRSENSOR2, PO2_ALERT, &prefs.pp_graphs.po2_threshold);
    359358        CREATE_PP_GAS(ccrsensor3GasItem, CCRSENSOR3, CCRSENSOR3, PO2_ALERT, &prefs.pp_graphs.po2_threshold);
    360 
     359#undef CREATE_PP_GAS
     360#ifndef SUBSURFACE_MOBILE
    361361        // Visibility Connections
    362362        connect(SettingsObjectWrapper::instance()->pp_gas, &PartialPressureGasSettings::showPheChanged, pheGasItem, &PartialPressureGasItem::setVisible);
     
    370370        connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showCCRSensorsChanged, ccrsensor2GasItem, &PartialPressureGasItem::setVisible);
    371371        connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::showCCRSensorsChanged, ccrsensor3GasItem, &PartialPressureGasItem::setVisible);
    372 #undef CREATE_PP_GAS
    373372
    374373        heartBeatAxis->setTextVisible(true);
     
    439438        itemPos.partialPressure.pos.on.setX(97);
    440439        itemPos.partialPressure.pos.on.setY(75);
     440#ifdef SUBSURFACE_MOBILE
     441        itemPos.partialPressure.pos.on.setY(70);
     442#endif
    441443        itemPos.partialPressure.pos.off.setX(110);
    442444        itemPos.partialPressure.pos.off.setY(63);
    443445        itemPos.partialPressure.expanded.setP1(QPointF(0, 0));
    444446        itemPos.partialPressure.expanded.setP2(QPointF(0, 19));
     447#ifdef SUBSURFACE_MOBILE
     448        itemPos.partialPressure.expanded.setP2(QPointF(0, 20));
     449#endif
    445450        itemPos.partialPressureWithTankBar = itemPos.partialPressure;
    446451        itemPos.partialPressureWithTankBar.expanded.setP2(QPointF(0, 17));
     
    618623        }
    619624
    620 #ifndef SUBSURFACE_MOBILE
    621625        bool setpointflag = (currentdc->divemode == CCR) && prefs.pp_graphs.po2 && current_dive;
    622626        bool sensorflag = setpointflag && prefs.show_ccr_sensors;
     
    625629        ccrsensor2GasItem->setVisible(sensorflag && (currentdc->no_o2sensors > 1));
    626630        ccrsensor3GasItem->setVisible(sensorflag && (currentdc->no_o2sensors > 2));
    627 #endif
    628631
    629632        /* This struct holds all the data that's about to be plotted.
     
    704707#ifdef SUBSURFACE_MOBILE
    705708        if (currentdc->divemode == CCR) {
     709                gasYAxis->setPos(itemPos.partialPressure.pos.on);       
     710                gasYAxis->setLine(itemPos.partialPressure.expanded);
     711
    706712                tankItem->setVisible(false);
     713                pn2GasItem->setVisible(false);
     714                po2GasItem->setVisible(prefs.pp_graphs.po2);
     715                pheGasItem->setVisible(false);
     716                o2SetpointGasItem->setVisible(prefs.show_ccr_setpoint);
     717                ccrsensor1GasItem->setVisible(prefs.show_ccr_sensors);
     718                ccrsensor2GasItem->setVisible(prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
     719                ccrsensor3GasItem->setVisible(prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
     720                temperatureItem->setVisible(false);
    707721        } else {
    708722                tankItem->setVisible(prefs.tankbar);
     723                gasYAxis->setPos(itemPos.partialPressure.pos.off);
     724                pn2GasItem->setVisible(false);
     725                po2GasItem->setVisible(false);
     726                pheGasItem->setVisible(false);
     727                o2SetpointGasItem->setVisible(false);
     728                ccrsensor1GasItem->setVisible(false);
     729                ccrsensor2GasItem->setVisible(false);
     730                ccrsensor3GasItem->setVisible(false);
    709731        }
    710732#endif
     
    10371059        reportedCeiling->setVisible(false);
    10381060        tankItem->setVisible(false);
     1061        pn2GasItem->setVisible(false);
     1062        po2GasItem->setVisible(false);
     1063        pheGasItem->setVisible(false);
     1064        o2SetpointGasItem->setVisible(false);
     1065        ccrsensor1GasItem->setVisible(false);
     1066        ccrsensor2GasItem->setVisible(false);
     1067        ccrsensor3GasItem->setVisible(false);
    10391068#ifndef SUBSURFACE_MOBILE
    10401069        toolTipItem->setVisible(false);
     
    10421071        decoModelParameters->setVisible(false);
    10431072        rulerItem->setVisible(false);
    1044         pn2GasItem->setVisible(false);
    1045         po2GasItem->setVisible(false);
    1046         o2SetpointGasItem->setVisible(false);
    1047         ccrsensor1GasItem->setVisible(false);
    1048         ccrsensor2GasItem->setVisible(false);
    1049         ccrsensor3GasItem->setVisible(false);
    1050         pheGasItem->setVisible(false);
    10511073        ambPressureItem->setVisible(false);
    10521074        gflineItem->setVisible(false);
  • profile-widget/profilewidget2.h

    r9aa7399 rbd0c99d  
    193193        DiveTextItem *diveComputerText;
    194194        DiveReportedCeiling *reportedCeiling;
    195 #ifndef SUBSURFACE_MOBILE
    196         DiveCalculatedCeiling *diveCeiling;
    197         DiveTextItem *decoModelParameters;
    198         QList<DiveCalculatedTissue *> allTissues;
    199195        PartialPressureGasItem *pn2GasItem;
    200196        PartialPressureGasItem *pheGasItem;
     
    204200        PartialPressureGasItem *ccrsensor2GasItem;
    205201        PartialPressureGasItem *ccrsensor3GasItem;
     202#ifndef SUBSURFACE_MOBILE
     203        DiveCalculatedCeiling *diveCeiling;
     204        DiveTextItem *decoModelParameters;
     205        QList<DiveCalculatedTissue *> allTissues;
    206206        DiveCartesianAxis *heartBeatAxis;
    207207        DiveHeartrateItem *heartBeatItem;
Note: See TracChangeset for help on using the changeset viewer.