nitroxcalc/src/ 0000775 0001750 0001750 00000000000 14755652150 013061 5 ustar salvo salvo nitroxcalc/src/calcwrapper.h 0000664 0001750 0001750 00000002034 14755652150 015534 0 ustar salvo salvo /*
nitroxcalc
Copyright (C) 2015-2024 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
author Salvo "LtWorf" Tomaselli
*/
#ifndef CALCWRAPPER_H
#define CALCWRAPPER_H
#include
#include
class CalcWrapper : public QObject
{
Q_OBJECT
public:
Q_INVOKABLE QString mod(int ean);
Q_INVOKABLE QString bod(int ean);
Q_INVOKABLE QString ead(int ean, int depth);
};
#endif // CALCWRAPPER_H
nitroxcalc/src/calcwrapper.cpp 0000664 0001750 0001750 00000002717 14755652150 016077 0 ustar salvo salvo /*
nitroxcalc
Copyright (C) 2015-2024 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
author Salvo "LtWorf" Tomaselli
*/
#include "calcwrapper.h"
#include "calc.h"
QString CalcWrapper::mod(int ean) {
if (ean < 21 || ean > 40) {
return QString(" --- ");
}
return QString::number(maximum_operative_depth(ean)) + QString('m');
}
QString CalcWrapper::bod(int ean) {
if (ean < 21 || ean > 40) {
return QString(" --- ");
}
return QString::number(best_operative_depth(ean, 1)) + QString('m');
}
QString CalcWrapper::ead(int ean, int depth) {
if (ean < 21 || ean > 40 || depth < 5) {
return QString(" --- ");
}
int d = equivalent_air_depth(ean, depth);
if (depth >= maximum_operative_depth(ean)) {
return QString("Too deep!");
}
return QString::number(d) + QString('m');
}
nitroxcalc/src/build/ 0000775 0001750 0001750 00000000000 14755652150 014160 5 ustar salvo salvo nitroxcalc/src/build/Desktop-Debug/ 0000775 0001750 0001750 00000000000 14755652150 016615 5 ustar salvo salvo nitroxcalc/src/build/Desktop-Debug/nitroxcalc 0000775 0001750 0001750 00003616530 14755652150 020727 0 ustar salvo salvo ELF > p" @ @ 8 @ ) ( @ @ @ H H @ @ @ x x x x x @ @ P P P p p p $ $ X X X Std P P P Ptd Qtd Rtd ` ` GNU GNU gFjɐ+3?5K'/lib64/ld-linux-x86-64.so.2 4 @ 4 7 |emCEqX F b 7 1 S W d i ( " k o 8 , ~ v } M H 8 0 T @ f 8 " 0 0 _ITM_deregisterTMCloneTable __gmon_start__ _ITM_registerTMCloneTable _ZN15QGuiApplicationC1ERiPPci _ZN15QGuiApplicationD1Ev _ZN15QGuiApplication4execEv _ZN21QQmlApplicationEngineD1Ev _ZN21QQmlApplicationEngine4loadERK4QUrl _ZN11QQmlContext18setContextPropertyERK7QStringP7QObject _ZN20QQmlDebuggingEnablerC1Eb _ZNK10QQmlEngine11rootContextEv _ZN21QQmlApplicationEngineC1EP7QObject _ZNK11QMetaObject14classInfoCountEv _ZNK11QMetaObject15classInfoOffsetEv _ZN10QArrayData10deallocateEPS_mm _ZN7QObject11eventFilterEPS_P6QEvent _ZN7QObject11customEventEP6QEvent _ZN7QString6appendERKS_ _ZN7QObject10childEventEP11QChildEvent _ZNK11QObjectData17dynamicMetaObjectEv _Z9qt_assertPKcS0_i _ZN7QString6numberEii _ZN7QObject5eventEP6QEvent _Z7qstrcmpPKcS0_ _ZN4QUrlC1ERK7QStringNS_11ParsingModeE _ZN7QStringC1E5QChar _ZN7QObjectD2Ev _ZNK14QMetaClassInfo4nameEv _ZN7QObjectC2EPS_ _ZN7QString16fromAscii_helperEPKci qt_version_tag _ZTI7QObject _ZN7QObject11qt_metacallEN11QMetaObject4CallEiPPv _ZN7QObject16disconnectNotifyERK11QMetaMethod _ZN7QObject11qt_metacastEPKc _ZNK11QMetaObject9classInfoEi _ZN7QObject13connectNotifyERK11QMetaMethod _ZN7QObject16staticMetaObjectE _Z21qRegisterResourceDataiPKhS0_S0_ _Z23qUnregisterResourceDataiPKhS0_S0_ _ZN4QUrlD1Ev _ZN7QObject10timerEventEP11QTimerEvent _ZTVN10__cxxabiv120__si_class_type_infoE _ZdlPv __gxx_personality_v0 floor _Unwind_Resume strlen __cxa_atexit __libc_start_main __cxa_finalize strcmp libQt5Gui.so.5 libQt5Qml.so.5 libQt5Core.so.5 libstdc++.so.6 libm.so.6 libgcc_s.so.1 libc.so.6 _edata __bss_start _end GLIBC_2.2.5 GCC_3.0 CXXABI_1.3 GLIBCXX_3.4 Qt_5 GLIBC_2.34 Qt_5.15
ui
P&y ! 0 ӯk ) t) 4 % @ 0 E ui % @ P % @ P# % / # / ` 1 h1 1 "' P' h ( 0 ' 8 @ ! H % P 0 X ` , p 5 " ( &