2024-08-23 10:58:48 +00:00
|
|
|
import QtQuick 2.15
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2024-08-23 10:58:48 +00:00
|
|
|
import shared.status 1.0
|
2020-10-20 15:32:03 +00:00
|
|
|
|
2022-11-23 16:17:23 +00:00
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
|
2020-10-20 15:32:03 +00:00
|
|
|
StatusInputListPopup {
|
2021-12-08 21:20:43 +00:00
|
|
|
id: emojiSuggestions
|
2022-02-09 20:50:38 +00:00
|
|
|
|
2020-10-20 15:32:03 +00:00
|
|
|
property string shortname
|
2022-01-11 23:16:17 +00:00
|
|
|
property string unicode: {
|
|
|
|
if(listView.currentIndex < 0 || listView.currentIndex >= emojiSuggestions.modelList.count)
|
|
|
|
return ""
|
|
|
|
|
2024-08-26 08:16:59 +00:00
|
|
|
return emojiSuggestions.modelList[listView.currentIndex].unicode
|
2022-01-11 23:16:17 +00:00
|
|
|
}
|
2020-10-20 15:32:03 +00:00
|
|
|
|
|
|
|
getImageSource: function (modelData) {
|
2022-11-23 16:17:23 +00:00
|
|
|
return Emoji.svgImage(modelData.unicode)
|
2020-10-20 15:32:03 +00:00
|
|
|
}
|
|
|
|
getText: function (modelData) {
|
|
|
|
return modelData.shortname
|
|
|
|
}
|
2022-01-24 17:59:59 +00:00
|
|
|
getId: function (modelData) {
|
|
|
|
return modelData.unicode
|
|
|
|
}
|
2020-10-20 15:32:03 +00:00
|
|
|
|
|
|
|
function openPopup(emojisParam, shortnameParam) {
|
|
|
|
modelList = emojisParam
|
|
|
|
shortname = shortnameParam
|
|
|
|
emojiSuggestions.open()
|
|
|
|
}
|
|
|
|
}
|