incidencewhatwhere.h 1.23 KB
Newer Older
1
/*
2
3
  SPDX-FileCopyrightText: 2010 Bertjan Broeksema <broeksema@kde.org>
  SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
4

5
  SPDX-License-Identifier: LGPL-2.0-or-later
6
7
8
9
10
11
12
*/

#ifndef INCIDENCEEDITOR_INCIDENCEWHATWHERE_H
#define INCIDENCEEDITOR_INCIDENCEWHATWHERE_H

#include "incidenceeditor-ng.h"

Laurent Montel's avatar
Laurent Montel committed
13
14
namespace Ui
{
15
16
17
class EventOrTodoDesktop;
}

Laurent Montel's avatar
Laurent Montel committed
18
19
namespace IncidenceEditorNG
{
20
/**
Glen Ditchfield's avatar
Glen Ditchfield committed
21
 * The IncidenceWhatWhere editor keeps track of the following Incidence parts:
22
23
24
25
26
27
28
29
 * - Summary
 * - Location
 */
class IncidenceWhatWhere : public IncidenceEditor
{
    Q_OBJECT
public:
    using IncidenceEditorNG::IncidenceEditor::load; // So we don't trigger -Woverloaded-virtual
Laurent Montel's avatar
Laurent Montel committed
30
    using IncidenceEditorNG::IncidenceEditor::save; // So we don't trigger -Woverloaded-virtual
31
32
33

    explicit IncidenceWhatWhere(Ui::EventOrTodoDesktop *ui);

34
35
    void load(const KCalendarCore::Incidence::Ptr &incidence) override;
    void save(const KCalendarCore::Incidence::Ptr &incidence) override;
Laurent Montel's avatar
Laurent Montel committed
36
37
    Q_REQUIRED_RESULT bool isDirty() const override;
    Q_REQUIRED_RESULT bool isValid() const override;
Glen Ditchfield's avatar
Glen Ditchfield committed
38
    void focusInvalidField() override;
39
40
41
    virtual void validate();

private:
Laurent Montel's avatar
Laurent Montel committed
42
    Ui::EventOrTodoDesktop *const mUi;
43
44
45
46
};
} // IncidenceEditorNG

#endif