Messagelib

sendlaterinfo.cpp
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "sendlaterinfo.h"
8
9using namespace MessageComposer;
10
11bool SendLaterInfo::isValid() const
12{
13 return (mId != -1) && mDateTime.isValid();
14}
15
16bool SendLaterInfo::isRecurrence() const
17{
18 return mRecurrence;
19}
20
21void SendLaterInfo::setRecurrence(bool b)
22{
23 mRecurrence = b;
24}
25
26void SendLaterInfo::setRecurrenceUnit(SendLaterInfo::RecurrenceUnit unit)
27{
28 mRecurrenceUnit = unit;
29}
30
31SendLaterInfo::RecurrenceUnit SendLaterInfo::recurrenceUnit() const
32{
33 return mRecurrenceUnit;
34}
35
36void SendLaterInfo::setRecurrenceEachValue(int value)
37{
38 mRecurrenceEachValue = value;
39}
40
41int SendLaterInfo::recurrenceEachValue() const
42{
43 return mRecurrenceEachValue;
44}
45
46void SendLaterInfo::setItemId(Akonadi::Item::Id id)
47{
48 mId = id;
49}
50
51Akonadi::Item::Id SendLaterInfo::itemId() const
52{
53 return mId;
54}
55
56void SendLaterInfo::setDateTime(const QDateTime &time)
57{
58 mDateTime = time;
59}
60
61QDateTime SendLaterInfo::dateTime() const
62{
63 return mDateTime;
64}
65
66void SendLaterInfo::setLastDateTimeSend(const QDateTime &dateTime)
67{
68 mLastDateTimeSend = dateTime;
69}
70
71QDateTime SendLaterInfo::lastDateTimeSend() const
72{
73 return mLastDateTimeSend;
74}
75
76void SendLaterInfo::setSubject(const QString &subject)
77{
78 mSubject = subject;
79}
80
81QString SendLaterInfo::subject() const
82{
83 return mSubject;
84}
85
86void SendLaterInfo::setTo(const QString &to)
87{
88 mTo = to;
89}
90
91QString SendLaterInfo::to() const
92{
93 return mTo;
94}
95
96bool SendLaterInfo::operator==(const SendLaterInfo &other) const
97{
98 return (itemId() == other.itemId()) && (recurrenceUnit() == other.recurrenceUnit()) && (recurrenceEachValue() == other.recurrenceEachValue())
99 && (isRecurrence() == other.isRecurrence()) && (dateTime() == other.dateTime()) && (lastDateTimeSend() == other.lastDateTimeSend())
100 && (subject() == other.subject()) && (to() == other.to());
101}
102
104{
105 d << "mTo: " << info.to();
106 d << "mSubject: " << info.subject();
107 d << "mDateTime: " << info.dateTime().toString();
108 d << "mLastDateTimeSend: " << info.lastDateTimeSend().toString();
109 d << "mId: " << info.itemId();
110 d << "mRecurrenceEachValue: " << info.recurrenceEachValue();
111 d << "mRecurrenceUnit: " << info.recurrenceUnit();
112 d << "mRecurrence: " << info.isRecurrence();
113 return d;
114}
Send later information.
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
QDebug operator<<(QDebug dbg, const PerceptualColor::LchaDouble &value)
bool isValid() const const
QString toString(QStringView format, QCalendar cal) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.