Subject: [PATCH] Reorganise toolbar buttons on dive profile panel

1) Reorganise toolbar buttons to resemble the order of
   buttons for version 4.1. I hope this is a sensible
   grouping of the buttons. Those with graphical effects
   on the profile widget first, then those that modify
   the Information Box on the profile, then the graphical
   tools "measure" and "zoom", then the graphical components
   that are a bit more specialised.
2) Add a toolbar button for the CCR oxygen sensor analysis at
   the bottom of the profile tool bar. For the moment this button
   duplicates the action of the topmost button, i.e. show the PO2
   graph. After implementation it will show the PO2 measurements
   of individual CCR O2 sensors.

Signed-off-by: willem ferguson <[email protected]>

>From 03e6c2f534b4541095f51d27bb20fb7f9d1a6d2d Mon Sep 17 00:00:00 2001
From: willem ferguson <[email protected]>
Date: Wed, 31 Dec 2014 22:00:38 +0200
Subject: [PATCH] [PATCH] Reorganise toolbar buttons on dive profile panel

1) Reorganise toolbar buttons to resemble the order of
   buttons for version 4.1. I hope this is a sensible
   grouping of the buttons. Those with graphical effects
   on the profile widget first, then those that modify
   the Information Box on the profile, then the graphical
   tools "measure" and "zoom", then the graphical components
   that are a bit more specialised.
2) Add a toolbar button for the CCR oxygen sensor analysis at
   the bottom of the profile tool bar. For the moment this button
   duplicates the action of the topmost button, i.e. show the PO2
   graph. After implementation it will shw the PO2 measurements
   of individual CCR O2 sensors.

Signed-off-by: willem ferguson <[email protected]>
---
 icons/icon_CCR.png   | Bin 0 -> 1332 bytes
 qt-ui/mainwindow.cpp |  10 ++++++----
 qt-ui/mainwindow.h   |   1 +
 qt-ui/mainwindow.ui  |  12 ++++++++++++
 subsurface.qrc       |   1 +
 5 files changed, 20 insertions(+), 4 deletions(-)
 create mode 100644 icons/icon_CCR.png

diff --git a/icons/icon_CCR.png b/icons/icon_CCR.png
new file mode 100644
index 0000000000000000000000000000000000000000..1b4ea4a5ec081b74ef4a8d21240414fd8289624c
GIT binary patch
literal 1332
zcmV-41<U%0P)<h;3K|Lk000e1NJLTq000*N000*V1^@s6;40Lh00006VoOIv0RI60
z0RN!9r;`8x010qNS#tmY3ljhU3ljk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S
zFbv$@{e)+|oh(S5$Ly30e);Y!uRU&RJMIARp!)$)<|ype;5hXeF*CT(eu0vP60&l#
z064R@oUe|qV$sxG=1iK!LuWH*>(BF3K?wliRvUjkx=L)sM7~JL#Hv}TY_G(?ATJ>=
z*m>53EZlxKecnDAUo|2SjJMgT-ux@m<EHS?+01yGoj*37XIk830B$_K#r{8kWapwn
z0xCeo;|f}PThWBZy0mq{m}qHfF={$%*jv9Bf#CRp<HUx<zV|w7+v}<8xQl^7YT_gg
zH6Oq*43;D>Vbj!2!-Gp8*nDd<&99m<FgQ5-Aek|lc$N2^0%mEZy0e-+b$gIVl59zo
zXO|C)j-klah0glx>uGhh;!{3y5^`Aa=?bPrPQ$PKC_^EIM3Wi~FB_<6so;k51}14D
zHYAoK^N(Pb=6C0Ls2)mDZ4uX>T}KFkC*UE%62VOSOya}hak`z<y{N<GabeLcc$Jq7
zdj^MQ9UA+yc$3wA{yuip?x3Tu19!m9uy+Einw4lvG>7LLCej@F;osb7*VowHh=D;s
q1;`wqIh34Z)tK-%Zr&FA(E1MvrT!fbJRyhx0000<MNUMnLSTZw5pz-i

literal 0
HcmV?d00001

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 72ece9a..f137a2b 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -74,10 +74,10 @@ MainWindow::MainWindow() : QMainWindow(),
 	m_Instance = this;
 	ui.setupUi(this);
 	ui.multiFilter->hide();
-	profileToolbarActions << ui.profCalcAllTissues << ui.profCalcCeiling << ui.profDcCeiling << ui.profEad <<
-		    ui.profHR << ui.profIncrement3m << ui.profMod << ui.profNdl_tts << ui.profNdl_tts <<
-		    ui.profPhe << ui.profPn2 << ui.profPO2 << ui.profRuler << ui.profSAC << ui.profScaled <<
-		    ui.profTogglePicture << ui.profTankbar << ui.profTissues;
+	profileToolbarActions << ui.profPO2 << ui.profPn2 << ui.profPhe << ui.profCalcCeiling <<
+		    ui.profIncrement3m << ui.profCalcAllTissues << ui.profDcCeiling  << ui.profTogglePicture <<
+		    ui.profEad << ui.profMod << ui.profNdl_tts << ui.profSAC << ui.profRuler <<
+		    ui.profScaled << ui.profTankbar << ui.profTissues << ui.profHR << ui.profCCR;
 	setWindowIcon(QIcon(":subsurface-icon"));
 	if (!QIcon::hasThemeIcon("window-close")) {
 		QIcon::setThemeName("subsurface");
@@ -884,6 +884,7 @@ void MainWindow::readSettings()
 	TOOLBOX_PREF_BUTTON(pp_graphs.phe, phegraph, profPhe);
 	TOOLBOX_PREF_BUTTON(pp_graphs.pn2, pn2graph, profPn2);
 	TOOLBOX_PREF_BUTTON(pp_graphs.po2, po2graph, profPO2);
+	TOOLBOX_PREF_BUTTON(pp_graphs.po2, po2graph, profCCR);
 	TOOLBOX_PREF_BUTTON(hrgraph, hrgraph, profHR);
 	TOOLBOX_PREF_BUTTON(rulergraph, rulergraph, profRuler);
 	TOOLBOX_PREF_BUTTON(show_sac, show_sac, profSAC);
@@ -1396,6 +1397,7 @@ TOOLBOX_PREF_PROFILE(profNdl_tts, calcndltts, calcndltts);
 TOOLBOX_PREF_PROFILE(profPhe, pp_graphs.phe, phegraph);
 TOOLBOX_PREF_PROFILE(profPn2, pp_graphs.pn2, pn2graph);
 TOOLBOX_PREF_PROFILE(profPO2, pp_graphs.po2, po2graph);
+TOOLBOX_PREF_PROFILE(profCCR, pp_graphs.po2, po2graph);
 TOOLBOX_PREF_PROFILE(profHR, hrgraph, hrgraph);
 TOOLBOX_PREF_PROFILE(profRuler, rulergraph, rulergraph);
 TOOLBOX_PREF_PROFILE(profSAC, show_sac, show_sac);
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 8a9d6f3..38d8384 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -139,6 +139,7 @@ slots:
 	void on_profPO2_triggered(bool triggered);
 	void on_profPhe_triggered(bool triggered);
 	void on_profPn2_triggered(bool triggered);
+	void on_profCCR_triggered(bool triggered);
 	void on_profHR_triggered(bool triggered);
 	void on_profRuler_triggered(bool triggered);
 	void on_profSAC_triggered(bool triggered);
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index dc38a0d..4356a86 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -659,6 +659,18 @@ p, li { white-space: pre-wrap; }
     <string>Toggle pO₂ graph</string>
    </property>
   </action>
+  <action name="profCCR">
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="icon">
+    <iconset resource="../subsurface.qrc">
+     <normaloff>:/icon_CCR</normaloff>:/icon_CCR</iconset>
+   </property>
+   <property name="text">
+    <string>Toggle CCR O₂ analysis</string>
+   </property>
+  </action>
   <action name="profPn2">
    <property name="checkable">
     <bool>true</bool>
diff --git a/subsurface.qrc b/subsurface.qrc
index d75b0aa..1ae6c98 100644
--- a/subsurface.qrc
+++ b/subsurface.qrc
@@ -53,6 +53,7 @@
         <file alias="icon_he">icons/he.png</file>
         <file alias="icon_n2">icons/n2.png</file>
         <file alias="icon_o2">icons/o2.png</file>
+        <file alias="icon_CCR">icons/icon_CCR.png</file>
         <file alias="icon_ceiling_calculated">icons/ss.png</file>
         <file alias="icon_ceiling_alltissues">icons/icon-ceiling-alltissues.png</file>
         <file alias="icon_NDLTTS">icons/limit.png</file>
-- 
1.9.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to