File indexing completed on 2024-04-28 05:11:30
0001 /* 0002 SPDX-FileCopyrightText: 2003 Cornelius Schumacher <schumacher@kde.org> 0003 SPDX-FileCopyrightText: 2005 Reinhold Kainhofer <reinhold@kainhofer.com> 0004 SPDX-FileCopyrightText: 2005 Rafal Rzepecki <divide@users.sourceforge.net> 0005 SPDX-FileCopyrightText: 2010 Bertjan Broeksema <broeksema@kde.org> 0006 SPDX-FileCopyrightText: 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 0009 */ 0010 0011 #pragma once 0012 0013 #include <KCalendarCore/Attachment> 0014 #include <QDialog> 0015 #include <QMimeType> 0016 #include <QUrl> 0017 0018 class QPushButton; 0019 0020 namespace Ui 0021 { 0022 class AttachmentEditDialog; 0023 } 0024 0025 namespace IncidenceEditorNG 0026 { 0027 class AttachmentIconItem; 0028 0029 class AttachmentEditDialog : public QDialog 0030 { 0031 Q_OBJECT 0032 public: 0033 AttachmentEditDialog(AttachmentIconItem *item, QWidget *parent, bool modal = true); 0034 ~AttachmentEditDialog() override; 0035 void accept() override; 0036 0037 protected Q_SLOTS: 0038 void inlineChanged(int state); 0039 void urlChanged(const QUrl &url); 0040 void urlChanged(const QString &url); 0041 virtual void slotApply(); 0042 0043 private: 0044 KCalendarCore::Attachment mAttachment; 0045 AttachmentIconItem *const mItem; 0046 QMimeType mMimeType; 0047 Ui::AttachmentEditDialog *const mUi; 0048 QPushButton *mOkButton = nullptr; 0049 }; 0050 }