2000-05-15 04:53:53 +00:00
|
|
|
#ifndef __KDVIMULTIPAGE_H
|
|
|
|
#define __KDVIMULTIPAGE_H
|
|
|
|
|
|
|
|
#include <qstringlist.h>
|
|
|
|
|
2001-06-04 09:44:47 +00:00
|
|
|
class KPrinter;
|
2000-05-15 04:53:53 +00:00
|
|
|
|
2001-07-06 10:14:01 +00:00
|
|
|
#include "../kviewshell/kmultipage.h"
|
2005-06-02 10:05:50 +00:00
|
|
|
#include "dviRenderer.h"
|
2000-05-15 04:53:53 +00:00
|
|
|
|
|
|
|
class KDVIMultiPage : public KMultiPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2005-01-10 16:46:44 +00:00
|
|
|
KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
|
|
|
|
const char *name, const QStringList& args = QStringList());
|
2000-05-15 04:53:53 +00:00
|
|
|
virtual ~KDVIMultiPage();
|
|
|
|
|
|
|
|
// Interface definition start ------------------------------------------------
|
|
|
|
|
|
|
|
/// returns the list of supported file formats
|
|
|
|
virtual QStringList fileFormats();
|
2005-01-01 15:26:17 +00:00
|
|
|
|
2005-03-08 09:07:53 +00:00
|
|
|
virtual void setFile(bool r);
|
|
|
|
|
2005-05-25 05:34:41 +00:00
|
|
|
virtual void print();
|
2005-01-01 15:26:17 +00:00
|
|
|
|
2003-10-01 08:08:38 +00:00
|
|
|
/// KDVI offers read- and write functionality must re-implement this
|
|
|
|
/// method and return true here.
|
|
|
|
virtual bool isReadWrite() {return true;};
|
|
|
|
|
2004-10-25 18:07:53 +00:00
|
|
|
virtual void addConfigDialogs(KConfigDialog* configDialog);
|
2005-01-10 16:46:44 +00:00
|
|
|
|
|
|
|
static KAboutData* createAboutData();
|
|
|
|
|
2004-10-23 12:00:07 +00:00
|
|
|
private:
|
2005-05-05 08:50:23 +00:00
|
|
|
virtual DocumentWidget* createDocumentWidget();
|
2005-05-23 17:56:37 +00:00
|
|
|
|
|
|
|
virtual void initializePageCache();
|
|
|
|
|
2004-11-15 11:40:13 +00:00
|
|
|
/** Used to enable the export menu when a file is successfully
|
|
|
|
loaded. */
|
|
|
|
virtual void enableActions(bool);
|
2005-01-01 15:26:17 +00:00
|
|
|
|
2003-09-05 08:57:37 +00:00
|
|
|
public slots:
|
2003-10-01 08:08:38 +00:00
|
|
|
/** Opens a file requestor and saves. This really saves the content
|
|
|
|
of the DVI-file, and does not just start a copy job */
|
2003-09-05 08:57:37 +00:00
|
|
|
virtual void slotSave();
|
2005-01-01 15:26:17 +00:00
|
|
|
|
2003-10-01 08:08:38 +00:00
|
|
|
/** Similar to slotSave, but does not ask for a filename. */
|
|
|
|
virtual void slotSave_defaultFilename();
|
|
|
|
|
2005-01-01 15:26:17 +00:00
|
|
|
void setEmbedPostScriptAction(void);
|
2003-10-01 08:08:38 +00:00
|
|
|
|
2005-01-01 15:26:17 +00:00
|
|
|
void slotEmbedPostScript(void);
|
2004-05-02 14:40:29 +00:00
|
|
|
|
2005-02-27 10:19:21 +00:00
|
|
|
virtual void preferencesChanged();
|
|
|
|
|
2005-04-22 14:17:06 +00:00
|
|
|
/** 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();
|
|
|
|
|
2000-05-17 10:09:01 +00:00
|
|
|
protected slots:
|
2001-10-27 11:38:16 +00:00
|
|
|
void doExportText();
|
2001-11-26 12:32:34 +00:00
|
|
|
void doEnableWarnings();
|
2004-11-19 18:41:07 +00:00
|
|
|
|
2002-01-03 12:33:14 +00:00
|
|
|
void showTip(void);
|
|
|
|
void showTipOnStart(void);
|
2000-06-30 06:41:47 +00:00
|
|
|
|
2000-05-15 04:53:53 +00:00
|
|
|
private:
|
2004-10-23 12:00:07 +00:00
|
|
|
// Points to the same object as renderer to avoid downcasting.
|
|
|
|
// FIXME: Remove when the API of the Renderer-class is finished.
|
2005-01-01 15:26:17 +00:00
|
|
|
dviRenderer DVIRenderer;
|
2000-05-15 04:53:53 +00:00
|
|
|
|
2005-04-22 14:17:06 +00:00
|
|
|
// 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;
|
|
|
|
|
2004-05-02 14:40:29 +00:00
|
|
|
/*************************************************************
|
|
|
|
* Methods and classes concerned with the find functionality *
|
|
|
|
*************************************************************/
|
|
|
|
|
2001-05-03 08:45:04 +00:00
|
|
|
/** Pointers to several actions which are disabled if no file is
|
|
|
|
loaded. */
|
|
|
|
KAction *docInfoAction;
|
2003-09-05 08:57:37 +00:00
|
|
|
KAction *embedPSAction;
|
2001-05-03 08:45:04 +00:00
|
|
|
KAction *exportPDFAction;
|
2004-05-02 14:40:29 +00:00
|
|
|
KAction *exportPSAction;
|
2000-05-15 04:53:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|