From 47d455dd55be855e4cc691c32f687f723d9247ee Mon Sep 17 00:00:00 2001
From: toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Date: Wed, 25 Nov 2009 17:56:58 +0000
Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
 BUG:215923

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
 kviewshell/kviewshell.h | 89 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
 create mode 100644 kviewshell/kviewshell.h

(limited to 'kviewshell/kviewshell.h')

diff --git a/kviewshell/kviewshell.h b/kviewshell/kviewshell.h
new file mode 100644
index 00000000..c6aa0620
--- /dev/null
+++ b/kviewshell/kviewshell.h
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+#ifndef KVIEWSHELL_H
+#define KVIEWSHELL_H
+
+#include <qstring.h>
+
+#include <kparts/mainwindow.h>
+
+class KRecentFilesAction;
+class KURL;
+class KViewPart_Iface;
+
+
+class QLabel;
+
+class KViewShell : public KParts::MainWindow
+{
+  Q_OBJECT
+
+public:
+  KStatusBar *statusbar;
+  KStatusBar *action;
+
+  KViewShell(const QString& defaultMimeType = QString::null);
+  virtual ~KViewShell();
+
+public slots:
+  void openURL(const KURL&);
+  void addRecentFile();
+
+
+protected slots:
+  void slotFullScreen();
+  void slotQuit();
+  void slotConfigureKeys();
+  void slotEditToolbar();
+  void slotFileClose();
+  void slotNewToolbarConfig();
+
+  void slotChangeZoomText(const QString &);
+  void slotChangePageText(const QString &);
+  void slotChangeSizeText(const QString &);
+
+signals:
+  void restoreDocument(const KURL &url, int page);
+  void saveDocumentRestoreInfo(KConfig* config);
+
+protected:
+  void readSettings();
+  void writeSettings();
+
+  /**
+   * 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*);
+
+  void checkActions();
+
+  void dragEnterEvent(QDragEnterEvent *event);
+  void dropEvent(QDropEvent *event);
+  void keyPressEvent(QKeyEvent * e);
+
+private:
+  KViewPart_Iface *view;
+
+  KRecentFilesAction *recent;
+  QString cwd;
+
+  KAction *closeAction, *reloadAction;
+  KToggleAction *fullScreenAction;
+
+  // In the attribute, the status of the statusbar (shown of hidden)
+  // is saved when the kviewshell switches to fullscreen mode. The
+  // statusbar can then be restored when the application returns to normal mode.
+  bool isStatusBarShownInNormalMode;
+  // ditto, for the toolbar
+  bool isToolBarShownInNormalMode;
+};
+
+
+#endif
-- 
cgit v1.2.1