CalendarSupport

freebusyitem.h
1/*
2 SPDX-FileCopyrightText: 2000, 2001, 2004 Cornelius Schumacher <schumacher@kde.org>
3 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
4 SPDX-FileCopyrightText: 2010 Andras Mantia <andras@kdab.com>
5 SPDX-FileCopyrightText: 2010 Casey Link <casey@kdab.com>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "calendarsupport_export.h"
13
14#include <KCalendarCore/FreeBusy>
15
16namespace CalendarSupport
17{
18/**
19 * The FreeBusyItem is the whole line for a given attendee..
20 */
21class CALENDARSUPPORT_EXPORT FreeBusyItem
22{
23public:
25
26 /**
27 * @param parentWidget is passed to Akonadi when fetching free/busy data.
28 */
29 FreeBusyItem(const KCalendarCore::Attendee &attendee, QWidget *parentWidget);
30 ~FreeBusyItem() = default;
31
32 [[nodiscard]] KCalendarCore::Attendee attendee() const;
33 void setFreeBusy(const KCalendarCore::FreeBusy::Ptr &fb);
34 [[nodiscard]] KCalendarCore::FreeBusy::Ptr freeBusy() const;
35
36 [[nodiscard]] QString email() const;
37 void setUpdateTimerID(int id);
38 [[nodiscard]] int updateTimerID() const;
39
40 void startDownload(bool forceDownload);
41 void setIsDownloading(bool d);
42 [[nodiscard]] bool isDownloading() const;
43
44Q_SIGNALS:
45 void attendeeChanged(const KCalendarCore::Attendee &attendee);
46 void freebusyChanged(const KCalendarCore::FreeBusy::Ptr fb);
47
48private:
49 const KCalendarCore::Attendee mAttendee;
51
52 // This is used for the update timer
53 int mTimerID = 0;
54
55 // Only run one download job at a time
56 bool mIsDownloading = false;
57
58 QWidget *const mParentWidget;
59};
60}
The FreeBusyItem is the whole line for a given attendee.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:05:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.