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
List of all members, including inherited members
Public Types
Properties
- fallbackBehavior : FallbackBehavior
- label : QString
- placeholderText : QString
- submitButtonIconName : QString
- submitButtonText : QString
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()
- void fallbackBehaviorChanged()
- void labelChanged()
- void placeholderTextChanged()
- void replied(const QString &text)
- void submitButtonIconNameChanged()
- 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 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
fallbackBehavior : FallbackBehavior
Access functions:
KNotificationReplyAction::FallbackBehaviorfallbackBehavior() constvoidsetFallbackBehavior(KNotificationReplyAction::FallbackBehaviorfallbackBehavior)
Notifier signal:
voidfallbackBehaviorChanged()
label : QString
Access functions:
Notifier signal:
voidlabelChanged()
placeholderText : QString
Access functions:
QStringplaceholderText() constvoidsetPlaceholderText(constQString&placeholderText)
Notifier signal:
voidplaceholderTextChanged()
submitButtonIconName : QString
Access functions:
QStringsubmitButtonIconName() constvoidsetSubmitButtonIconName(constQString&submitButtonIconName)
Notifier signal:
voidsubmitButtonIconNameChanged()
submitButtonText : QString
Access functions:
QStringsubmitButtonText() constvoidsetSubmitButtonText(constQString&submitButtonText)
Notifier signal:
voidsubmitButtonTextChanged()
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] void KNotificationReplyAction::fallbackBehaviorChanged()
Emitted when fallbackBehavior changed.
Note: Notifier signal for property fallbackBehavior.
QString KNotificationReplyAction::label() const
The label for the action button
Note: Getter function for property label.
See also setLabel()
[signal] void KNotificationReplyAction::labelChanged()
Emitted when label changed.
Note: Notifier signal for property label.
QString KNotificationReplyAction::placeholderText() const
The placeholder text for the inline reply text field
Note: Getter function for property placeholderText.
See also setPlaceholderText()
[signal] void KNotificationReplyAction::placeholderTextChanged()
Emitted when placeholderText changed.
Note: Notifier signal for property placeholderText.
[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] void KNotificationReplyAction::submitButtonIconNameChanged()
Emitted when submitButtonIconName changed.
Note: Notifier signal for property submitButtonIconName.
QString KNotificationReplyAction::submitButtonText() const
The label for the button to send the typed reply
Note: Getter function for property submitButtonText.
See also setSubmitButtonText()
[signal] void KNotificationReplyAction::submitButtonTextChanged()
Emitted when submitButtonText changed.
Note: Notifier signal for property submitButtonText.