Poll Updates and Send Polls

Fix showing polls and update the events and PollHandler to make them easier to work with.

Add a PollAnswerModel to visualise poll answers.

Enable sending polls.
This commit is contained in:
James Graham
2025-03-22 16:32:08 +00:00
parent 55d68af499
commit 37d77f579a
18 changed files with 764 additions and 165 deletions

View File

@@ -113,6 +113,20 @@ QQC2.Control {
}
tooltip: text
},
Kirigami.Action {
id: pollButton
icon.name: "amarok_playcount"
property bool isBusy: false
text: i18nc("@action:button", "Create a Poll")
displayHint: QQC2.AbstractButton.IconOnly
onTriggered: {
newPollDialog.createObject(QQC2.Overlay.overlay, {
room: root.currentRoom
}).open();
}
tooltip: text
},
Kirigami.Action {
id: sendAction
@@ -492,6 +506,11 @@ QQC2.Control {
LocationChooser {}
}
Component {
id: newPollDialog
NewPollDialog {}
}
CompletionMenu {
id: completionMenu
chatDocumentHandler: documentHandler