diff options
author | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-05 20:05:56 -0300 |
---|---|---|
committer | Luiz Agostini <luiz.agostini@openbossa.org> | 2009-11-05 20:05:56 -0300 |
commit | 2ef0034e06be9b179bf87bfc9fe4b6aa41d30968 (patch) | |
tree | 2032d4aec7933181a5594095f76e82ff112b64e8 /weather | |
parent | 39fe513766a00018ed0d4e8b22b47fde3dcc6da6 (diff) |
Weather: removing deprecated method from settings.
Signed-off-by: Luiz Agostini <luiz.agostini@openbossa.org>
Diffstat (limited to 'weather')
-rw-r--r-- | weather/settings.cpp | 25 | ||||
-rw-r--r-- | weather/settings.h | 3 |
2 files changed, 0 insertions, 28 deletions
diff --git a/weather/settings.cpp b/weather/settings.cpp index 71ec5fa..975b474 100644 --- a/weather/settings.cpp +++ b/weather/settings.cpp @@ -81,31 +81,6 @@ QStringList Settings::getCurrentCities() return result; } -QPixmap Settings::getScaledPic(const QString &name) -{ - Settings *obj = instance(); - if (obj->m_scaledPixmaps.contains(name)) - return obj->m_scaledPixmaps[name]; - - QPixmap pic(":images/weather_elements/" + name + ".png"); - if (!pic.isNull() || scaledImages()) { - - int width = pic.width() * widthFactor(); - int height = pic.height() * heightFactor(); - -// width = !width ? pic.width() : width; -// height = !height ? pic.height() : height; - - if (width && height) - pic = pic.scaled(QSize(width, height), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - } - if (pic.isNull()) - qWarning() << "ERROR: unable to open pixmap " << name; - else - obj->m_scaledPixmaps[name] = pic; - return pic; -} - void Settings::configPortrait() { #ifdef Q_OS_SYMBIAN diff --git a/weather/settings.h b/weather/settings.h index a231eee..9bc2d9b 100644 --- a/weather/settings.h +++ b/weather/settings.h @@ -60,8 +60,6 @@ public: static qreal scaleWidth(qreal width) { return width * widthFactor(); } static qreal scaleHeight(qreal height) { return height * heightFactor(); } - static QPixmap getScaledPic(const QString &name); - static QStringList getCurrentCities(); private slots: @@ -69,7 +67,6 @@ private slots: private: QSettings m_settings; - QHash<QString, QPixmap> m_scaledPixmaps; static Settings *instance(); }; |