Incidenceeditor

incidenceresource.h
1/*
2 * SPDX-FileCopyrightText: 2014 Sandro Knauß <knauss@kolabsys.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
5 */
6
7#pragma once
8
9#include "attendeetablemodel.h"
10#include "incidenceattendee.h"
11#include "incidenceeditor-ng.h"
12
13namespace Ui
14{
15class EventOrTodoDesktop;
16}
17class QCompleter;
18namespace IncidenceEditorNG
19{
20class ResourceManagement;
21
22class IncidenceResource : public IncidenceEditor
23{
25public:
26 using IncidenceEditorNG::IncidenceEditor::load; // So we don't trigger -Woverloaded-virtual
27 using IncidenceEditorNG::IncidenceEditor::save; // So we don't trigger -Woverloaded-virtual
28
29 explicit IncidenceResource(IncidenceAttendee *mIeAttendee, IncidenceDateTime *dateTime, Ui::EventOrTodoDesktop *ui);
30 ~IncidenceResource() override;
31
32 void load(const KCalendarCore::Incidence::Ptr &incidence) override;
33 void save(const KCalendarCore::Incidence::Ptr &incidence) override;
34 bool isDirty() const override;
35
36 /** return the count of resources */
37 [[nodiscard]] int resourceCount() const;
38
40 /** is emitted it the count of the resources is changed.
41 * @arg: new count of resources.
42 */
43 void resourceCountChanged(int);
44
45private:
46 void findResources();
47 void bookResource();
48 void layoutChanged();
49 void updateCount();
50
51 void slotDateChanged();
52
53 void dialogOkPressed();
54 Ui::EventOrTodoDesktop *const mUi;
55
56 /** completer for findResources */
57 QCompleter *completer = nullptr;
58
59 /** used dataModel to rely on*/
60 AttendeeTableModel *dataModel = nullptr;
61 IncidenceDateTime *mDateTime = nullptr;
62
63 ResourceManagement *resourceDialog = nullptr;
64};
65}
virtual void load(const KCalendarCore::Incidence::Ptr &incidence)=0
Load the values of.
QSharedPointer< IncidenceT > incidence() const
Convenience method to get a pointer for a specific const Incidence Type.
virtual void save(const KCalendarCore::Incidence::Ptr &incidence)=0
Store the current values of the editor into.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.