usr/lib/mdictionary/plugins/eng-thai.xdxf
usr/share/mdictionary/xdxf.png
usr/share/mdictionary/css/
+usr/share/mdictionary/qml/
usr/share/applications/hildon/mdictionary.desktop
isEmpty(LIBS_DIR):LIBS_DIR=$$INSTALL_PREFIX/lib/mdictionary
isEmpty(PLUGINS_DIR):PLUGINS_DIR=$$INSTALL_PREFIX/lib/mdictionary/plugins
isEmpty(DOCS_DIR):DOCS_DIR=$$INSTALL_PREFIX/share/doc/mdictionary
+#isEmpty(QMLS_DIR):QMLS_DIR=$$DATA_DIR/qml
DEFINES += MDICTIONARY_VERSION=\\\"$$VERSION\\\"
DEFINES += MDICTIONARY_INSTALL_PREFIX=\\\"$$INSTALL_PREFIX\\\"
message("Data directory: "$$DATA_DIR)
message("Plugins directory: "$$PLUGINS_DIR)
message("Documentation directory: "$$DOCS_DIR)
+#message("Qml directory: "$$QMLS_DIR)
mainLayout = new QVBoxLayout(this);
setLayout(mainLayout);
- imageLabel = new QLabel(this);
- mainLabel = new QLabel(infoNote, this);
+ qmlView = new QDeclarativeView;
+ qmlView->setSource(QUrl::fromLocalFile("/usr/share/mdictionary/qml/WelcomeScreenWidget.qml"));
- mainLayout->addStretch(0);
- mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
- mainLayout->addWidget(mainLabel, 0, Qt::AlignCenter);
- mainLayout->addStretch(0);
+ mainLayout->addWidget(qmlView, 0, Qt::AlignCenter);
- QImage img(":/icons/logo/mdictionary.png");
- imageLabel->setPixmap(QPixmap::fromImage(img));
- imageLabel->resize(imageLabel->pixmap()->size());
+ //stary kod:
+ //imageLabel = new QLabel(this);
+ //mainLabel = new QLabel(infoNote, this);
+
+ //mainLayout->addStretch(0);
+ //mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
+ //mainLayout->addWidget(mainLabel, 0, Qt::AlignCenter);
+ //mainLayout->addStretch(0);
+
+ //QImage img(":/icons/logo/mdictionary.png");
+ //imageLabel->setPixmap(QPixmap::fromImage(img));
+ //imageLabel->resize(imageLabel->pixmap()->size());
//mainLabel->setWordWrap(true);
+ //koniec kodu
#ifdef Q_WS_MAEMO_5
- mainLayout->addSpacing(20);
+ //mainLayout->addSpacing(20);
#endif
}
#include <QWidget>
#include <QScrollArea>
#include <QtGui>
+#include <QtDeclarative/QDeclarativeView>
+#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/QDeclarativeContext>
//! Displays welcome screen with logo and name of application
class WelcomeScreenWidget : public QScrollArea
private:
QVBoxLayout* mainLayout;
QLabel* mainLabel, * licenseLabel, *imageLabel;
+
+ QDeclarativeView* qmlView;
+ QDeclarativeEngine* engine;
+ QDeclarativeContext* context;
+ QWidget* widget;
};
#endif // WELCOMESCREENWIDGET_H
xmlpatterns \
sql \
dbus \
- webkit
+ webkit \
+ declarative
maemo5:QT += maemo5
TRANSLATIONS += pl_PL.ts \
en_US.ts
+OTHER_FILES += \
+ qml/WelcomeScreenWidget.qml
+
target.path = $$BIN_DIR
INSTALLS += target
unix {
+ #icons and misc
maemo5 {
desktop.path = $$SHARE_DIR/applications/hildon
icon64.path = $$SHARE_DIR/icons/hicolor/64x64/hildon
shared.files += ../../data/icons/16x16/staron.png
shared.files += ../../data/xsl/mask.png
+ #css
meego {
css.path = $$DATA_DIR/css
css.files += ../../data/css_meego/style.css
css.files += ../../data/css_desktop/style.css
}
+ #css images
meego {
css_images.path = $$DATA_DIR/css/images
css_images.files += ../../data/css_meego/images/header-background.png
css_images.files += ../../data/css_desktop/images/key-background.png
}
+ #services
service.path = $$SHARE_DIR/dbus-1/services
service.files += ../../data/other/com.comarch.mdictionary.service
+
+ #qmls (stub)
+ meego {
+ qmls.path = $$DATA_DIR/qml
+ qmls.files += ./qml/WelcomeScreenWidget.qml
+ }
+ else:maemo5 {
+ qmls.path = $$DATA_DIR/qml
+ qmls.files += ./qml/WelcomeScreenWidget.qml
+ }
+ else {
+ qmls.path = $$DATA_DIR/qml
+ qmls.files += ./qml/WelcomeScreenWidget.qml
+ }
- INSTALLS += desktop icon64 shared service css css_images
+ INSTALLS += desktop icon64 shared service css css_images qmls
}
check.commands = echo 'No check here'
QMAKE_EXTRA_TARGETS += check
+
--- /dev/null
+/*******************************************************************************
+
+ This file is part of mDictionary.
+
+ mDictionary is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ mDictionary is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
+
+ Copyright 2010 Comarch S.A.
+
+*******************************************************************************/
+/*!
+ author: Marcin Kaźmierczak <marcin.kazmierczak@comarch.pl>
+*/
+
+import Qt 4.7
+
+Rectangle {
+ SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
+
+ id: rectangle1
+ width: (helloText.width > logo.width) ? (helloText.width) : (logo.width)
+ height: logo.height + helloText.height
+ color: myPalette.window
+ anchors.fill: parent
+
+ Image {
+ id: logo
+ source: "qrc:/icons/logo/mdictionary.png"
+// width: 240
+// height: 200
+ anchors.horizontalCenter: parent.horizontalCenter
+ fillMode: Image.PreserveAspectFit
+ anchors.top: parent.top
+ }
+
+ Text {
+ id: helloText
+ text: qsTr("<center><h1>Welcome in mDictionary!</h1></center>")
+ anchors.bottom: parent.bottom
+ }
+
+}