summaryrefslogtreecommitdiffstats
path: root/qt-ui/graphicsview-common.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-16 19:21:13 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-16 19:21:13 -0300
commit493f366765cf3bc8d1ff166b874433a8c0a900aa (patch)
tree5d09f31b007552ebfa3429d77a638e23769bb663 /qt-ui/graphicsview-common.cpp
parentf74799d5815bb1d6e7d6c6c531ccf9ba6e966191 (diff)
downloadsubsurface-493f366765cf3bc8d1ff166b874433a8c0a900aa.tar.gz
Use the same line dimensions as the profile, on the planner.
The Planner should be 'almost' like the profile, with the possibility to use the mouse and keyboard to input a new plan, so this is a bit of 'getting there.' I don't like too much code duplication but since the current Profile Graphics is a crude cut-and-paste from the old Cairo backend, it's easyer to start from scratch and have it well organized as Qt code. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/graphicsview-common.cpp')
-rw-r--r--qt-ui/graphicsview-common.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/graphicsview-common.cpp b/qt-ui/graphicsview-common.cpp
index fbe196e98..30b9ccb08 100644
--- a/qt-ui/graphicsview-common.cpp
+++ b/qt-ui/graphicsview-common.cpp
@@ -55,3 +55,8 @@ void fill_profile_color()
profile_color[CALC_CEILING_DEEP] = COLOR(APPLE1_HIGH_TRANS, BLACK1_HIGH_TRANS, APPLE1_HIGH_TRANS);
#undef COLOR
}
+
+QColor getColor(const color_indice_t i, bool isGrayscale = false)
+{
+ return profile_color[i].at((isGrayscale) ? 1 : 0);
+}