summaryrefslogtreecommitdiffstats
path: root/kdvi/kdvi_multipage.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kdvi/kdvi_multipage.h
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
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
Diffstat (limited to 'kdvi/kdvi_multipage.h')
-rw-r--r--kdvi/kdvi_multipage.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/kdvi/kdvi_multipage.h b/kdvi/kdvi_multipage.h
new file mode 100644
index 00000000..713afab7
--- /dev/null
+++ b/kdvi/kdvi_multipage.h
@@ -0,0 +1,96 @@
+// -*- C++ -*-
+#ifndef KDVIMULTIPAGE_H
+#define KDVIMULTIPAGE_H
+
+#include "kmultipage.h"
+#include "dviRenderer.h"
+
+#include <qstringlist.h>
+
+class KPrinter;
+
+class KDVIMultiPage : public KMultiPage
+{
+ Q_OBJECT
+
+public:
+ KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
+ const char *name, const QStringList& args = QStringList());
+ virtual ~KDVIMultiPage();
+
+// Interface definition start ------------------------------------------------
+
+ /// returns the list of supported file formats
+ virtual QStringList fileFormats() const;
+
+ virtual void setFile(bool r);
+
+ virtual void print();
+
+ /// KDVI offers read- and write functionality must re-implement this
+ /// method and return true here.
+ virtual bool isReadWrite() {return true;}
+
+ virtual void addConfigDialogs(KConfigDialog* configDialog);
+
+ static KAboutData* createAboutData();
+
+private:
+ virtual DocumentWidget* createDocumentWidget();
+
+ virtual void initializePageCache();
+
+ /** Used to enable the export menu when a file is successfully
+ loaded. */
+ virtual void enableActions(bool);
+
+public slots:
+ /** Opens a file requestor and saves. This really saves the content
+ of the DVI-file, and does not just start a copy job */
+ virtual void slotSave();
+
+ /** Similar to slotSave, but does not ask for a filename. */
+ virtual void slotSave_defaultFilename();
+
+ void setEmbedPostScriptAction();
+
+ void slotEmbedPostScript();
+
+ virtual void preferencesChanged();
+
+ /** Shows the "text search" dialog, if text search is supported by
+ the renderer. Otherwise, the method returns immediately.
+ We reimplement this slot to show a warning message that informs the
+ user about the currently limited search capabilities of KDVI. */
+ virtual void showFindTextDialog();
+
+protected slots:
+ void doExportText();
+ void doEnableWarnings();
+
+ void showTip();
+ void showTipOnStart();
+
+private:
+ // Points to the same object as renderer to avoid downcasting.
+ // FIXME: Remove when the API of the Renderer-class is finished.
+ dviRenderer DVIRenderer;
+
+ // Set to true if we used the search function atleast once.
+ // It is used to remember if we already have show the warning message.
+ bool searchUsed;
+
+ /*************************************************************
+ * Methods and classes concerned with the find functionality *
+ *************************************************************/
+
+ /** Pointers to several actions which are disabled if no file is
+ loaded. */
+ KAction *docInfoAction;
+ KAction *embedPSAction;
+ KAction *exportPDFAction;
+ KAction *exportPSAction;
+};
+
+
+#endif