[poppler]
poppler/qt: poppler-document.cc, 1.1, 1.2 poppler-page.cc,
1.2, 1.3 poppler-qt.h, 1.2, 1.3
Jeff Muizelaar
jrmuizel at freedesktop.org
Thu Apr 7 20:11:03 PDT 2005
Update of /cvs/poppler/poppler/qt
In directory gabe:/tmp/cvs-serv19361/qt
Modified Files:
poppler-document.cc poppler-page.cc poppler-qt.h
Log Message:
2005-04-07 Jeff Muizelaar <jrmuizel at nit.ca>
* qt/poppler-document.cc:
* qt/poppler-page.cc:
* qt/poppler-qt.h:
Patch from Albert Astals Cid adding consts and exporting some more
metadata.
Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-document.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- poppler-document.cc 6 Apr 2005 14:39:40 -0000 1.1
+++ poppler-document.cc 8 Apr 2005 03:11:01 -0000 1.2
@@ -60,7 +60,7 @@
delete data;
}
-bool Document::isLocked()
+bool Document::isLocked() const
{
return data->locked;
}
@@ -83,7 +83,7 @@
return data->locked;
}
-Document::PageMode Document::getPageMode(void)
+Document::PageMode Document::getPageMode(void) const
{
switch (data->doc.getCatalog()->getPageMode()) {
case Catalog::pageModeNone:
@@ -101,7 +101,7 @@
}
}
-int Document::getNumPages()
+int Document::getNumPages() const
{
return data->doc.getNumPages();
}
@@ -229,4 +229,19 @@
return QDateTime();
}
+bool Document::isEncrypted() const
+{
+ return data->doc.isEncrypted();
+}
+
+bool Document::isLinearized() const
+{
+ return data->doc.isLinearized();
+}
+
+double Document::getPDFVersion() const
+{
+ return data->doc.getPDFVersion();
+}
+
}
Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-page.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- poppler-page.cc 6 Apr 2005 20:35:03 -0000 1.2
+++ poppler-page.cc 8 Apr 2005 03:11:01 -0000 1.3
@@ -31,11 +31,11 @@
class PageData {
public:
- Document *doc;
+ const Document *doc;
int index;
};
-Page::Page(Document *doc, int index) {
+Page::Page(const Document *doc, int index) {
data = new PageData();
data->index = index;
data->doc = doc;
@@ -46,7 +46,7 @@
delete data;
}
-void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h)
+void Page::renderToPixmap(QPixmap **q, int x, int y, int w, int h) const
{
SplashOutputDev *output_dev;
SplashColor white;
Index: poppler-qt.h
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-qt.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- poppler-qt.h 6 Apr 2005 20:35:03 -0000 1.2
+++ poppler-qt.h 8 Apr 2005 03:11:01 -0000 1.3
@@ -30,9 +30,9 @@
friend class Document;
public:
~Page();
- void renderToPixmap(QPixmap **q, int x, int y, int w, int h);
+ void renderToPixmap(QPixmap **q, int x, int y, int w, int h) const;
private:
- Page(Document *doc, int index);
+ Page(const Document *doc, int index);
PageData *data;
};
@@ -52,18 +52,21 @@
static Document *Document::load(const QString & filePath);
- Page *getPage(int index) { return new Page(this, index); }
+ Page *getPage(int index) const{ return new Page(this, index); }
- int getNumPages();
+ int getNumPages() const;
- PageMode getPageMode();
+ PageMode getPageMode() const;
bool unlock(QCString &password);
- bool isLocked();
+ bool isLocked() const;
QDateTime getDate( const QString & data ) const;
QString getInfo( const QString & data ) const;
+ bool isEncrypted() const;
+ bool isLinearized() const;
+ double getPDFVersion() const;
Document::~Document();
More information about the poppler
mailing list