KNotificationReplyAction Class
An inline reply action. More...
Header: | #include <KNotificationReplyAction> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Notifications) target_link_libraries(mytarget PRIVATE KF6::Notifications) |
Inherits: | QObject |
Public Types
enum class | FallbackBehavior { HideAction, UseRegularAction } |
Properties
|
|
Public Functions
KNotificationReplyAction(const QString &label) | |
KNotificationReplyAction::FallbackBehavior | fallbackBehavior() const |
QString | label() const |
QString | placeholderText() const |
void | setFallbackBehavior(KNotificationReplyAction::FallbackBehavior fallbackBehavior) |
void | setLabel(const QString &label) |
void | setPlaceholderText(const QString &placeholderText) |
void | setSubmitButtonIconName(const QString &submitButtonIconName) |
void | setSubmitButtonText(const QString &submitButtonText) |
QString | submitButtonIconName() const |
QString | submitButtonText() const |
Signals
void | activated() |
(since 5.88) void | fallbackBehaviorChanged() |
(since 5.88) void | labelChanged() |
(since 5.88) void | placeholderTextChanged() |
void | replied(const QString &text) |
(since 5.88) void | submitButtonIconNameChanged() |
(since 5.88) void | submitButtonTextChanged() |
Detailed Description
This class represents an inline reply action, which lets the user type a reply to a chat message or email in the notification popup.
Member Type Documentation
enum class KNotificationReplyAction::FallbackBehavior
Behavior when the notification server does not support inline replies
Constant | Value | Description |
---|---|---|
KNotificationReplyAction::FallbackBehavior::HideAction | 0 | Don't add the reply action (default) |
KNotificationReplyAction::FallbackBehavior::UseRegularAction | 1 | Add the reply action as regular button Use this if you want to provide your own reply functionality Note: The activated() signal is emitted instead of replied() |
Property Documentation
[since 5.88]
fallbackBehavior : FallbackBehavior
This property was introduced in 5.88.
Access functions:
KNotificationReplyAction::FallbackBehavior | fallbackBehavior() const |
void | setFallbackBehavior(KNotificationReplyAction::FallbackBehavior fallbackBehavior) |
Notifier signal:
void | fallbackBehaviorChanged() |
[since 5.88]
label : QString
This property was introduced in 5.88.
Access functions:
Notifier signal:
void | labelChanged() |
[since 5.88]
placeholderText : QString
This property was introduced in 5.88.
Access functions:
QString | placeholderText() const |
void | setPlaceholderText(const QString &placeholderText) |
Notifier signal:
void | placeholderTextChanged() |
[since 5.88]
submitButtonIconName : QString
This property was introduced in 5.88.
Access functions:
QString | submitButtonIconName() const |
void | setSubmitButtonIconName(const QString &submitButtonIconName) |
Notifier signal:
void | submitButtonIconNameChanged() |
[since 5.88]
submitButtonText : QString
This property was introduced in 5.88.
Access functions:
QString | submitButtonText() const |
void | setSubmitButtonText(const QString &submitButtonText) |
Notifier signal:
void | submitButtonTextChanged() |
Member Function Documentation
[explicit]
KNotificationReplyAction::KNotificationReplyAction(const QString &label)
Creates a inline reply action with given label
label The label for the action
[signal]
void KNotificationReplyAction::activated()
Emitted when the user clicks the reply fallback button
Note: This is emitted when the notification server does not support inline replies and fallbackBehavior is set to UseRegularAction.
KNotificationReplyAction::FallbackBehavior KNotificationReplyAction::fallbackBehavior() const
Gets the fallback behavior when the notification server does not support inline replies
Note: Getter function for property fallbackBehavior.
See also setFallbackBehavior().
[signal, since 5.88]
void KNotificationReplyAction::fallbackBehaviorChanged()
Emitted when fallbackBehavior changed.
Note: Notifier signal for property fallbackBehavior.
This function was introduced in 5.88.
QString KNotificationReplyAction::label() const
The label for the action button
Note: Getter function for property label.
See also setLabel().
[signal, since 5.88]
void KNotificationReplyAction::labelChanged()
Emitted when label changed.
Note: Notifier signal for property label.
This function was introduced in 5.88.
QString KNotificationReplyAction::placeholderText() const
The placeholder text for the inline reply text field
Note: Getter function for property placeholderText.
See also setPlaceholderText().
[signal, since 5.88]
void KNotificationReplyAction::placeholderTextChanged()
Emitted when placeholderText changed.
Note: Notifier signal for property placeholderText.
This function was introduced in 5.88.
[signal]
void KNotificationReplyAction::replied(const QString &text)
Emitted when the user has submitted a reply
Note: This is never emitted when the notification server does not support inline replies
text The text the user entered
void KNotificationReplyAction::setFallbackBehavior(KNotificationReplyAction::FallbackBehavior fallbackBehavior)
Set the fallback behavior for when the notification server does not support inline replies
Note: Setter function for property fallbackBehavior.
See also fallbackBehavior().
void KNotificationReplyAction::setLabel(const QString &label)
Set the label for the action button
Note: Setter function for property label.
See also label().
void KNotificationReplyAction::setPlaceholderText(const QString &placeholderText)
Set the placeholder text for the inline reply text field, for example "Reply to Konqi..."
Note: Setter function for property placeholderText.
See also placeholderText().
void KNotificationReplyAction::setSubmitButtonIconName(const QString &submitButtonIconName)
Set the icon name for the button to send the typed reply
Note: Setter function for property submitButtonIconName.
See also submitButtonIconName().
void KNotificationReplyAction::setSubmitButtonText(const QString &submitButtonText)
Set the label for the button to send the typed reply
Note: Setter function for property submitButtonText.
See also submitButtonText().
QString KNotificationReplyAction::submitButtonIconName() const
The icon name for the button to send the typed reply
Note: Getter function for property submitButtonIconName.
See also setSubmitButtonIconName().
[signal, since 5.88]
void KNotificationReplyAction::submitButtonIconNameChanged()
Emitted when submitButtonIconName changed.
Note: Notifier signal for property submitButtonIconName.
This function was introduced in 5.88.
QString KNotificationReplyAction::submitButtonText() const
The label for the button to send the typed reply
Note: Getter function for property submitButtonText.
See also setSubmitButtonText().
[signal, since 5.88]
void KNotificationReplyAction::submitButtonTextChanged()
Emitted when submitButtonText changed.
Note: Notifier signal for property submitButtonText.
This function was introduced in 5.88.