KNotifications

knotificationreplyaction.cpp
1/*
2 This file is part of the KDE Frameworks
3 SPDX-FileCopyrightText: 2021 Kai Uwe Broulik <kde@broulik.de>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include "knotificationreplyaction.h"
9
10#include <QString>
11
12class KNotificationReplyActionPrivate
13{
14public:
15 QString label;
16 QString placeholderText;
17 QString submitButtonText;
18 QString submitButtonIconName;
20};
21
23 : QObject()
24 , d(new KNotificationReplyActionPrivate)
25{
26 d->label = label;
27}
28
30
32{
33 return d->label;
34}
35
37{
38 if (d->label != label) {
39 d->label = label;
41 }
42}
43
45{
46 return d->placeholderText;
47}
48
50{
51 if (d->placeholderText != placeholderText) {
52 d->placeholderText = placeholderText;
54 }
55}
56
58{
59 return d->submitButtonText;
60}
61
63{
64 if (d->submitButtonText != submitButtonText) {
65 d->submitButtonText = submitButtonText;
67 }
68}
69
71{
72 return d->submitButtonIconName;
73}
74
76{
77 if (d->submitButtonIconName != submitButtonIconName) {
78 d->submitButtonIconName = submitButtonIconName;
80 }
81}
82
87
89{
90 if (d->fallbackBehavior != fallbackBehavior) {
91 d->fallbackBehavior = fallbackBehavior;
93 }
94}
95
96#include "moc_knotificationreplyaction.cpp"
void labelChanged()
Emitted when label changed.
void fallbackBehaviorChanged()
Emitted when fallbackBehavior changed.
void placeholderTextChanged()
Emitted when placeholderText changed.
void setSubmitButtonText(const QString &submitButtonText)
Set the label for the button to send the typed reply.
void setFallbackBehavior(FallbackBehavior fallbackBehavior)
Set the fallback behavior for when the notification server does not support inline replies.
void setLabel(const QString &label)
Set the label for the action button.
void setSubmitButtonIconName(const QString &submitButtonIconName)
Set the icon name for the button to send the typed reply.
FallbackBehavior
Behavior when the notification server does not support inline replies.
@ HideAction
Don't add the reply action (default)
KNotificationReplyAction(const QString &label)
Creates a inline reply action with given label.
void setPlaceholderText(const QString &placeholderText)
Set the placeholder text for the inline reply text field, for example "Reply to Konqi....
void submitButtonIconNameChanged()
Emitted when submitButtonIconName changed.
~KNotificationReplyAction() override
Destroys this inline reply action.
void submitButtonTextChanged()
Emitted when submitButtonText changed.
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:16:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.