Messagelib

attachmentdialog.h
1/*
2 This file is part of KMail, the KDE mail client.
3 SPDX-FileCopyrightText: 2009 Martin Koller <kollix@aon.at>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#pragma once
9
10#include <KService>
11#include <QObject>
12
13class QDialog;
15namespace MessageViewer
16{
17/**
18 * A class which handles the dialog used to present the user a choice what to do
19 * with an attachment.
20 */
22{
24
25public:
26 /// returncodes for exec()
27 enum {
28 Save = 2,
29 Open,
30 OpenWith,
31 Cancel,
32 };
33
34 // if @offer is non-null, the "open with <application>" button will also be shown,
35 // otherwise only save, open with, cancel
36 explicit AttachmentDialog(QWidget *parent, const QString &filenameText, const KService::Ptr &offer, const QString &dontAskAgainName);
37
38 // executes the modal dialog
39 int exec();
40
41private:
42 void saveClicked();
43 void openClicked();
44 void openWithClicked();
45 QString text, dontAskName;
46 QDialog *const dialog;
47 QDialogButtonBox *mButtonBox = nullptr;
48};
49}
A class which handles the dialog used to present the user a choice what to do with an attachment.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.