diff options
author | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-05 12:46:38 -0300 |
---|---|---|
committer | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-05 18:56:01 -0300 |
commit | 31d9ea4246c894a95e172755afd449a6707d4cb0 (patch) | |
tree | da7d2065132683e7c933edbdaccd68009bf78db4 /weather | |
parent | 6d19afaba33ff93fae7a598a80a3bc15e82f1b37 (diff) |
Weather: Removing redundant "chance of" forecast views.
Signed-off-by: Luiz Agostini <luiz.agostini@openbossa.org>
Diffstat (limited to 'weather')
-rw-r--r-- | weather/forecastview.cpp | 91 |
1 files changed, 5 insertions, 86 deletions
diff --git a/weather/forecastview.cpp b/weather/forecastview.cpp index 7d7eeb8..010e902 100644 --- a/weather/forecastview.cpp +++ b/weather/forecastview.cpp @@ -245,23 +245,6 @@ public: } }; -class ForecastChanceOfSleetView : public ForecastView -{ -public: - ForecastChanceOfSleetView(bool night, QGraphicsItem *parent = 0) - : ForecastView(Forecast::ChanceOfSleet, parent) - { - setMainHangItem(night ? ForecastHungItem::Moon : ForecastHungItem::ColdSun); - addHungItem(ForecastHungItem::CloudRain1, QPointF(135, 317), 0); - addHungItem(ForecastHungItem::CloudRain2, QPointF(341, 313), 1, true); - addHungItem(ForecastHungItem::CloudRain2, QPointF(72, 276), 1); - addHungItem(ForecastHungItem::CloudRain3, QPointF(199, 250), 2); - addHungItem(ForecastHungItem::CloudRain3, QPointF(417, 268), 2); - addSnow(10); - addRain(ForecastRain::Light); - } -}; - class ForecastSnowView : public ForecastView { public: @@ -278,22 +261,6 @@ public: } }; -class ForecastChanceOfSnowView : public ForecastView -{ -public: - ForecastChanceOfSnowView(bool night, QGraphicsItem *parent = 0) - : ForecastView(Forecast::ChanceOfSnow, parent) - { - setMainHangItem(night ? ForecastHungItem::Moon : ForecastHungItem::ColdSun); - addHungItem(ForecastHungItem::CloudRain1, QPointF(46, 325), 0); - addHungItem(ForecastHungItem::CloudRain1, QPointF(359, 302), 0, true); - addHungItem(ForecastHungItem::CloudRain2, QPointF(158, 288), 1); - addHungItem(ForecastHungItem::CloudRain3, QPointF(73, 267), 2); - addHungItem(ForecastHungItem::CloudRain3, QPointF(401, 273), 2); - addSnow(20); - } -}; - class ForecastMistView : public ForecastView { public: @@ -326,22 +293,6 @@ public: } }; -class ForecastChanceOfRainView : public ForecastView -{ -public: - ForecastChanceOfRainView(bool night, QGraphicsItem *parent = 0) - : ForecastView(Forecast::ChanceOfRain, parent) - { - setMainHangItem(night ? ForecastHungItem::Moon : ForecastHungItem::ColdSun); - addHungItem(ForecastHungItem::CloudRain1, QPointF(60, 317), 0); - addHungItem(ForecastHungItem::CloudRain1, QPointF(308, 287), 0, true); - addHungItem(ForecastHungItem::CloudRain2, QPointF(192, 251), 1); - addHungItem(ForecastHungItem::CloudRain2, QPointF(432, 268), 1); - addHungItem(ForecastHungItem::CloudRain3, QPointF(355, 235), 2); - addRain(ForecastRain::Medium); - } -}; - class ForecastStormView : public ForecastView { public: @@ -358,22 +309,6 @@ public: } }; -class ForecastChanceOfStormView : public ForecastView -{ -public: - ForecastChanceOfStormView(bool night, QGraphicsItem *parent = 0) - : ForecastView(Forecast::ChanceOfStorm, parent) - { - setMainHangItem(night ? ForecastHungItem::Moon : ForecastHungItem::ColdSun); - addHungItem(ForecastHungItem::CloudStorm1, QPointF(324, 296), 0); - addHungItem(ForecastHungItem::CloudStorm1, QPointF(91, 261), 0, true); - addHungItem(ForecastHungItem::CloudStorm2, QPointF(432, 257), 1); - addHungItem(ForecastHungItem::CloudStorm3, QPointF(92, 210), 2); - addHungItem(ForecastHungItem::CloudStorm3, QPointF(334, 224), 2); - addRain(ForecastRain::Heavy); - } -}; - class ForecastThunderstormView : public ForecastView { public: @@ -390,22 +325,6 @@ public: } }; -class ForecastChanceThunderstormView : public ForecastView -{ -public: - ForecastChanceThunderstormView(bool night, QGraphicsItem *parent = 0) - : ForecastView(Forecast::ChanceOfThunderstorm, parent) - { - setMainHangItem(night ? ForecastHungItem::Moon : ForecastHungItem::ColdSun); - addHungItem(ForecastHungItem::CloudTStorm1, QPointF(371, 303), 0); - addHungItem(ForecastHungItem::CloudStorm1, QPointF(110, 283), 0, true); - addHungItem(ForecastHungItem::CloudTStorm2, QPointF(207, 272), 1); - addHungItem(ForecastHungItem::CloudStorm2, QPointF(367, 248), 1); - addHungItem(ForecastHungItem::CloudStorm3, QPointF(111, 223), 2); - addRain(ForecastRain::Heavy); - } -}; - static const qreal minHungItemsZ = -1.0; static const qreal maxHungItemsZ = 0.0; static const qreal sunZ = (minHungItemsZ + maxHungItemsZ) / 2.0 + 0.01; @@ -527,16 +446,16 @@ ForecastView *ForecastView::createView(Forecast::ForecastType type, bool night, case Forecast::Dust : return new ForecastHazeView(Forecast::Dust, night, parent); case Forecast::Icy : return new ForecastIcyView(night, parent); case Forecast::Sleet : return new ForecastSleetView(night, parent); - case Forecast::ChanceOfSleet : return new ForecastChanceOfSleetView(night, parent); + case Forecast::ChanceOfSleet : return new ForecastSleetView(night, parent); case Forecast::Snow : return new ForecastSnowView(night, parent); - case Forecast::ChanceOfSnow : return new ForecastChanceOfSnowView(night, parent); + case Forecast::ChanceOfSnow : return new ForecastSnowView(night, parent); case Forecast::Mist : return new ForecastMistView(night, parent); case Forecast::Rain : return new ForecastRainView(night, parent); - case Forecast::ChanceOfRain : return new ForecastChanceOfRainView(night, parent); + case Forecast::ChanceOfRain : return new ForecastRainView(night, parent); case Forecast::Storm : return new ForecastStormView(night, parent); - case Forecast::ChanceOfStorm : return new ForecastChanceOfStormView(night, parent); + case Forecast::ChanceOfStorm : return new ForecastStormView(night, parent); case Forecast::Thunderstorm : return new ForecastThunderstormView(night, parent); - case Forecast::ChanceOfThunderstorm : return new ForecastChanceThunderstormView(night, parent); + case Forecast::ChanceOfThunderstorm : return new ForecastThunderstormView(night, parent); default : return 0; } |