Further improvements to the ChatBox API
Further improvements to the ChatBox API so that outside components no longer access the ChatBar item directly.
This commit is contained in:
@@ -37,16 +37,20 @@ ColumnLayout {
|
||||
*/
|
||||
property NeoChatRoom currentRoom
|
||||
|
||||
/**
|
||||
* @brief The chatBar object
|
||||
*/
|
||||
property alias chatBar: chatBar
|
||||
|
||||
/**
|
||||
* @brief A message has been sent from the chat bar.
|
||||
*/
|
||||
signal messageSent()
|
||||
|
||||
/**
|
||||
* @brief Insert the given text into the ChatBar.
|
||||
*
|
||||
* The text is inserted at the current cursor location.
|
||||
*/
|
||||
function insertText(text) {
|
||||
chatBar.insertText(text)
|
||||
}
|
||||
|
||||
spacing: 0
|
||||
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
@@ -86,4 +90,6 @@ ColumnLayout {
|
||||
chatBox.messageSent();
|
||||
}
|
||||
}
|
||||
|
||||
onActiveFocusChanged: chatBar.forceActiveFocus()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user