TARGET = quandoparte
TEMPLATE = app
+TRANSLATIONS = resources/i18n/quandoparte_it.ts
+
SOURCES += main.cpp \
settingsdialog.cpp \
stationview.cpp \
stationlistview.ui
CONFIG += webkit mobility
-MOBILITY = location bearer
+MOBILITY = location
symbian {
TARGET.UID3 = 0xe30fb688
icons/quandoparte.png \
resources/quandoparte.css \
resources/arrivals.css \
- resources/departures.css
+ resources/departures.css \
+ $$replace(TRANSLATIONS, .ts, .qm)
+message($${OTHER_FILES})
unix:!symbian {
maemo5 {
target.path = /opt/usr/bin
} else {
desktopfile.path = /usr/share/applications
}
- INSTALLS += desktopfile cssfile
+ INSTALLS += desktopfile
}
unix:!symbian {
css.files = resources/$${TARGET}.css resources/arrivals.css resources/departures.css
- css.path = /usr/share/apps/$${TARGET}/css
+ i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
+ maemo5 {
+ i18n.path = /opt/usr/share/apps/$${TARGET}/i18n
+ css.path = /opt/usr/share/apps/$${TARGET}/css
+ } else {
+ i18n.path = /usr/share/apps/$${TARGET}/i18n
+ css.path = /usr/share/apps/$${TARGET}/css
+ }
icon48.files = icons/48x48/$${TARGET}.png
icon64.files = icons/64x64/$${TARGET}.png
icon48.path = /usr/share/icons/hicolor/48x48/apps
INSTALLS += icon48
INSTALLS += icon64
INSTALLS += css
+ INSTALLS += i18n
}
#include "app.h"
#include <QApplication>
+#include <QDebug>
+#include <QLocale>
+#include <QTranslator>
int main(int argc, char *argv[])
{
a.setApplicationName("QuandoParte");
a.setOrganizationDomain("cirulla.net");
+ QString locale = QLocale::system().name();
+ QTranslator translator;
+ if (translator.load(QString("quandoparte_") + locale,
+ "/opt/usr/share/apps/quandoparte/i18n")) {
+ qDebug() << "Translation for locale" << locale << "loaded";
+ a.installTranslator(&translator);
+ } else {
+ qDebug() << "Translation for locale" << locale << "not found";
+ }
App theApp;
return a.exec();
<rect>
<x>0</x>
<y>0</y>
- <width>786</width>
- <height>466</height>
+ <width>784</width>
+ <height>464</height>
</rect>
</property>
<property name="windowTitle">
- <string/>
+ <string>Station List</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<rect>
<x>0</x>
<y>0</y>
- <width>786</width>
+ <width>784</width>
<height>25</height>
</rect>
</property>
qDebug() << styleSheet;
//QUrl cssUrl = QUrl::fromEncoded(styleSheet);
QUrl cssUrl;
+
+ // XXX Maemo5 specific
if (showArrivalsAction->isChecked()) {
- cssUrl.setEncodedUrl("file:///usr/share/apps/quandoparte/css/arrivals.css");
+ cssUrl.setEncodedUrl("file:///opt/usr/share/apps/quandoparte/css/arrivals.css");
} else {
- cssUrl.setEncodedUrl("file:///usr/share/apps/quandoparte/css/departures.css");
+ cssUrl.setEncodedUrl("file:///opt/usr/share/apps/quandoparte/css/departures.css");
}
QWebSettings::globalSettings()->setUserStyleSheetUrl(cssUrl);
}