1 /***************************************************************************
2 * Copyright (C) 2002 by Wilco Greven <greven@kde.org> *
3 * Copyright (C) 2003 by Benjamin Meyer <benjamin@csh.rit.edu> *
4 * Copyright (C) 2003 by Laurent Montel <montel@kde.org> *
5 * Copyright (C) 2003 by Luboš Luňák <l.lunak@kde.org> *
6 * Copyright (C) 2004 by Christophe Devriese *
7 * <Christophe.Devriese@student.kuleuven.ac.be> *
8 * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 ***************************************************************************/
16 #ifndef _OKULAR_SHELL_H_
17 #define _OKULAR_SHELL_H_
19 #include <kparts/mainwindow.h>
22 class KRecentFilesAction
;
25 class KDocumentViewer
;
29 * This is the application "Shell". It has a menubar and a toolbar
30 * but relies on the "Part" to do all the real work.
32 * @short Application Shell
33 * @author Wilco Greven <greven@kde.org>
36 class Shell
: public KParts::MainWindow
44 explicit Shell(KCmdLineArgs
* args
= 0, const KUrl
&url
= KUrl());
55 * This method is called when it is time for the app to save its
56 * properties for session management purposes.
58 void saveProperties(KConfigGroup
&);
61 * This method is called when this app is restored. The KConfig
62 * object points to the session management config file that was saved
63 * with @ref saveProperties
65 void readProperties(const KConfigGroup
&);
68 void setFullScreen( bool );
73 void slotUpdateFullScreen();
74 void slotShowMenubar();
76 void openUrl( const KUrl
& url
, uint page
= 0 );
80 void restoreDocument(const KConfigGroup
&group
);
81 void saveDocumentRestoreInfo(KConfigGroup
&group
);
87 QStringList
fileFormats() const;
91 KParts::ReadOnlyPart
* m_part
;
92 KDocumentViewer
* m_doc
;
93 KRecentFilesAction
* m_recent
;
94 QStringList m_fileformats
;
95 bool m_fileformatsscanned
;
96 KAction
* m_printAction
;
97 KToggleAction
* m_fullScreenAction
;
98 KToggleAction
* m_showMenuBarAction
;
99 KToggleAction
* m_showToolBarAction
;
100 bool m_menuBarWasShown
, m_toolBarWasShown
;
106 // vim:ts=2:sw=2:tw=78:et