Messagelib

opensavedfilefolderwidget.h
1 /*
2  SPDX-FileCopyrightText: 2014-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <KMessageWidget>
10 #include <QUrl>
11 class QTimer;
12 namespace MessageViewer
13 {
14 class OpenSavedFileFolderWidget : public KMessageWidget
15 {
16  Q_OBJECT
17 public:
18  enum class FileType {
19  Attachment,
20  Pdf,
21  };
22 
23  explicit OpenSavedFileFolderWidget(QWidget *parent = nullptr);
24  ~OpenSavedFileFolderWidget() override;
25 
26  void setUrls(const QList<QUrl> &urls, MessageViewer::OpenSavedFileFolderWidget::FileType fileType);
27 
28 public Q_SLOTS:
29  void slotShowWarning();
30  void slotHideWarning();
31 
32 private:
33  void slotOpenSavedFileFolder();
34  void slotTimeOut();
35  void slotOpenFile();
36  void slotExplicitlyClosed();
37  QList<QUrl> mUrls;
38  QTimer *const mTimer;
39  QAction *const mShowFolderAction;
40  QAction *const mOpenFileAction;
41 };
42 }
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
KCOREADDONS_EXPORT void setUrls(const QList< QUrl > &urls, const QList< QUrl > &mostLocalUrls, QMimeData *mimeData)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 19 2022 03:53:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.