diff options
author | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-05 20:01:40 -0300 |
---|---|---|
committer | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-05 20:01:40 -0300 |
commit | 39fe513766a00018ed0d4e8b22b47fde3dcc6da6 (patch) | |
tree | 6d77add300377af1822b1e651a4cf32bb6a87adc /weather | |
parent | 2313108f1cc8cb39c138d5a9bec5bdcb323d7bcd (diff) |
Weather: add city is now using pixmap loader.
Signed-off-by: Luiz Agostini <luiz.agostini@openbossa.org>
Diffstat (limited to 'weather')
-rw-r--r-- | weather/addcitytool.cpp | 21 | ||||
-rw-r--r-- | weather/addcitytool.h | 2 | ||||
-rw-r--r-- | weather/bootmanager.cpp | 2 |
3 files changed, 20 insertions, 5 deletions
diff --git a/weather/addcitytool.cpp b/weather/addcitytool.cpp index 6ecbd89..9cd0089 100644 --- a/weather/addcitytool.cpp +++ b/weather/addcitytool.cpp @@ -2,6 +2,7 @@ #include "settings.h" #include "forecastprovider.h" #include "painttextitem.h" +#include "pixmaploader.h" #include <QPainter> #include <QInputDialog> @@ -11,14 +12,14 @@ #include <QApplication> #include <QDebug> -#define ADD_BACKGROUND (Settings::getScaledPic("background_add_city")) -#define ADD_ERROR_BACKGROUND (Settings::getScaledPic("background_error_adding")) +#define ADD_BACKGROUND (PixmapLoader::getPic("background_add_city")) +#define ADD_ERROR_BACKGROUND (PixmapLoader::getPic("background_error_adding")) -#define CLOSE_BUTTON_PIXMAP (Settings::getScaledPic("button_list_delete")) -#define ADD_BUTTON_PIXMAP (Settings::getScaledPic("button_city_send")) +#define CLOSE_BUTTON_PIXMAP (PixmapLoader::getPic("button_list_delete")) +#define ADD_BUTTON_PIXMAP (PixmapLoader::getPic("button_city_send")) #define BUTTON_LEFT (Settings::scaleWidth(408.0)) -#define ADD_TEXT_BACKGROUND (Settings::getScaledPic("textfield_add_city")) +#define ADD_TEXT_BACKGROUND (PixmapLoader::getPic("textfield_add_city")) #define ADD_TEXT_LEFT (Settings::scaleWidth(38.0)) #define ADD_SCREEN_FONT_SIZE (Settings::scaleHeight(40.0)) @@ -262,6 +263,16 @@ AddCityTool::~AddCityTool() { } +int AddCityTool::loadImages() +{ + PixmapLoader::load("background_add_city"); + PixmapLoader::load("background_error_adding"); + PixmapLoader::load("button_list_delete"); + PixmapLoader::load("button_city_send"); + PixmapLoader::load("textfield_add_city"); + return 5; +} + void AddCityTool::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event); diff --git a/weather/addcitytool.h b/weather/addcitytool.h index b483d1a..f5f83e6 100644 --- a/weather/addcitytool.h +++ b/weather/addcitytool.h @@ -105,6 +105,8 @@ public: ~AddCityTool(); void cancel(); + static int loadImages(); + private: const QList<ForecastData> &m_content; AddCityFirstScreen * const m_firstScreen; diff --git a/weather/bootmanager.cpp b/weather/bootmanager.cpp index 609a85c..2f3b040 100644 --- a/weather/bootmanager.cpp +++ b/weather/bootmanager.cpp @@ -11,6 +11,7 @@ #include "citycarroussel.h" #include "scrollbar.h" #include "citylist.h" +#include "addcitytool.h" #include <QDebug> @@ -38,6 +39,7 @@ void BootManager::run() count += CityCarroussel::loadImages(); count += ScrollBar::loadImages(); count += CityList::loadImages(); + count += AddCityTool::loadImages(); m_imagesLoaded = count == 0; if (m_imagesLoaded) |