File indexing completed on 2024-05-05 05:21:06

0001 /*
0002    SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #pragma once
0007 #include <Akonadi/Item>
0008 #include <QDialog>
0009 class QListWidget;
0010 class QLabel;
0011 class QListWidgetItem;
0012 namespace NoteShared
0013 {
0014 class NoteListWidget;
0015 }
0016 class KJob;
0017 class NotesAgentAlarmDialog : public QDialog
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit NotesAgentAlarmDialog(QWidget *parent = nullptr);
0022     ~NotesAgentAlarmDialog() override;
0023 
0024     void addListAlarm(const Akonadi::Item::List &lstAlarm);
0025     void removeAlarm(const Akonadi::Item &note);
0026 
0027 private:
0028     void slotItemDoubleClicked(QListWidgetItem *item);
0029     void slotCustomContextMenuRequested(const QPoint &pos);
0030     void slotShowNote();
0031     void slotRemoveAlarm();
0032     void slotFetchItem(KJob *job);
0033     void slotModifyItem(KJob *job);
0034     void slotModifyAlarm();
0035     void slotFetchAlarmItem(KJob *job);
0036 
0037     void readConfig();
0038     void writeConfig();
0039     NoteShared::NoteListWidget *mListWidget = nullptr;
0040     QLabel *mCurrentDateTime = nullptr;
0041 };