File indexing completed on 2025-01-05 04:54:20

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 
0008 #include <Akonadi/Item>
0009 #include <QDialog>
0010 class QListWidget;
0011 class KNote;
0012 class QPushButton;
0013 class KNoteSelectedNotesDialog : public QDialog
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit KNoteSelectedNotesDialog(QWidget *parent = nullptr);
0018     ~KNoteSelectedNotesDialog() override;
0019 
0020     void setNotes(const QHash<Akonadi::Item::Id, KNote *> &notes);
0021 
0022     QStringList selectedNotes() const;
0023 
0024 private Q_SLOTS:
0025     void slotSelectionChanged();
0026 
0027 private:
0028     enum listViewData { AkonadiId = Qt::UserRole + 1 };
0029 
0030     void writeConfig();
0031     void readConfig();
0032     QListWidget *mListNotes = nullptr;
0033     QHash<Akonadi::Item::Id, KNote *> mNotes;
0034     QPushButton *mOkButton = nullptr;
0035 };