diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-06-26 08:28:42 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-06-26 08:32:59 +0300 |
commit | bfb3e4231e8910e319dc3c522d9869afd1b4f4b2 (patch) | |
tree | a542381f3470e283a429be218a901ec572e42180 /examples/mapdata | |
parent | bb1c0b074db0cf6dbf4815f310b349e64e5422df (diff) |
High quality shadow issue fix for Q3DMaps.
Q3DBars fix pending for another task first.
Task-number: QTRD-2107
Change-Id: I676542021576d2032fa965e54ec3efd3da165858
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/mapdata')
-rw-r--r-- | examples/mapdata/main.cpp | 2 | ||||
-rw-r--r-- | examples/mapdata/mapdata.cpp | 17 | ||||
-rw-r--r-- | examples/mapdata/mapdata.h | 3 |
3 files changed, 21 insertions, 1 deletions
diff --git a/examples/mapdata/main.cpp b/examples/mapdata/main.cpp index 976b2165..88c9f016 100644 --- a/examples/mapdata/main.cpp +++ b/examples/mapdata/main.cpp @@ -199,6 +199,8 @@ int main(int argc, char **argv) QObject::connect(shadowQuality, SIGNAL(currentIndexChanged(int)), modifier, SLOT(changeShadowQuality(int))); + QObject::connect(modifier, &MapsModifier::shadowQuality, shadowQuality, + &QComboBox::setCurrentIndex); QObject::connect(fontList, &QFontComboBox::currentFontChanged, modifier, &MapsModifier::changeFont); diff --git a/examples/mapdata/mapdata.cpp b/examples/mapdata/mapdata.cpp index 8f4aee7c..0461dc56 100644 --- a/examples/mapdata/mapdata.cpp +++ b/examples/mapdata/mapdata.cpp @@ -315,7 +315,22 @@ void MapsModifier::changeShadowQuality(int quality) sq = ShadowHigh; break; } - m_chart->setShadowQuality(sq); + ShadowQuality realquality = m_chart->setShadowQuality(sq); + // Check if it setting quality was successful + if (realquality != sq) { + switch (realquality) { + case ShadowLow: + quality = 1; + break; + case ShadowMedium: + quality = 2; + break; + case ShadowHigh: + quality = 3; + break; + } + emit shadowQuality(quality); + } } //void MapsModifier::setGridEnabled(int enabled) diff --git a/examples/mapdata/mapdata.h b/examples/mapdata/mapdata.h index 3b3c7219..ea25c635 100644 --- a/examples/mapdata/mapdata.h +++ b/examples/mapdata/mapdata.h @@ -75,6 +75,9 @@ public slots: void changeValueDimension(int dimension); void changeShadowQuality(int quality); +signals: + void shadowQuality(int quality); + private: Q3DMaps *m_chart; QRect m_imageRect; |