qrc and serachBarWidget
authorjakub <jakub.jaszczynski@comarch.com>
Thu, 16 Dec 2010 09:01:19 +0000 (10:01 +0100)
committerjakub <jakub.jaszczynski@comarch.com>
Thu, 16 Dec 2010 09:01:19 +0000 (10:01 +0100)
data/gui.qrc
src/mdictionary/qml/AboutWidget.qml
src/mdictionary/qml/Button.qml
src/mdictionary/qml/IconButton.qml
src/mdictionary/qml/MyTextLineEdit.qml
src/mdictionary/qml/SearchBarWidget.qml

index 376f9d7..d01ab42 100644 (file)
@@ -14,8 +14,5 @@
         <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>
index 8dbcbd8..24ad67e 100644 (file)
@@ -3,8 +3,8 @@ import QtWebKit 1.0
 
 Rectangle {
     id: item
-    width: 400;
-    height: 400;
+    //width: 400;
+   // height: 400;
     opacity: 1
     anchors.fill: parent
 
@@ -33,7 +33,7 @@ Rectangle {
         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
+        anchors.horizontalCenterOffset: 0
         onLinkActivated: linkClicked(link);
     }
 
@@ -55,19 +55,18 @@ Rectangle {
         onLinkActivated: linkClicked(link);
     }
 
-    MyTextLineEdit{
-        id: myTextLineEdit
-        x: 50
-        y: 32
-        width: 120
+    Button{
+        x:100;
+        y:100;
+        width: 500
         height: 30
+        textInButton: "ala ma kota"
     }
 
-    /*SearchBarWidget {
+    SearchBarWidget {
         id: searchbarwidget1
-        x: 0
-        y: 32
+        y:50;
+        width: item.width;
+        height: 30;
     }
-    */
-
 }
index 4151017..650786c 100644 (file)
@@ -32,13 +32,14 @@ BorderImage {
         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))
+        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
+        smooth: true
+        width: (35*parent.height)/107 +1
         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
@@ -47,7 +48,8 @@ BorderImage {
 
     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)
+        smooth: true
+        width: (((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)) - ((70*parent.height)/107))+1
         height: parent.height
         anchors.horizontalCenter: parent.horizontalCenter
         source: "qrc:/button/buttonCenter.png"
@@ -55,7 +57,8 @@ BorderImage {
 
     Image {
         id: image2
-        width: (35*parent.height)/107
+        smooth: true
+        width: (35*parent.height)/107 +1
         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
index 948d1b0..9b66836 100644 (file)
@@ -6,20 +6,12 @@ Rectangle {
     property alias pathToIcon: image.source;
 
     signal clicked;
-
-    Image {
-        id: image
-        z:1;
-        anchors.centerIn: parent
-        width: rectangle.width;
-        height: rectangle.height;
-    }
-
+    radius: 50
 
     MouseArea {
         id: mouseArea
         anchors.centerIn: parent;
-        width: rectangle.width + (70*parent.height)/107;
+        width: rectangle.width
         height: rectangle.height;
         onClicked: {
             rectangle.clicked();
@@ -27,39 +19,53 @@ Rectangle {
     }
 
     Image {
+        id: image
+        z:4;
+        anchors.centerIn: parent
+        width: rectangle.width;
+        height: rectangle.height;
+    }
+
+    Image {
         id: image1
-        width: (35*parent.height)/107
+        z: 1
+        smooth: true
+        width: (35*parent.height)/107 +1
         height: parent.height
         anchors.left: parent.left
-        anchors.leftMargin: - (35*parent.height)/107
         source: "qrc:/button/buttonLeft.png"
     }
 
     Image {
         id: image3
-        width: parent.width
+        z: 1
+        smooth: true
+        width: parent.width - (70*parent.height)/107 +1
         height: parent.height
         anchors.horizontalCenter: parent.horizontalCenter
         source: "qrc:/button/buttonCenter.png"
+
     }
 
 
     Image {
         id: image2
-        width: (35*parent.height)/107
+        z: 1
+        smooth: true
+        width: (35*parent.height)/107 +1
         height: parent.height
         anchors.right: parent.right
-        anchors.rightMargin:  - (35*parent.height)/107
         source: "qrc:/button/buttonR.png"
     }
 
     Rectangle {
         id: shade
+        z: 4
         anchors.centerIn: parent;
         color: "black";
         radius: 20;
         opacity: 1;
-        width:  rectangle.width+(70*parent.height)/107;
+        width:  rectangle.width;
         height: rectangle.height;
     }
 
index 36ea2e5..7093c02 100644 (file)
@@ -3,12 +3,11 @@ import Qt 4.7
 Rectangle {
     id: rectangle1
     radius: 10
-    border.color: "#000666"
-
+    border.color: "#000666";
 
     TextInput {
         id: text_input1
-        width: rectangle1.width -20
+        width: rectangle1.width-20
         height: rectangle1.height*0.6;
         text: "textInput"
         transformOrigin: Item.Left
index 72b2cdb..64c0142 100644 (file)
@@ -1,30 +1,73 @@
 import Qt 4.7
 
 Rectangle {
-    id: rectangle1
-    width: 500
-    height: 40
+    id: searchBarWidget
 
     SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
     color : myPalette.window;
 
-    TextInput {
-        id: text_input
-        y: 10
-        width: 350
-        height: 20
+    MyTextLineEdit{
+        id: inputSearchText
+        width: (searchBarWidget.width - (searchBarWidget.height*3.5 + searchButton.width + 9));
+        height: searchBarWidget.height
+        anchors.left: searchBarWidget.left
+        IconButton {
+            id: clearButton;
+            width:  inputSearchText.height-6;
+            height: inputSearchText.height-6;
+            anchors.rightMargin: 4
+            anchors.right: parent.right
+            anchors.verticalCenter: parent.verticalCenter
+            enabled: true;
+            pathToIcon: "/home/jakub/go-previous.png";
+        }
+    }
+
+    Item {
+        id: buttonsBox
+        width: searchBarWidget.height*3.5 + searchButton.width + 9
+        height: searchBarWidget.height
+        anchors.right: parent.right
+        anchors.verticalCenter: parent.verticalCenter
 
-        color: "#000000"
-        text: "textInput"
-        anchors.left: parent.left
-        anchors.leftMargin: 15
-        font.pixelSize: 12
+        Button {
+            id: searchButton
+            width: 100
+            height: searchBarWidget.height;
+            anchors.rightMargin: 3
+            anchors.right: historyButton3.left
+            anchors.verticalCenter: parent.verticalCenter
+            textInButton: "Search"
+        }
 
         IconButton {
-            id: iconbutton;
-            width:20;
-            height:20;
+            id: historyButton1;
+            width:  searchBarWidget.height
+            height: searchBarWidget.height
             anchors.right: parent.right
+            anchors.verticalCenter: parent.verticalCenter
+            enabled: true;
+            pathToIcon: "/home/jakub/go-previous.png";
+        }
+
+        IconButton {
+            id: historyButton2;
+            width:  searchBarWidget.height
+            height: searchBarWidget.height
+            anchors.rightMargin: 3
+            anchors.right: historyButton1.left
+            anchors.verticalCenter: parent.verticalCenter
+            enabled: true;
+            pathToIcon: "/home/jakub/go-previous.png";
+        }
+
+        IconButton {
+            id: historyButton3;
+            width:  searchBarWidget.height
+            height: searchBarWidget.height
+            anchors.rightMargin: 3
+            anchors.right: historyButton2.left
+            anchors.verticalCenter: parent.verticalCenter
             enabled: true;
             pathToIcon: "/home/jakub/go-previous.png";
         }