A Sailfish wordbook app good for a lot of languages, but in favor of German.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
3.4 KiB

7 years ago
import QtQuick 2.0
import Sailfish.Silica 1.0
import com.dictcc 1.0
Page {
id: page
SilicaFlickable {
anchors.fill: parent
contentWidth: parent.width
contentHeight: parent.height
SilicaListView {
anchors.fill: parent
spacing: Theme.paddingMedium
7 years ago
model: DictModel {
id: dict_model
}
header: Column {
PullDownMenu {
MenuItem {
text: "DEEN"
6 years ago
onClicked: dict_model.change_language("DEEN")
7 years ago
}
MenuItem {
text: "DESV"
6 years ago
onClicked: dict_model.change_language("DESV")
}
MenuItem {
text: "DENL"
onClicked: dict_model.change_language("DENL")
7 years ago
}
MenuItem {
text: "About"
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
}
}
PageHeader {
title: "Dictcc"
}
width: page.width
SearchField {
width: page.width
id: user_input
placeholderText: qsTr("Enter word or phrase")
EnterKey.onClicked: {
dict_model.search(user_input.text)
}
}
GlassItem {
id: effect
height: Theme.paddingLarge
width: page.width
color: Theme.highlightColor
cache: false
}
}
delegate: Column {
width: page.width
Label {
id: body
text: msg2usr
7 years ago
color: Theme.primaryColor
font.pixelSize: Theme.fontSizeLarge
wrapMode: Text.WordWrap
//maximumLineCount: 3
7 years ago
anchors {
left: parent.left
right: parent.right
7 years ago
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
Label {
wrapMode: Text.WordWrap
text: lang1
color: Theme.highlightColor
font.family: Theme.fontFamilyHeading
font.pixelSize: Theme.fontSizeLarge
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
Label {
wrapMode: Text.WordWrap
text: lang2
color: Theme.primaryColor
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
}
}
}
}