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