diff options
| author | Adriano Rezende <adriano.rezende@openbossa.org> | 2009-11-17 19:04:59 -0300 |
|---|---|---|
| committer | Adriano Rezende <adriano.rezende@openbossa.org> | 2009-11-17 19:06:05 -0300 |
| commit | 3187e481111d446fe0e2a3bfd12e693a757dc47c (patch) | |
| tree | 3bd8a33cae714d23dc0a7fa66c7f2c2541b77b1f /mybudget | |
| parent | f7b51ba9a7ff88629d430d49b5785c17f8271ba8 (diff) | |
Added maemo support with debian package files
Signed-off-by: Adriano Rezende <adriano.rezende@openbossa.org>
Diffstat (limited to 'mybudget')
| -rw-r--r-- | mybudget/debian/changelog | 6 | ||||
| -rw-r--r-- | mybudget/debian/control | 4 | ||||
| -rw-r--r-- | mybudget/debian/mybudget.install | 4 | ||||
| -rwxr-xr-x | mybudget/debian/rules | 2 | ||||
| -rw-r--r-- | mybudget/src/main.cpp | 16 | ||||
| -rw-r--r-- | mybudget/src/widgets/coingraphicwidget.cpp | 30 |
6 files changed, 30 insertions, 32 deletions
diff --git a/mybudget/debian/changelog b/mybudget/debian/changelog index 026f4aa..430f861 100644 --- a/mybudget/debian/changelog +++ b/mybudget/debian/changelog @@ -1,3 +1,9 @@ +mybudget (0.3-1) unstable; urgency=low + + * Minor fixes + + -- Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Wed, 28 Sep 2009 14:47:57 -0300 + mybudget (0.2-1) unstable; urgency=low * Several fixes and improvements diff --git a/mybudget/debian/control b/mybudget/debian/control index 1e471e3..8340e04 100644 --- a/mybudget/debian/control +++ b/mybudget/debian/control @@ -2,11 +2,11 @@ Source: mybudget Section: apps Priority: optional Maintainer: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> -Build-Depends: debhelper (>= 4), libqt4-dev, libxrandr-dev +Build-Depends: debhelper (>= 4), libqt4-maemo5-dev Standards-Version: 3.8.1 Package: mybudget Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libqt4-core, libqt4-gui, libxrandr2 +Depends: ${shlibs:Depends}, ${misc:Depends}, libqt4-maemo5-core, libqt4-maemo5-gui Description: My Budget My Budget diff --git a/mybudget/debian/mybudget.install b/mybudget/debian/mybudget.install index 8fc5853..64b5917 100644 --- a/mybudget/debian/mybudget.install +++ b/mybudget/debian/mybudget.install @@ -1,5 +1,5 @@ mybudget.conf root/.config/openBossa/ mybudget.conf home/user/.config/openBossa/ -mybudget.desktop usr/share/applications/hildon/ +maemo/mybudget.desktop usr/share/applications/hildon/ mybudget-icon.png usr/share/pixmaps/ -start_mybudget.sh usr/bin/ +maemo/start_mybudget.sh usr/bin/ diff --git a/mybudget/debian/rules b/mybudget/debian/rules index 84e8e5e..3da996e 100755 --- a/mybudget/debian/rules +++ b/mybudget/debian/rules @@ -5,6 +5,6 @@ include /usr/share/cdbs/1/class/qmake.mk DEB_BUILDDIR = debian/builddeb DEB_QMAKE_ARGS = $(CURDIR)/mybudget.pro -r PREFIX=/usr - + clean:: rm -fr $(DEB_BUILDDIR) diff --git a/mybudget/src/main.cpp b/mybudget/src/main.cpp index e5bf685..3075ae5 100644 --- a/mybudget/src/main.cpp +++ b/mybudget/src/main.cpp @@ -47,20 +47,10 @@ int main(int argc, char **argv) QCoreApplication::setOrganizationDomain("openbossa.org"); QCoreApplication::setApplicationName("mybudget"); +#ifndef Q_OS_SYMBIAN QString themeFile(QLatin1String(":/themes/mybudget.ini")); - -#ifdef Q_OS_LINUX - if (argc < 2) - app.setProperty("platform", "x86"); - else if (argv[1] == QLatin1String("symbian")) { - app.setProperty("platform", "symbian"); - themeFile = QLatin1String(":/themes/symbian.ini"); - } -#endif - -#ifdef Q_OS_SYMBIAN - app.setProperty("platform", "symbian"); - themeFile = QLatin1String(":/themes/symbian.ini"); +#else + QString themeFile(QLatin1String(":/themes/symbian.ini")); #endif Resource::setIniFile(themeFile); diff --git a/mybudget/src/widgets/coingraphicwidget.cpp b/mybudget/src/widgets/coingraphicwidget.cpp index 1209e87..937fc63 100644 --- a/mybudget/src/widgets/coingraphicwidget.cpp +++ b/mybudget/src/widgets/coingraphicwidget.cpp @@ -40,18 +40,18 @@ CoinGraphicWidget::CoinGraphicWidget(int month, qreal overallSum, qreal maxValue : QGraphicsWidget(), graphCache(0) { nokiaFont.setFamily(QLatin1String("Nokia Sans")); - if (qApp->property("platform") == QLatin1String("symbian")) { - nokiaFont.setPixelSize(18); - labelOffset = 2; - maxCoins = 75; - marginForCoins = 10; - } - else { - nokiaFont.setPixelSize(22); - labelOffset = 5; - maxCoins = 100; - marginForCoins = 16; - } + +#ifdef Q_OS_SYMBIAN + nokiaFont.setPixelSize(18); + labelOffset = 2; + maxCoins = 75; + marginForCoins = 10; +#else + nokiaFont.setPixelSize(22); + labelOffset = 5; + maxCoins = 100; + marginForCoins = 16; +#endif coinPixmap = coinPx; @@ -133,9 +133,11 @@ void CoinGraphicWidget::updateGraphCache(int coins) p.drawPixmap(x, y, *coinPixmap); } +#ifdef Q_OS_SYMBIAN + qreal middleScaleFactor = 1.5; +#else qreal middleScaleFactor = 2.0; - if (qApp->property("platform") == QLatin1String("symbian")) - middleScaleFactor = 1.5; +#endif QSize labelSize(labelLeft.width() + middleScaleFactor * labelMiddle.width() + labelRight.width(), labelHeight); |
