2020-05-29 21:05:05 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
|
|
|
|
2020-06-29 11:48:06 +03:00
|
|
|
Dialog {
|
|
|
|
id: emojiDialog
|
|
|
|
allowedOrientations: Orientation.All
|
|
|
|
canAccept: false //selector.currentIndex >= 0
|
|
|
|
onAcceptPendingChanged: {
|
|
|
|
if (acceptPending) {
|
|
|
|
// Tell the destination page what the selected category is
|
|
|
|
// acceptDestinationInstance.category = selector.value
|
2020-05-29 21:05:05 +03:00
|
|
|
}
|
2020-06-29 11:48:06 +03:00
|
|
|
}
|
2020-07-03 11:45:30 +03:00
|
|
|
anchors.top: parent.top
|
2020-06-29 11:48:06 +03:00
|
|
|
|
|
|
|
Column {
|
|
|
|
id: emojiColumn
|
|
|
|
spacing: Theme.paddingLarge
|
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
2020-06-03 08:34:33 +03:00
|
|
|
|
2020-07-03 11:45:30 +03:00
|
|
|
VerticalScrollDecorator { flickable: gridView}
|
|
|
|
|
2020-05-29 21:05:05 +03:00
|
|
|
SilicaGridView {
|
|
|
|
id: gridView
|
|
|
|
header: PageHeader {
|
|
|
|
title: qsTr("Emojis")
|
|
|
|
description: qsTr("Tap to insert")
|
|
|
|
}
|
2020-06-29 11:48:06 +03:00
|
|
|
cellWidth: isPortrait ? gridView.width / 6 : gridView.width / 10
|
2020-06-03 08:34:33 +03:00
|
|
|
cellHeight: cellWidth
|
2020-06-29 11:48:06 +03:00
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
2020-05-29 21:05:05 +03:00
|
|
|
model: ListModel {
|
2020-07-03 11:45:30 +03:00
|
|
|
ListElement { section: "Smileys"; glyph: "😄" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😃" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😀" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😊" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "☺" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😉" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😍" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😘" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😚" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😗" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😙" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😜" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😝" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😛" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😳" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😁" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😔" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😌" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😒" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😞" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😣" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😢" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😂" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😭" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😪" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😥" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😰" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😅" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😩" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😫" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😨" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😱" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😠" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😡" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😤" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😖" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😆" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😋" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😷" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😎" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😴" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😵" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😲" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😟" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😦" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😧" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😈" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "👿" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😮" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😬" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😐" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😕" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😯" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😶" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😇" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😏" }
|
|
|
|
ListElement { section: "Smileys"; glyph: "😑" }
|
|
|
|
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😺" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😸" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😻" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😽" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😼" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "🙀" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😿" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😹" }
|
|
|
|
ListElement { section: "Cat Faces"; glyph: "😾" }
|
2020-05-29 21:05:05 +03:00
|
|
|
|
2020-07-03 11:45:30 +03:00
|
|
|
ListElement { section: "Other Faces"; glyph: "👹" }
|
|
|
|
ListElement { section: "Other Faces"; glyph: "👺" }
|
|
|
|
ListElement { section: "Other Faces"; glyph: "🙈" }
|
|
|
|
ListElement { section: "Other Faces"; glyph: "🙉" }
|
|
|
|
ListElement { section: "Other Faces"; glyph: "🙊" }
|
|
|
|
ListElement { section: "Other Faces"; glyph: "💀" }
|
|
|
|
ListElement { section: "Other Faces"; glyph: "👽" }
|
|
|
|
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "🔥" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "✨" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "🌟" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💫" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💥" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💢" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💦" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💧" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💤" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💨" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👂" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👀" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👃" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👅" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👄" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👍" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👎" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👌" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👊" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "✊" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "✌" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👋" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "✋" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👐" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👆" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👇" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👉" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👈" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "🙌" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "🙏" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "☝" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "👏" }
|
|
|
|
ListElement { section: "Misc Emoji"; glyph: "💪" }
|
|
|
|
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐶" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐺" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐱" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐭" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐹" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐰" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐸" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐯" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐨" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐘" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐼" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐧" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐦" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐤" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐥" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐣" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐔" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐍" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐢" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐛" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐝" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐜" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐞" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐌" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐙" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐚" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐠" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐟" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐬" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐳" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐋" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐄" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐏" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐀" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐃" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐅" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐇" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐉" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐎" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐐" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐓" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐕" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐖" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐁" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐂" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐲" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐡" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐊" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐫" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐪" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐆" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐈" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐩" }
|
|
|
|
ListElement { section: "Animals Emoji"; glyph: "🐾" }
|
2020-05-29 21:05:05 +03:00
|
|
|
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚀" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚃" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚀" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚄" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚅" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚇" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚉" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚌" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚏" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚑" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚒" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚓" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚕" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚗" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚙" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚚" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚢" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚨" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚩" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚪" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚫" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚬" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚭" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚲" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚶" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚹" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚺" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚻" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚼" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚽" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🚾" }
|
|
|
|
ListElement { section: "Transport and Map"; glyph: "🛀" }
|
|
|
|
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♈" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♉" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♊" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♋" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♌" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♍" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♎" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♏" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♐" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♑" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♒" }
|
|
|
|
ListElement { section: "Horoscope Signs"; glyph: "♓" }
|
|
|
|
}
|
2020-06-29 11:48:06 +03:00
|
|
|
|
2020-05-29 21:05:05 +03:00
|
|
|
delegate: BackgroundItem {
|
|
|
|
width: gridView.cellWidth
|
|
|
|
height: gridView.cellHeight
|
2020-06-03 08:34:33 +03:00
|
|
|
|
2020-05-29 21:05:05 +03:00
|
|
|
Label {
|
|
|
|
text: glyph
|
2020-06-03 08:34:33 +03:00
|
|
|
font.pixelSize: Theme.fontSizeLarge
|
2020-07-03 11:45:30 +03:00
|
|
|
color: highlighted ? Theme.secondaryHighlightColor : Theme.secondaryColor
|
2020-06-03 08:34:33 +03:00
|
|
|
anchors.centerIn: parent
|
2020-05-29 21:05:05 +03:00
|
|
|
}
|
2020-07-03 11:45:30 +03:00
|
|
|
|
2020-05-29 21:05:05 +03:00
|
|
|
onClicked: {
|
|
|
|
var cursorPosition = toot.cursorPosition
|
|
|
|
toot.text = toot.text.substring(
|
|
|
|
0, cursorPosition) + model.glyph + toot.text.substring(
|
|
|
|
cursorPosition)
|
|
|
|
toot.cursorPosition = cursorPosition + model.glyph.length
|
2020-06-29 11:48:06 +03:00
|
|
|
emojiDialog.canAccept = true
|
|
|
|
emojiDialog.accept()
|
2020-05-29 21:05:05 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-10 12:44:58 +03:00
|
|
|
}
|