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
);
50 void contextMenuEvent(QContextMenuEvent
*event
) Q_DECL_OVERRIDE
;
58 void propertiesFile();
59 void optionDefaultDir();
60 void extractAllFiles();
61 void slotEditToolbars();
62 void slotNewToolbarConfig();
63 void slotShowMessageProperties();
64 void slotShowMessageText();
65 void slotSaveMessageText();
67 void viewSelectionChanged();
68 void viewDoubleClicked(QTreeWidgetItem
*);
69 void viewDragRequested(const QList
<KTNEFAttach
*> &list
);
70 void slotConfigureKeys();
71 void openRecentFile(const QUrl
&);
74 // void closeEvent( QCloseEvent *e );
77 void slotOpenWithAction(QAction
*act
);
80 void addRecentFile(const QUrl
&url
);
81 void setupStatusbar();
84 void enableExtractAll(bool on
= true);
85 void enableSingleAction(bool on
= true);
88 void extractTo(const QString
&dirname
);
89 QString
extractTemp(KTNEFAttach
*att
);
91 void openWith(const KService::Ptr
&offer
);
92 void createOpenWithMenu(QMenu
*topMenu
);
93 QAction
*createAppAction(const KService::Ptr
&service
, bool singleOffer
, QActionGroup
*actionGroup
, QObject
*parent
);
101 KRecentFilesAction
*mOpenRecentFileAction
;
103 Q_DECLARE_METATYPE(KService::Ptr
)