2 This file is part of KTnef.
4 Copyright (C) 2002 Michael Goffioul <kdeprint@swing.be>
5 Copyright (c) 2012 Allen Winter <winter@kde.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software Foundation,
14 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <KXmlGuiWindow>
24 class QContextMenuEvent
;
25 class QTreeWidgetItem
;
26 class KRecentFilesAction
;
34 using namespace KTnef
;
38 class KTNEFMain
: public KXmlGuiWindow
43 explicit KTNEFMain(QWidget
*parent
= Q_NULLPTR
);
46 void loadFile(const QString
&filename
);
49 void contextMenuEvent(QContextMenuEvent
*event
) Q_DECL_OVERRIDE
;
57 void propertiesFile();
58 void optionDefaultDir();
59 void extractAllFiles();
60 void slotEditToolbars();
61 void slotNewToolbarConfig();
62 void slotShowMessageProperties();
63 void slotShowMessageText();
64 void slotSaveMessageText();
66 void viewSelectionChanged();
67 void viewDoubleClicked(QTreeWidgetItem
*);
68 void viewDragRequested(const QList
<KTNEFAttach
*> &list
);
69 void slotConfigureKeys();
70 void openRecentFile(const QUrl
&);
73 void slotOpenWithAction(QAction
*act
);
76 void addRecentFile(const QUrl
&url
);
77 void setupStatusbar();
80 void enableExtractAll(bool on
= true);
81 void enableSingleAction(bool on
= true);
84 void extractTo(const QString
&dirname
);
85 QString
extractTemp(KTNEFAttach
*att
);
87 void openWith(const KService::Ptr
&offer
);
88 void createOpenWithMenu(QMenu
*topMenu
);
89 QAction
*createAppAction(const KService::Ptr
&service
, bool singleOffer
, QActionGroup
*actionGroup
, QObject
*parent
);
97 KRecentFilesAction
*mOpenRecentFileAction
;
99 Q_DECLARE_METATYPE(KService::Ptr
)