mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Merge branch 'minMaxAvgWidget' of https://github.com/tcanabrava/subsurface
This commit is contained in:
commit
3fa6d981b0
9 changed files with 370 additions and 239 deletions
2
Makefile
2
Makefile
|
@ -47,6 +47,7 @@ HEADERS = \
|
||||||
qt-ui/kmessagewidget.h \
|
qt-ui/kmessagewidget.h \
|
||||||
qt-ui/downloadfromdivecomputer.h \
|
qt-ui/downloadfromdivecomputer.h \
|
||||||
qt-ui/preferences.h \
|
qt-ui/preferences.h \
|
||||||
|
qt-ui/simplewidgets.h \
|
||||||
|
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
|
@ -78,6 +79,7 @@ SOURCES = \
|
||||||
qt-ui/kmessagewidget.cpp \
|
qt-ui/kmessagewidget.cpp \
|
||||||
qt-ui/downloadfromdivecomputer.cpp \
|
qt-ui/downloadfromdivecomputer.cpp \
|
||||||
qt-ui/preferences.cpp \
|
qt-ui/preferences.cpp \
|
||||||
|
qt-ui/simplewidgets.cpp \
|
||||||
$(RESFILE)
|
$(RESFILE)
|
||||||
|
|
||||||
|
|
||||||
|
|
66
icons/average.svg
Normal file
66
icons/average.svg
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="minimum.svg">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="23.708333"
|
||||||
|
inkscape:cx="12"
|
||||||
|
inkscape:cy="12"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="748"
|
||||||
|
inkscape:window-x="-2"
|
||||||
|
inkscape:window-y="-3"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Camada 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1028.3622)">
|
||||||
|
<path
|
||||||
|
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 2.6122756,1043.36 c -0.6609274,0.6609 -0.6609274,1.7256 0,2.3865 l 0.088388,0.088 c 0.6609274,0.6609 1.725558,0.6609 2.3864854,0 l 7.093166,-7.0932 7.181553,7.1816 c 0.660927,0.6609 1.725558,0.6609 2.386485,0 l 0.110485,-0.1105 c 0.660928,-0.6609 0.660928,-1.7256 0,-2.3865 l -8.374795,-8.3748 -0.0442,-0.044 c -0.01589,-0.016 -0.02785,-0.029 -0.04419,-0.044 -0.660927,-0.6609 -1.725558,-0.6609 -2.386485,0 l -8.3968938,8.3969 z"
|
||||||
|
id="rect2985"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 2.6508842,1037.4777 c -0.6609274,-0.6609 -0.6609274,-1.7256 0,-2.3865 l 0.088388,-0.088 c 0.6609274,-0.6609 1.7255583,-0.6609 2.3864853,0 l 7.0931655,7.0932 7.181553,-7.1816 c 0.660927,-0.6609 1.725558,-0.6609 2.386485,0 l 0.110485,0.1105 c 0.660928,0.6609 0.660928,1.7256 0,2.3865 l -8.374795,8.3748 -0.0442,0.044 c -0.01589,0.016 -0.02785,0.029 -0.04419,0.044 -0.660927,0.6609 -1.725558,0.6609 -2.386484,0 l -8.3968942,-8.3969 z"
|
||||||
|
id="rect2985-6"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
66
icons/maximum.svg
Normal file
66
icons/maximum.svg
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="Novo documento 1">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="23.708333"
|
||||||
|
inkscape:cx="12"
|
||||||
|
inkscape:cy="12.02109"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="748"
|
||||||
|
inkscape:window-x="-2"
|
||||||
|
inkscape:window-y="-3"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Camada 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1028.3622)">
|
||||||
|
<path
|
||||||
|
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 2.4435586,1039.0094 c -0.6609274,0.6609 -0.6609274,1.7256 0,2.3865 l 0.088388,0.088 c 0.6609274,0.6609 1.725558,0.6609 2.3864854,0 l 7.093166,-7.0932 7.181553,7.1816 c 0.660927,0.6609 1.725558,0.6609 2.386485,0 l 0.110485,-0.1105 c 0.660928,-0.6609 0.660928,-1.7256 0,-2.3865 l -8.374795,-8.3748 -0.0442,-0.044 c -0.01589,-0.016 -0.02785,-0.029 -0.04419,-0.044 -0.660927,-0.6609 -1.725558,-0.6609 -2.386485,0 l -8.3968938,8.3969 z"
|
||||||
|
id="rect2985"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 2.6508842,1047.0718 c -0.6609274,0.6609 -0.6609274,1.7256 0,2.3865 l 0.088388,0.088 c 0.6609274,0.6609 1.7255583,0.6609 2.3864853,0 l 7.0931655,-7.0932 7.181553,7.1816 c 0.660927,0.6609 1.725558,0.6609 2.386485,0 l 0.110485,-0.1105 c 0.660928,-0.6609 0.660928,-1.7256 0,-2.3865 l -8.374795,-8.3748 -0.0442,-0.044 c -0.01589,-0.016 -0.02785,-0.029 -0.04419,-0.044 -0.660927,-0.6609 -1.725558,-0.6609 -2.386484,0 l -8.3968942,8.3969 z"
|
||||||
|
id="rect2985-6"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
66
icons/minimum.svg
Normal file
66
icons/minimum.svg
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="maximum.svg">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="23.708333"
|
||||||
|
inkscape:cx="12"
|
||||||
|
inkscape:cy="12.02109"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="748"
|
||||||
|
inkscape:window-x="-2"
|
||||||
|
inkscape:window-y="-3"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Camada 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-1028.3622)">
|
||||||
|
<path
|
||||||
|
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 2.4435586,1041.2378 c -0.6609274,-0.6609 -0.6609274,-1.7256 0,-2.3865 l 0.088388,-0.088 c 0.6609274,-0.6609 1.725558,-0.6609 2.3864854,0 l 7.093166,7.0932 7.181553,-7.1816 c 0.660927,-0.6609 1.725558,-0.6609 2.386485,0 l 0.110485,0.1105 c 0.660928,0.6609 0.660928,1.7256 0,2.3865 l -8.374795,8.3748 -0.0442,0.044 c -0.01589,0.016 -0.02785,0.029 -0.04419,0.044 -0.660927,0.6609 -1.725558,0.6609 -2.386485,0 l -8.3968938,-8.3969 z"
|
||||||
|
id="rect2985"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 2.6508842,1033.1754 c -0.6609274,-0.6609 -0.6609274,-1.7256 0,-2.3865 l 0.088388,-0.088 c 0.6609274,-0.6609 1.7255583,-0.6609 2.3864853,0 l 7.0931655,7.0932 7.181553,-7.1816 c 0.660927,-0.6609 1.725558,-0.6609 2.386485,0 l 0.110485,0.1105 c 0.660928,0.6609 0.660928,1.7256 0,2.3865 l -8.374795,8.3748 -0.0442,0.044 c -0.01589,0.016 -0.02785,0.029 -0.04419,0.044 -0.660927,0.6609 -1.725558,0.6609 -2.386484,0 l -8.3968942,-8.3969 z"
|
||||||
|
id="rect2985-6"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
|
@ -137,20 +137,12 @@ void MainTab::clearInfo()
|
||||||
|
|
||||||
void MainTab::clearStats()
|
void MainTab::clearStats()
|
||||||
{
|
{
|
||||||
ui->maximumDepthAllText->clear();
|
ui->depthLimits->clear();
|
||||||
ui->minimumDepthAllText->clear();
|
ui->sacLimits->clear();
|
||||||
ui->averageDepthAllText->clear();
|
|
||||||
ui->maximumSacAllText->clear();
|
|
||||||
ui->minimumSacAllText->clear();
|
|
||||||
ui->averageSacAllText->clear();
|
|
||||||
ui->divesAllText->clear();
|
ui->divesAllText->clear();
|
||||||
ui->maximumTemperatureAllText->clear();
|
ui->tempLimits->clear();
|
||||||
ui->minimumTemperatureAllText->clear();
|
|
||||||
ui->averageTemperatureAllText->clear();
|
|
||||||
ui->totalTimeAllText->clear();
|
ui->totalTimeAllText->clear();
|
||||||
ui->averageTimeAllText->clear();
|
ui->timeLimits->clear();
|
||||||
ui->longestAllText->clear();
|
|
||||||
ui->shortestAllText->clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UPDATE_TEXT(d, field) \
|
#define UPDATE_TEXT(d, field) \
|
||||||
|
@ -217,29 +209,29 @@ void MainTab::updateDiveInfo(int dive)
|
||||||
else
|
else
|
||||||
ui->airPressureText->clear();
|
ui->airPressureText->clear();
|
||||||
ui->visibility->setCurrentStars(d->visibility);
|
ui->visibility->setCurrentStars(d->visibility);
|
||||||
ui->maximumDepthAllText->setText(get_depth_string(stats_selection.max_depth, TRUE));
|
ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, TRUE));
|
||||||
ui->minimumDepthAllText->setText(get_depth_string(stats_selection.min_depth, TRUE));
|
ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, TRUE));
|
||||||
ui->averageDepthAllText->setText(get_depth_string(stats_selection.avg_depth, TRUE));
|
ui->depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, TRUE));
|
||||||
ui->maximumSacAllText->setText(get_volume_string(stats_selection.max_sac, TRUE).append(tr("/min")));
|
ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, TRUE).append(tr("/min")));
|
||||||
ui->minimumSacAllText->setText(get_volume_string(stats_selection.min_sac, TRUE).append(tr("/min")));
|
ui->sacLimits->setMinimum(get_volume_string(stats_selection.min_sac, TRUE).append(tr("/min")));
|
||||||
ui->averageSacAllText->setText(get_volume_string(stats_selection.avg_sac, TRUE).append(tr("/min")));
|
ui->sacLimits->setAverage(get_volume_string(stats_selection.avg_sac, TRUE).append(tr("/min")));
|
||||||
ui->divesAllText->setText(QString::number(stats_selection.selection_size));
|
ui->divesAllText->setText(QString::number(stats_selection.selection_size));
|
||||||
temp.mkelvin = stats_selection.max_temp;
|
temp.mkelvin = stats_selection.max_temp;
|
||||||
ui->maximumTemperatureAllText->setText(get_temperature_string(temp, TRUE));
|
ui->tempLimits->setMaximum(get_temperature_string(temp, TRUE));
|
||||||
temp.mkelvin = stats_selection.min_temp;
|
temp.mkelvin = stats_selection.min_temp;
|
||||||
ui->minimumTemperatureAllText->setText(get_temperature_string(temp, TRUE));
|
ui->tempLimits->setMinimum(get_temperature_string(temp, TRUE));
|
||||||
if (stats_selection.combined_temp && stats_selection.combined_count) {
|
if (stats_selection.combined_temp && stats_selection.combined_count) {
|
||||||
const char *unit;
|
const char *unit;
|
||||||
get_temp_units(0, &unit);
|
get_temp_units(0, &unit);
|
||||||
ui->averageTemperatureAllText->setText(QString("%1%2").arg(stats_selection.combined_temp / stats_selection.combined_count, 0, 'f', 1).arg(unit));
|
ui->tempLimits->setAverage(QString("%1%2").arg(stats_selection.combined_temp / stats_selection.combined_count, 0, 'f', 1).arg(unit));
|
||||||
}
|
}
|
||||||
ui->totalTimeAllText->setText(get_time_string(stats_selection.total_time.seconds, 0));
|
ui->totalTimeAllText->setText(get_time_string(stats_selection.total_time.seconds, 0));
|
||||||
int seconds = stats_selection.total_time.seconds;
|
int seconds = stats_selection.total_time.seconds;
|
||||||
if (stats_selection.selection_size)
|
if (stats_selection.selection_size)
|
||||||
seconds /= stats_selection.selection_size;
|
seconds /= stats_selection.selection_size;
|
||||||
ui->averageTimeAllText->setText(get_time_string(seconds, 0));
|
ui->timeLimits->setAverage(get_time_string(seconds, 0));
|
||||||
ui->longestAllText->setText(get_time_string(stats_selection.longest_time.seconds, 0));
|
ui->timeLimits->setMaximum(get_time_string(stats_selection.longest_time.seconds, 0));
|
||||||
ui->shortestAllText->setText(get_time_string(stats_selection.shortest_time.seconds, 0));
|
ui->timeLimits->setMinimum(get_time_string(stats_selection.shortest_time.seconds, 0));
|
||||||
cylindersModel->setDive(d);
|
cylindersModel->setDive(d);
|
||||||
weightModel->setDive(d);
|
weightModel->setDive(d);
|
||||||
addCylinder->setEnabled(true);
|
addCylinder->setEnabled(true);
|
||||||
|
@ -272,20 +264,12 @@ void MainTab::updateDiveInfo(int dive)
|
||||||
weightModel->clear();
|
weightModel->clear();
|
||||||
addCylinder->setEnabled(false);
|
addCylinder->setEnabled(false);
|
||||||
addWeight->setEnabled(false);
|
addWeight->setEnabled(false);
|
||||||
ui->maximumDepthAllText->clear();
|
ui->depthLimits->clear();
|
||||||
ui->minimumDepthAllText->clear();
|
ui->sacLimits->clear();
|
||||||
ui->averageDepthAllText->clear();
|
|
||||||
ui->maximumSacAllText->clear();
|
|
||||||
ui->minimumSacAllText->clear();
|
|
||||||
ui->averageSacAllText->clear();
|
|
||||||
ui->divesAllText->clear();
|
ui->divesAllText->clear();
|
||||||
ui->maximumTemperatureAllText->clear();
|
ui->tempLimits->clear();
|
||||||
ui->minimumTemperatureAllText->clear();
|
|
||||||
ui->averageTemperatureAllText->clear();
|
|
||||||
ui->totalTimeAllText->clear();
|
ui->totalTimeAllText->clear();
|
||||||
ui->averageTimeAllText->clear();
|
ui->timeLimits->clear();
|
||||||
ui->longestAllText->clear();
|
|
||||||
ui->shortestAllText->clear();
|
|
||||||
}
|
}
|
||||||
/* statisticsTab*/
|
/* statisticsTab*/
|
||||||
/* we can access the stats_selection struct, but how do we ensure the relevant dives are selected
|
/* we can access the stats_selection struct, but how do we ensure the relevant dives are selected
|
||||||
|
|
230
qt-ui/maintab.ui
230
qt-ui/maintab.ui
|
@ -14,7 +14,7 @@
|
||||||
<string>TabWidget</string>
|
<string>TabWidget</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="documentMode">
|
<property name="documentMode">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -453,40 +453,26 @@
|
||||||
<string>Stats</string>
|
<string>Stats</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout1">
|
<layout class="QGridLayout" name="gridLayout1">
|
||||||
<item row="2" column="0">
|
<item row="0" column="2">
|
||||||
<widget class="QGroupBox" name="groupBox_8b">
|
<widget class="QGroupBox" name="groupBox_4b">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Max. Temp.</string>
|
<string>SAC</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5b">
|
<layout class="QHBoxLayout" name="horizontalLayout_10b">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="maximumTemperatureAllText">
|
<widget class="MinMaxAvgWidget" name="sacLimits" native="true"/>
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QGroupBox" name="groupBox_2b">
|
<widget class="QGroupBox" name="groupBox_8b">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Min Depth</string>
|
<string>Temperature</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3b">
|
<layout class="QHBoxLayout" name="horizontalLayout_5b">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="minimumDepthAllText">
|
<widget class="MinMaxAvgWidget" name="tempLimits" native="true"/>
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -494,196 +480,28 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="groupBoxb">
|
<widget class="QGroupBox" name="groupBoxb">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Max. Depth</string>
|
<string>Depth</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2b">
|
<layout class="QHBoxLayout" name="horizontalLayout_2b">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="maximumDepthAllText">
|
<widget class="MinMaxAvgWidget" name="depthLimits" native="true"/>
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>maximumDepthAllText</zorder>
|
|
||||||
<zorder>minimumDepthAllText</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_10b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Ave. Temp.</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="averageTemperatureAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
<item row="1" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_12b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Ave. Time</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="averageTimeAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QGroupBox" name="groupBox_9b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Min. Temp.</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="minimumTemperatureAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_3b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Ave. Depth</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="averageDepthAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_4b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Max. SAC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_10b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="maximumSacAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QGroupBox" name="groupBox_5b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Min. SAC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="minimumSacAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_6b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Ave. SAC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8b">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="averageSacAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_7b">
|
|
||||||
<property name="title">
|
|
||||||
<string>Dives</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="divesAllText">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QGroupBox" name="groupBox_13">
|
<widget class="QGroupBox" name="groupBox_13">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Longest</string>
|
<string>Duration</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12b">
|
<layout class="QHBoxLayout" name="horizontalLayout_12b">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="longestAllText">
|
<widget class="MinMaxAvgWidget" name="timeLimits" native="true"/>
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="1" column="1">
|
||||||
<widget class="QGroupBox" name="groupBox_11b">
|
<widget class="QGroupBox" name="groupBox_11b">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Total Time</string>
|
<string>Total Time</string>
|
||||||
|
@ -702,14 +520,14 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="1" column="2">
|
||||||
<widget class="QGroupBox" name="groupBox_14">
|
<widget class="QGroupBox" name="groupBox_7b">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Shortest</string>
|
<string>Dives</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="shortestAllText">
|
<widget class="QLabel" name="divesAllText">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -737,6 +555,12 @@
|
||||||
<header>starwidget.h</header>
|
<header>starwidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>MinMaxAvgWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>simplewidgets.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|
92
qt-ui/simplewidgets.cpp
Normal file
92
qt-ui/simplewidgets.cpp
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
#include "simplewidgets.h"
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QIcon>
|
||||||
|
|
||||||
|
class MinMaxAvgWidgetPrivate{
|
||||||
|
public:
|
||||||
|
QLabel *avgIco, *avgValue;
|
||||||
|
QLabel *minIco, *minValue;
|
||||||
|
QLabel *maxIco, *maxValue;
|
||||||
|
|
||||||
|
MinMaxAvgWidgetPrivate(MinMaxAvgWidget *owner){
|
||||||
|
avgIco = new QLabel(owner);
|
||||||
|
avgIco->setPixmap(QIcon(":/average").pixmap(16,16));
|
||||||
|
avgIco->setToolTip(QObject::tr("Average"));
|
||||||
|
minIco = new QLabel(owner);
|
||||||
|
minIco->setPixmap(QIcon(":/minimum").pixmap(16,16));
|
||||||
|
minIco->setToolTip(QObject::tr("Minimum"));
|
||||||
|
maxIco = new QLabel(owner);
|
||||||
|
maxIco->setPixmap(QIcon(":/maximum").pixmap(16,16));
|
||||||
|
maxIco->setToolTip(QObject::tr("Maximum"));
|
||||||
|
avgValue = new QLabel(owner);
|
||||||
|
minValue = new QLabel(owner);
|
||||||
|
maxValue = new QLabel(owner);
|
||||||
|
|
||||||
|
QGridLayout *formLayout = new QGridLayout();
|
||||||
|
formLayout->addWidget(maxIco, 0, 0);
|
||||||
|
formLayout->addWidget(maxValue, 0, 1);
|
||||||
|
formLayout->addWidget(avgIco, 1, 0);
|
||||||
|
formLayout->addWidget(avgValue, 1, 1);
|
||||||
|
formLayout->addWidget(minIco, 2, 0);
|
||||||
|
formLayout->addWidget(minValue, 2, 1);
|
||||||
|
owner->setLayout(formLayout);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
double MinMaxAvgWidget::average() const
|
||||||
|
{
|
||||||
|
return d->avgValue->text().toDouble();
|
||||||
|
}
|
||||||
|
|
||||||
|
double MinMaxAvgWidget::maximum() const
|
||||||
|
{
|
||||||
|
return d->maxValue->text().toDouble();
|
||||||
|
}
|
||||||
|
double MinMaxAvgWidget::minimum() const
|
||||||
|
{
|
||||||
|
return d->minValue->text().toDouble();
|
||||||
|
}
|
||||||
|
|
||||||
|
MinMaxAvgWidget::MinMaxAvgWidget(QWidget* parent)
|
||||||
|
: d(new MinMaxAvgWidgetPrivate(this)){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinMaxAvgWidget::clear()
|
||||||
|
{
|
||||||
|
d->avgValue->setText(QString());
|
||||||
|
d->maxValue->setText(QString());
|
||||||
|
d->minValue->setText(QString());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinMaxAvgWidget::setAverage(double average)
|
||||||
|
{
|
||||||
|
d->avgValue->setText(QString::number(average));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinMaxAvgWidget::setMaximum(double maximum)
|
||||||
|
{
|
||||||
|
d->maxValue->setText(QString::number(maximum));
|
||||||
|
}
|
||||||
|
void MinMaxAvgWidget::setMinimum(double minimum)
|
||||||
|
{
|
||||||
|
d->minValue->setText(QString::number(minimum));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinMaxAvgWidget::setAverage(const QString& average)
|
||||||
|
{
|
||||||
|
d->avgValue->setText(average);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinMaxAvgWidget::setMaximum(const QString& maximum)
|
||||||
|
{
|
||||||
|
d->maxValue->setText(maximum);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MinMaxAvgWidget::setMinimum(const QString& minimum)
|
||||||
|
{
|
||||||
|
d->minValue->setText(minimum);
|
||||||
|
}
|
28
qt-ui/simplewidgets.h
Normal file
28
qt-ui/simplewidgets.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef SIMPLEWIDGETS_H
|
||||||
|
#define SIMPLEWIDGETS_H
|
||||||
|
|
||||||
|
class MinMaxAvgWidgetPrivate;
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class MinMaxAvgWidget : public QWidget{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(double minimum READ minimum WRITE setMinimum)
|
||||||
|
Q_PROPERTY(double maximum READ maximum WRITE setMaximum)
|
||||||
|
Q_PROPERTY(double average READ average WRITE setAverage)
|
||||||
|
public:
|
||||||
|
MinMaxAvgWidget(QWidget *parent);
|
||||||
|
double minimum() const;
|
||||||
|
double maximum() const;
|
||||||
|
double average() const;
|
||||||
|
void setMinimum(double minimum);
|
||||||
|
void setMaximum(double maximum);
|
||||||
|
void setAverage(double average);
|
||||||
|
void setMinimum(const QString& minimum);
|
||||||
|
void setMaximum(const QString& maximum);
|
||||||
|
void setAverage(const QString& average);
|
||||||
|
void clear();
|
||||||
|
private:
|
||||||
|
MinMaxAvgWidgetPrivate *d;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -7,5 +7,8 @@
|
||||||
<file alias="units">icons/units.png</file>
|
<file alias="units">icons/units.png</file>
|
||||||
<file alias="advanced">icons/advanced.png</file>
|
<file alias="advanced">icons/advanced.png</file>
|
||||||
<file alias="graph">icons/graph.png</file>
|
<file alias="graph">icons/graph.png</file>
|
||||||
|
<file alias="minimum">icons/minimum.svg</file>
|
||||||
|
<file alias="maximum">icons/maximum.svg</file>
|
||||||
|
<file alias="average">icons/average.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in a new issue