summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/qpdf.h
blob: fd4f013940f47b285c06484e1326eef54d9db5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef __QPDF_H__
#define __QPDF_H__

#include "aconf.h"

#include <qmainwindow.h>

//#define QPDF_QPE_ONLY 1

class QPEOutputDev;
class PDFDoc;

class DocLnk;
class FileSelector;
class OFileSelector;
class QWidgetStack;
class QLineEdit;


class QPdfDlg : public QMainWindow {
	Q_OBJECT

public:
	QPdfDlg ( );
	virtual ~QPdfDlg ( );
	
public slots:
	void firstPage ( );
	void prevPage ( );
	void nextPage ( );
	void lastPage ( );
	
	void gotoPage ( int n );
	
	void setZoom ( int z );
	
	void gotoPageDialog ( );

	void toggleFullscreen ( );
	void toggleFindBar ( );	

	void findText ( const QString & );	
	void findText ( );
	
	void openFile ( );
	void openFile ( const QString & );
	void openFile ( const DocLnk & );	
	
	void setDocument ( const QString & );
	
private slots:
	void delayedInit ( );
	void closeFileSelector ( );

	void updateCaption ( );

	void copyToClipboard ( const QRect & );

protected:
	void setFullscreen ( bool b = true );

	void setBusy ( bool b = true );
	bool busy ( ) const;

	void renderPage ( );
	
	virtual void resizeEvent ( QResizeEvent *e );
	virtual void focusInEvent ( QFocusEvent *e );
	
private:
	QWidgetStack *m_stack;
	QPEOutputDev *m_outdev;	

#ifdef QPDF_QPE_ONLY
	FileSelector *m_filesel;
#else
	OFileSelector *m_filesel;
#endif
	
	QToolBar *m_tb_menu, *m_tb_tool, *m_tb_find;
	QLineEdit *m_findedit;
	QPopupMenu *m_pm_zoom;

	QToolButton *m_to_find, *m_to_full;
	
	bool m_fullscreen;

	bool m_busy;
	bool m_renderok;
	
	int m_currentpage;
	int m_pages;
	int m_zoom;
	
	PDFDoc *m_doc;
	
	QString m_currentdoc;
};


#endif