2002-09-02 20:21:47 +00:00
|
|
|
#ifndef _KPDF_SHELL_H_
|
|
|
|
#define _KPDF_SHELL_H_
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include <config.h>
|
2003-09-14 17:44:18 +00:00
|
|
|
#endif
|
2002-09-02 20:21:47 +00:00
|
|
|
|
|
|
|
#include <kapplication.h>
|
|
|
|
#include <kparts/mainwindow.h>
|
2003-09-14 17:44:18 +00:00
|
|
|
|
2002-09-02 20:21:47 +00:00
|
|
|
namespace KPDF
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is the application "Shell". It has a menubar, toolbar, and
|
|
|
|
* statusbar but relies on the "Part" to do all the real work.
|
|
|
|
*
|
|
|
|
* @short Application Shell
|
|
|
|
* @author Wilco Greven <greven@kde.org>
|
|
|
|
* @version 0.1
|
|
|
|
*/
|
|
|
|
class Shell : public KParts::MainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Default Constructor
|
|
|
|
*/
|
|
|
|
Shell();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default Destructor
|
|
|
|
*/
|
|
|
|
virtual ~Shell();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
* This method is called when it is time for the app to save its
|
|
|
|
* properties for session management purposes.
|
|
|
|
*/
|
|
|
|
void saveProperties(KConfig*);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method is called when this app is restored. The KConfig
|
|
|
|
* object points to the session management config file that was saved
|
|
|
|
* with @ref saveProperties
|
|
|
|
*/
|
|
|
|
void readProperties(KConfig*);
|
2003-09-14 17:44:18 +00:00
|
|
|
void readSettings();
|
|
|
|
void writeSettings();
|
2002-09-02 20:21:47 +00:00
|
|
|
|
|
|
|
private slots:
|
2002-09-02 21:56:00 +00:00
|
|
|
void fileOpen();
|
|
|
|
void fileSaveAs();
|
|
|
|
|
2002-09-02 20:21:47 +00:00
|
|
|
void optionsConfigureKeys();
|
|
|
|
void optionsConfigureToolbars();
|
2003-09-14 19:04:36 +00:00
|
|
|
void slotQuit();
|
2002-09-02 20:21:47 +00:00
|
|
|
|
|
|
|
void applyNewToolbarConfig();
|
2003-09-14 17:44:18 +00:00
|
|
|
public slots:
|
|
|
|
void openURL( const KURL & url );
|
2002-09-02 20:21:47 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void setupAccel();
|
|
|
|
void setupActions();
|
|
|
|
|
|
|
|
private:
|
|
|
|
KParts::ReadOnlyPart* m_part;
|
2003-09-14 17:44:18 +00:00
|
|
|
KRecentFilesAction* recent;
|
2002-09-02 20:21:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// vim:ts=2:sw=2:tw=78:et
|