summaryrefslogtreecommitdiffstats
path: root/color.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-17 22:01:41 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-17 22:01:41 -0700
commitf3f7bf51fa1dbe9cdb859e1a45b20c108613275b (patch)
treea28814b4d3d59ff26b41ecfe71670c03fe2ce71d /color.h
parent082ec43eeabe92c7d65d3ab0f189e8fb43016f35 (diff)
parent56dbb7c2ff697a393f5051e2b5363bd4c0f2bb6e (diff)
downloadsubsurface-f3f7bf51fa1dbe9cdb859e1a45b20c108613275b.tar.gz
Merge branch 'Qt'
After the 3.1 release it is time to shift the focus on the Qt effort - and the best way to do this is to merge the changes in the Qt branch into master. Linus was extremely nice and did a merge for me. I decided to do my own merge instead (which by accident actually based on a different version of the Qt branch) and then used his merge to double check what I was doing. I resolved a few things differently but overall what we did was very much the same (and I say this with pride since Linus is a professional git merger) Here's his merge commit message: This is a rough and tumble merge of the Qt branch into 'master', trying to sort out the conflicts as best as I could. There were two major kinds of conflicts: - the Makefile changes, in particular the split of the single Makefile into Rules.mk and Configure.mk, along with the obvious Qt build changes themselves. Those changes conflicted with some of the updates done in mainline wrt "release" targets and some helper macros ($(NAME) etc). Resolved by largely taking the Qt branch versions, and then editing in the most obvious parts of the Makefile updates from mainline. NOTE! The script/get_version shell script was made to just fail silently on not finding a git repository, which avoided having to take some particularly ugly Makefile changes. - Various random updates in mainline to support things like dive tags. The conflicts were mainly to the gtk GUI parts, which obviously looked different afterwards. I fixed things up to look like the newer code, but since the gtk files themselves are actually dead in the Qt branch, this is largely irrelevant. NOTE! This does *NOT* introduce the equivalent Qt functionality. The fields are there in the code now, but there's no Qt UI for the whole dive tag stuff etc. This seems to compile for me (although I have to force "QMAKE=qmake-qt4" on f19), and results in a Linux binary that seems to work, but it is otherwise largely untested. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'color.h')
-rw-r--r--color.h80
1 files changed, 41 insertions, 39 deletions
diff --git a/color.h b/color.h
index 5d88fb5f7..f2013bcc9 100644
--- a/color.h
+++ b/color.h
@@ -4,54 +4,56 @@
/* The colors are named by picking the closest match
from http://chir.ag/projects/name-that-color */
+#include <QColor>
+
// Greens
-#define CAMARONE1 { 0.0, 0.4, 0.0, 1 }
-#define FUNGREEN1 { 0.0, 0.4, 0.2, 1 }
-#define FUNGREEN1_HIGH_TRANS { 0.0, 0.4, 0.2, 0.25 }
-#define KILLARNEY1 { 0.2, 0.4, 0.2, 1 }
-#define APPLE1 { 0.2, 0.6, 0.2, 1 }
-#define APPLE1_MED_TRANS { 0.2, 0.6, 0.2, 0.5 }
-#define APPLE1_HIGH_TRANS { 0.2, 0.6, 0.2, 0.25 }
-#define LIMENADE1 { 0.4, 0.8, 0.0, 1 }
-#define ATLANTIS1 { 0.4, 0.8, 0.2, 1 }
-#define ATLANTIS2 { 0.6, 0.8, 0.2, 1 }
-#define RIOGRANDE1 { 0.8, 0.8, 0.0, 1 }
-#define EARLSGREEN1 { 0.8, 0.8, 0.2, 1 }
-#define FORESTGREEN1 { 0.1, 0.5, 0.1, 1 }
+#define CAMARONE1 QColor::fromRgbF( 0.0, 0.4, 0.0, 1 )
+#define FUNGREEN1 QColor::fromRgbF( 0.0, 0.4, 0.2, 1 )
+#define FUNGREEN1_HIGH_TRANS QColor::fromRgbF( 0.0, 0.4, 0.2, 0.25 )
+#define KILLARNEY1 QColor::fromRgbF( 0.2, 0.4, 0.2, 1 )
+#define APPLE1 QColor::fromRgbF( 0.2, 0.6, 0.2, 1 )
+#define APPLE1_MED_TRANS QColor::fromRgbF( 0.2, 0.6, 0.2, 0.5 )
+#define APPLE1_HIGH_TRANS QColor::fromRgbF( 0.2, 0.6, 0.2, 0.25 )
+#define LIMENADE1 QColor::fromRgbF( 0.4, 0.8, 0.0, 1 )
+#define ATLANTIS1 QColor::fromRgbF( 0.4, 0.8, 0.2, 1 )
+#define ATLANTIS2 QColor::fromRgbF( 0.6, 0.8, 0.2, 1 )
+#define RIOGRANDE1 QColor::fromRgbF( 0.8, 0.8, 0.0, 1 )
+#define EARLSGREEN1 QColor::fromRgbF( 0.8, 0.8, 0.2, 1 )
+#define FORESTGREEN1 QColor::fromRgbF( 0.1, 0.5, 0.1, 1 )
// Reds
-#define PERSIANRED1 { 0.8, 0.2, 0.2, 1 }
-#define TUSCANY1 { 0.8, 0.4, 0.2, 1 }
-#define PIRATEGOLD1 { 0.8, 0.5, 0.0, 1 }
-#define HOKEYPOKEY1 { 0.8, 0.6, 0.2, 1 }
-#define CINNABAR1 { 0.9, 0.3, 0.2, 1 }
-#define REDORANGE1 { 1.0, 0.2, 0.2, 1 }
-#define REDORANGE1_HIGH_TRANS { 1.0, 0.2, 0.2, 0.25 }
-#define REDORANGE1_MED_TRANS { 1.0, 0.2, 0.2, 0.5 }
-#define RED1_MED_TRANS { 1.0, 0.0, 0.0, 0.5 }
-#define RED1 { 1.0, 0.0, 0.0, 1 }
+#define PERSIANRED1 QColor::fromRgbF( 0.8, 0.2, 0.2, 1 )
+#define TUSCANY1 QColor::fromRgbF( 0.8, 0.4, 0.2, 1 )
+#define PIRATEGOLD1 QColor::fromRgbF( 0.8, 0.5, 0.0, 1 )
+#define HOKEYPOKEY1 QColor::fromRgbF( 0.8, 0.6, 0.2, 1 )
+#define CINNABAR1 QColor::fromRgbF( 0.9, 0.3, 0.2, 1 )
+#define REDORANGE1 QColor::fromRgbF( 1.0, 0.2, 0.2, 1 )
+#define REDORANGE1_HIGH_TRANS QColor::fromRgbF( 1.0, 0.2, 0.2, 0.25 )
+#define REDORANGE1_MED_TRANS QColor::fromRgbF( 1.0, 0.2, 0.2, 0.5 )
+#define RED1_MED_TRANS QColor::fromRgbF( 1.0, 0.0, 0.0, 0.5 )
+#define RED1 QColor::fromRgbF( 1.0, 0.0, 0.0, 1 )
// Monochromes
-#define BLACK1_LOW_TRANS { 0.0, 0.0, 0.0, 0.75 }
-#define BLACK1_HIGH_TRANS { 0.0, 0.0, 0.0, 0.25 }
-#define TUNDORA1_MED_TRANS { 0.3, 0.3, 0.3, 0.5 }
-#define MERCURY1_MED_TRANS { 0.9, 0.9, 0.9, 0.5 }
-#define CONCRETE1_LOWER_TRANS { 0.95, 0.95, 0.95, 0.9 }
-#define WHITE1_MED_TRANS { 1.0, 1.0, 1.0, 0.5 }
-#define WHITE1 { 1.0, 1.0, 1.0, 1 }
+#define BLACK1_LOW_TRANS QColor::fromRgbF( 0.0, 0.0, 0.0, 0.75 )
+#define BLACK1_HIGH_TRANS QColor::fromRgbF( 0.0, 0.0, 0.0, 0.25 )
+#define TUNDORA1_MED_TRANS QColor::fromRgbF( 0.3, 0.3, 0.3, 0.5 )
+#define MERCURY1_MED_TRANS QColor::fromRgbF( 0.9, 0.9, 0.9, 0.5 )
+#define CONCRETE1_LOWER_TRANS QColor::fromRgbF( 0.95, 0.95, 0.95, 0.9 )
+#define WHITE1_MED_TRANS QColor::fromRgbF( 1.0, 1.0, 1.0, 0.5 )
+#define WHITE1 QColor::fromRgbF( 1.0, 1.0, 1.0, 1 )
// Blues
-#define GOVERNORBAY2 { 0.2, 0.2, 0.7, 1 }
-#define GOVERNORBAY1_MED_TRANS { 0.2, 0.2, 0.8, 0.5 }
-#define ROYALBLUE2 { 0.2, 0.2, 0.9, 1 }
-#define ROYALBLUE2_LOW_TRANS { 0.2, 0.2, 0.9, 0.75 }
+#define GOVERNORBAY2 QColor::fromRgbF( 0.2, 0.2, 0.7, 1 )
+#define GOVERNORBAY1_MED_TRANS QColor::fromRgbF( 0.2, 0.2, 0.8, 0.5 )
+#define ROYALBLUE2 QColor::fromRgbF( 0.2, 0.2, 0.9, 1 )
+#define ROYALBLUE2_LOW_TRANS QColor::fromRgbF( 0.2, 0.2, 0.9, 0.75 )
// Yellows / BROWNS
-#define SPRINGWOOD1 { 0.95, 0.95, 0.9, 1 }
-#define BROOM1_LOWER_TRANS { 1.0, 1.0, 0.1, 0.9 }
-#define PEANUT { 0.5, 0.2, 0.1, 1.0 }
-#define PEANUT_MED_TRANS { 0.5, 0.2, 0.1, 0.5 }
+#define SPRINGWOOD1 QColor::fromRgbF( 0.95, 0.95, 0.9, 1 )
+#define BROOM1_LOWER_TRANS QColor::fromRgbF( 1.0, 1.0, 0.1, 0.9 )
+#define PEANUT QColor::fromRgbF( 0.5, 0.2, 0.1, 1.0 )
+#define PEANUT_MED_TRANS QColor::fromRgbF( 0.5, 0.2, 0.1, 0.5 )
// Magentas
-#define MEDIUMREDVIOLET1_HIGHER_TRANS { 0.7, 0.2, 0.7, 0.1 }
+#define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF( 0.7, 0.2, 0.7, 0.1 )
#endif