<file>xsl/xsl.xsl</file>
<file>translations/en_US.qm</file>
<file>translations/pl_PL.qm</file>
+ <file>button/buttonCenter.png</file>
+ <file>button/buttonLeft.png</file>
+ <file>button/buttonR.png</file>
+ <file>lineEdit/ramkaL.png</file>
+ <file>lineEdit/ramkaR.png</file>
+ <file>lineEdit/ramkaC.png</file>
</qresource>
</RCC>
AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
{
+ setWindowTitle(tr("About"));
+
+#ifndef Q_WS_MAEMO_5
+ resize(380,450);
+ mainLayout = new QVBoxLayout;
+ view= new QDeclarativeView();
+ mainLayout->addWidget(view);
+ view->setSource(QUrl("src/mdictionary/qml/AboutWidget.qml"));
+ view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ view->setAlignment(Qt::AlignCenter);
+ view->show();
+
+ QGraphicsObject *rootObject = view->rootObject();
+ connect(rootObject, SIGNAL(linkClicked(QString)), this, SLOT(openUrl(QString)));
+ this->setLayout(mainLayout);
+#else
setModal(true);
QString infoNote, licenseNote, comarchNote;
infoNote = "<center><h2><u>mDictionary</u></h2></center>";
"<<a href=\"http://www.gnu.org/licenses/\">"
"http://www.gnu.org/licenses/</a>>."
"</p></font>");
-
- setWindowTitle(tr("About"));
mainLayout = new QVBoxLayout;
- /*on desktop we place all content in scroll area, on maemo by default all
- widgets that are in menu are placed in scroll area created by menu, so we
- don't have to do it here*/
- #ifndef Q_WS_MAEMO_5
- scrollLayout = new QVBoxLayout;
- scroll = new QScrollArea;
- w = new QWidget(this);
- #endif
-
-
imageLabel = new QLabel;
mainLabel = new QLabel;
licenseLabel = new QLabel;
mainLayout->addWidget(mainLabel, 0, Qt::AlignHCenter);
mainLayout->addWidget(licenseLabel, 0, Qt::AlignHCenter);
- //add content to scroll area, and remove fram from it
- #ifndef Q_WS_MAEMO_5
- w->setLayout(mainLayout);
- scroll->setWidget(w);
- scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- scrollLayout->addWidget(scroll, 0, Qt::AlignHCenter);
- this->setLayout(scrollLayout);
- w->setMinimumSize(img.width()*1.6, img.height()*2.45);
- scroll->setLineWidth(0);
- scroll->setMidLineWidth(0);
- scroll->setFrameStyle(QFrame::NoFrame);;
- #else
- setLayout(mainLayout);
- #endif
+ setLayout(mainLayout);
+#endif
+}
+
+
+void AboutWidget::openUrl(QString url){
+ QDesktopServices::openUrl(url);
}
#include <QDialog>
#include <QWidget>
#include <QtGui>
+#include <QDeclarativeView>
+#include <QDesktopServices>
+
#include "../../include/GUIInterface.h"
class AboutWidget : public QDialog
Q_OBJECT
public:
AboutWidget(GUIInterface *parent = 0);
+
+private slots:
+ void openUrl(QString url);
+
private:
+ QDeclarativeView *view;
+
QVBoxLayout* mainLayout;
QVBoxLayout *scrollLayout;
QLabel* mainLabel, * licenseLabel, *imageLabel;
#include "HistoryListDialog.h"
-SearchBarWidget::SearchBarWidget(QWidget *parent) :
- QWidget(parent) {
+SearchBarWidget::SearchBarWidget(QWidget *parent) : QWidget(parent) {
initializeUI();
en_US.ts
OTHER_FILES += \
- qml/WelcomeScreenWidget.qml
+ qml/WelcomeScreenWidget.qml \
+ qml/Button.qml \
+ qml/AboutWidget.qml \
+ qml/SearchBarWidget.qml \
+ qml/IconButton.qml \
+ qml/MyTextLineEdit.qml
target.path = $$BIN_DIR
INSTALLS += target
else {
qmls.path = $$DATA_DIR/qml
qmls.files += ./qml/WelcomeScreenWidget.qml
+ qmls.files += ./qml/Button.qml
+ qmls.files += ./qml/AboutWidget.qml
+ qmls.files += ./qml/SearchBarWidget.qml
+ qmls.files += ./qml/IconButton.qml
+ qmls.files += ./qml/MyTextLineEdit.qml
}
INSTALLS += desktop icon64 shared service css css_images qmls
check.commands = echo 'No check here'
QMAKE_EXTRA_TARGETS += check
-
--- /dev/null
+import Qt 4.7
+import QtWebKit 1.0
+
+Rectangle {
+ id: item
+ width: 400;
+ height: 400;
+ opacity: 1
+ anchors.fill: parent
+
+ SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
+ color : myPalette.window;
+
+ signal linkClicked(string link);
+
+ Image {
+ id: image1
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "qrc:/icons/logo/mdictionary.png"
+ }
+
+ Text {
+ id: text1
+ y: 200
+ text: "<h2><u>mDictionary</u></h2>"
+ anchors.horizontalCenterOffset: 0
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ Text {
+ id: text2
+ y: 220
+ anchors.horizontalCenter: parent.horizontalCenter
+ textFormat: Text.RichText
+ text: "Maemo/Meego Multilingual Dictionary <br> Copyright 2006-2010, Comarch S.A. <br> <a href=\"http://mdictionary.garage.maemo.org\"> http://mdictionary.garage.maemo.org</a>"
+ anchors.horizontalCenterOffset: 1
+ onLinkActivated: linkClicked(link);
+ }
+
+ Text {
+ id: text3
+ y: 270
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "<font size=\"small\"><a href=\"https://garage.maemo.org/tracker/?func=add&group_id=58&atid=305\">Report bug</a></font>"
+ anchors.horizontalCenterOffset: 0
+ onLinkActivated: linkClicked(link);
+ }
+
+ Text {
+ id: text4
+ y: 290
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "<p><font size=\"small\">This program is free software: you can redistribute it and/or modify <br> it under the terms of the GNU General Public License as published by <br> the Free Software Foundation, either version 3 of the License,or <br>(at your option) any later version.<br>This program is distributed in the hope that it will be useful,<br>but WITHOUT ANY WARRANTY; without even the implied warranty of<br> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <br> GNU General Public License for more details.<br> You should have received a copy of the GNU General Public License<br> along with this program. If not, see <<a href=\"http://www.gnu.org/licenses/\"> http://www.gnu.org/licenses/</a>>.</p></font>"
+ anchors.horizontalCenterOffset: 0
+ onLinkActivated: linkClicked(link);
+ }
+
+ MyTextLineEdit{
+ id: myTextLineEdit
+ x: 50
+ y: 32
+ width: 120
+ height: 30
+ }
+
+ /*SearchBarWidget {
+ id: searchbarwidget1
+ x: 0
+ y: 32
+ }
+ */
+
+}
--- /dev/null
+import Qt 4.7
+
+BorderImage {
+ id: button
+ property alias textInButton: buttonText.text
+ signal clicked
+ opacity: 1
+
+ border { left: 10; top: 10; right: 10; bottom: 10 }
+
+ MouseArea {
+ id: mouseArea
+ anchors.centerIn: parent;
+ width: ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)) - ((70*parent.height)/107)
+ height: parent.height
+ onClicked: {
+ button.clicked();
+ }
+ }
+
+ Text {
+ z:1
+ id: buttonText
+ anchors.centerIn: parent;
+ font.pixelSize: parent.height * .5
+ style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true
+ }
+
+ Rectangle {
+ id: shade
+ anchors.centerIn: parent;
+ radius: parent.height*.4;
+ color: "black";
+ opacity: 0
+ width: parent.width//((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60))
+ height: parent.height
+ }
+
+ Image {
+ id: image1
+ width: (35*parent.height)/107
+ height: parent.height
+ anchors.left: parent.left
+ anchors.leftMargin: (parent.width - ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)))/2
+ source: "qrc:/button/buttonLeft.png"
+ }
+
+ Image {
+ id: image3
+ width: ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)) - ((70*parent.height)/107)
+ height: parent.height
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "qrc:/button/buttonCenter.png"
+ }
+
+ Image {
+ id: image2
+ width: (35*parent.height)/107
+ height: parent.height
+ anchors.right: parent.right
+ anchors.rightMargin: (parent.width - ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)))/2
+ source: "qrc:/button/buttonR.png"
+ }
+
+ states: [
+ State {
+ name: "pressed"; when: mouseArea.pressed == true
+ PropertyChanges { target: shade; opacity: 0.4 }
+ PropertyChanges { target: image1; opacity: 0.5 }
+ PropertyChanges { target: image3; opacity: 0.5 }
+ PropertyChanges { target: image2; opacity: 0.5 }
+ }
+ ]
+}
--- /dev/null
+import Qt 4.7
+
+Rectangle {
+ id: rectangle
+
+ property alias pathToIcon: image.source;
+
+ signal clicked;
+
+ Image {
+ id: image
+ z:1;
+ anchors.centerIn: parent
+ width: rectangle.width;
+ height: rectangle.height;
+ }
+
+
+ MouseArea {
+ id: mouseArea
+ anchors.centerIn: parent;
+ width: rectangle.width + (70*parent.height)/107;
+ height: rectangle.height;
+ onClicked: {
+ rectangle.clicked();
+ }
+ }
+
+ Image {
+ id: image1
+ width: (35*parent.height)/107
+ height: parent.height
+ anchors.left: parent.left
+ anchors.leftMargin: - (35*parent.height)/107
+ source: "qrc:/button/buttonLeft.png"
+ }
+
+ Image {
+ id: image3
+ width: parent.width
+ height: parent.height
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "qrc:/button/buttonCenter.png"
+ }
+
+
+ Image {
+ id: image2
+ width: (35*parent.height)/107
+ height: parent.height
+ anchors.right: parent.right
+ anchors.rightMargin: - (35*parent.height)/107
+ source: "qrc:/button/buttonR.png"
+ }
+
+ Rectangle {
+ id: shade
+ anchors.centerIn: parent;
+ color: "black";
+ radius: 20;
+ opacity: 1;
+ width: rectangle.width+(70*parent.height)/107;
+ height: rectangle.height;
+ }
+
+ states: [
+ State {
+ name: "enable";
+ when: (mouseArea.pressed == false && rectangle.enabled == true);
+ PropertyChanges { target: shade;
+ opacity: 0; }
+ },
+ State {
+ name: "disable";
+ when: (rectangle.enabled == false);
+ PropertyChanges { target: shade;
+ color: "black";
+ opacity: .5; }
+ },
+ State {
+ name: "clicked";
+ when: (mouseArea.pressed == true && rectangle.enabled == true);
+ PropertyChanges { target: shade;
+ color: "#fffead"
+ opacity: 0.5; }
+ }
+ ]
+}
--- /dev/null
+import Qt 4.7
+
+Rectangle {
+ id: rectangle1
+ radius: 10
+ border.color: "#000666"
+
+
+ TextInput {
+ id: text_input1
+ width: rectangle1.width -20
+ height: rectangle1.height*0.6;
+ text: "textInput"
+ transformOrigin: Item.Left
+ anchors.centerIn: parent
+ selectByMouse: true;
+ font.pixelSize: rectangle1.height * .5;
+ onCursorPositionChanged: moveCursorSelection(cursorPosition);
+ }
+}
--- /dev/null
+import Qt 4.7
+
+Rectangle {
+ id: rectangle1
+ width: 500
+ height: 40
+
+ SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
+ color : myPalette.window;
+
+ TextInput {
+ id: text_input
+ y: 10
+ width: 350
+ height: 20
+
+ color: "#000000"
+ text: "textInput"
+ anchors.left: parent.left
+ anchors.leftMargin: 15
+ font.pixelSize: 12
+
+ IconButton {
+ id: iconbutton;
+ width:20;
+ height:20;
+ anchors.right: parent.right
+ enabled: true;
+ pathToIcon: "/home/jakub/go-previous.png";
+ }
+ }
+}