From 061f419aad55ec5aaaa82065776008ded3c92d71 Mon Sep 17 00:00:00 2001 From: Roman Moravcik Date: Thu, 3 Mar 2011 22:29:46 +0100 Subject: [PATCH] Removed prefix get from all methods. --- src/mainwindow.cpp | 14 +++++++------- src/medarddownloader.cpp | 16 ++++++++-------- src/medarddownloader.h | 12 ++++++------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e215c34..21dec71 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -32,7 +32,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) connect(m_downloader, SIGNAL(downloadFailed()), this, SLOT(downloadFailed())); m_forecast = new ForecastWidget(); - m_forecast->setFixedSize(m_downloader->getImageSize()); + m_forecast->setFixedSize(m_downloader->imageSize()); m_forecastTypeLabel = new QLabel(); m_forecastTypeLabel->setAlignment(Qt::AlignCenter); @@ -210,10 +210,10 @@ void MainWindow::hideNavigationButtons(bool showRetryButton) void MainWindow::updateNavigationButtons() { - if ((m_downloader->getForecastDateOffset() - 24) < m_downloader->getMinForecastDateOffset()) { + if ((m_downloader->forecastDateOffset() - 24) < m_downloader->minForecastDateOffset()) { m_minusDayButton->setDisabled(true); m_plusDayButton->setDisabled(false); - } else if ((m_downloader->getForecastDateOffset() + 24) > m_downloader->getMaxForecastDateOffset()) { + } else if ((m_downloader->forecastDateOffset() + 24) > m_downloader->maxForecastDateOffset()) { m_minusDayButton->setDisabled(false); m_plusDayButton->setDisabled(true); } else { @@ -221,10 +221,10 @@ void MainWindow::updateNavigationButtons() m_plusDayButton->setDisabled(false); } - if ((m_downloader->getForecastDateOffset() - 1) < m_downloader->getMinForecastDateOffset()) { + if ((m_downloader->forecastDateOffset() - 1) < m_downloader->minForecastDateOffset()) { m_minusHourButton->setDisabled(true); m_plusHourButton->setDisabled(false); - } else if ((m_downloader->getForecastDateOffset() + 1) > m_downloader->getMaxForecastDateOffset()) { + } else if ((m_downloader->forecastDateOffset() + 1) > m_downloader->maxForecastDateOffset()) { m_minusHourButton->setDisabled(false); m_plusHourButton->setDisabled(true); } else { @@ -306,7 +306,7 @@ void MainWindow::forecastTypeChanged(const QString label, MedardDownloader::Fore void MainWindow::forecastDateOffsetChanged(int offset) { m_forecast->clearImage(false); - m_downloader->setForecastDateOffset(m_downloader->getForecastDateOffset() + offset); + m_downloader->setForecastDateOffset(m_downloader->forecastDateOffset() + offset); m_downloader->downloadImage(); } @@ -331,7 +331,7 @@ void MainWindow::downloadedFinished(const QString &filename, const QDateTime &da { m_forecast->setImage(filename); m_forecastInitialDateLabel->setText(tr("Forecast from:\n") + - m_downloader->getForecastInitialDate().toString("dd.MM.yyyy hh:mm")); + m_downloader->forecastInitialDate().toString("dd.MM.yyyy hh:mm")); /* upcase the first letter of name of day */ QString temp = date.toString("dddd\ndd.MM.yyyy hh:mm"); diff --git a/src/medarddownloader.cpp b/src/medarddownloader.cpp index a4a1b1e..06f952f 100644 --- a/src/medarddownloader.cpp +++ b/src/medarddownloader.cpp @@ -80,7 +80,7 @@ MedardDownloader::~MedardDownloader() } } -QSize MedardDownloader::getImageSize() +QSize MedardDownloader::imageSize() { return QSize(IMAGE_WIDTH, IMAGE_HEIGHT); } @@ -158,12 +158,12 @@ void MedardDownloader::setForecastInitialDate(QDateTime date) cleanCacheDirectory(); } -QDateTime MedardDownloader::getForecastInitialDate() +QDateTime MedardDownloader::forecastInitialDate() { return m_forecastInitialDate.toLocalTime(); } -QDateTime MedardDownloader::getForecastDate() +QDateTime MedardDownloader::forecastDate() { return m_forecastInitialDate.addSecs(3600 * m_forecastDateOffset).toLocalTime(); } @@ -239,7 +239,7 @@ void MedardDownloader::downloadImageFinished() } qDebug() << "downloadImageFinished: downloadFinished=" << filename; - emit downloadFinished(filename, getForecastDate()); + emit downloadFinished(filename, forecastDate()); QTimer::singleShot(0, this, SLOT(clearDownloadRequest())); } @@ -270,7 +270,7 @@ void MedardDownloader::downloadImage() if (isDownloaded(filename)) { qDebug() << "downloadImage: downloadFinished=" << filename; - emit downloadFinished(filename, getForecastDate()); + emit downloadFinished(filename, forecastDate()); return; } @@ -297,17 +297,17 @@ bool MedardDownloader::isDownloaded(const QString filename) return QFile(filename).exists(); } -int MedardDownloader::getForecastDateOffset() +int MedardDownloader::forecastDateOffset() { return m_forecastDateOffset; } -int MedardDownloader::getMinForecastDateOffset() +int MedardDownloader::minForecastDateOffset() { return MIN_OFFSET; } -int MedardDownloader::getMaxForecastDateOffset() +int MedardDownloader::maxForecastDateOffset() { return MAX_OFFSET; } diff --git a/src/medarddownloader.h b/src/medarddownloader.h index 4bb671c..7a5bc40 100644 --- a/src/medarddownloader.h +++ b/src/medarddownloader.h @@ -54,17 +54,17 @@ public: void setForecastDomain(ForecastDomain domain); void setForecastInitialDate(QDateTime date); - QDateTime getForecastInitialDate(); - QDateTime getForecastDate(); + QDateTime forecastInitialDate(); + QDateTime forecastDate(); void setForecastDateOffset(int offset); - int getForecastDateOffset(); - int getMinForecastDateOffset(); - int getMaxForecastDateOffset(); + int forecastDateOffset(); + int minForecastDateOffset(); + int maxForecastDateOffset(); void downloadImage(); - QSize getImageSize(); + QSize imageSize(); signals: void downloadFinished(const QString &filename, const QDateTime &date); -- 1.7.9.5