1
# This file is part of the qpopplerview package.
3
# Copyright (c) 2010, 2011 by Wilbert Berendsen
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public License
7
# as published by the Free Software Foundation; either version 2
8
# of the License, or (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
# See http://www.gnu.org/licenses/ for more information.
22
A dummy module containing a few of the definitions in popplerqt4.
24
This is imported if the real popplerqt4 is not available and makes it
25
possible to import qpopplerview, although it can't do anything useful.
27
It only contains class definitions that define a namespace, enums or other
28
constants. Classes can't be instantiated and have no member functions.
36
class _noinst(object):
37
"""A class that can't be instantiated."""
38
def __new__(cls, *args, **kwargs):
39
raise TypeError, "can't instantiate %s" % cls.__name__
42
class Poppler(_noinst):
43
class Document(_noinst):
44
def load(filename): pass
45
def loadFromData(data): pass
46
class RenderHint(int): pass
47
Antialiasing = RenderHint(1)
48
TextAntialiasing = RenderHint(2)
49
TextHinting = RenderHint(4)
52
class Orientation(int): pass
53
Landscape = Orientation(0)
54
Portrait = Orientation(1)
55
Seascape = Orientation(2)
56
UpsideDown = Orientation(3)
58
class PageAction(int): pass
59
Opening = PageAction(0)
60
Closing = PageAction(1)
62
class PainterFlag(int): pass
63
DontSaveAndRestore = PainterFlag(1)
65
class Rotation(int): pass
67
Rotate90 = Rotation(1)
68
Rotate180 = Rotation(2)
69
Rotate270 = Rotation(3)
71
class SearchDirection(int): pass
72
NextResult = SearchDirection(0)
73
PreviousResult = SearchDirection(1)
75
class SearchMode(int): pass
76
CaseSensitive = SearchMode(0)
77
CaseInsensitive = SearchMode(1)
79
class TextLayout(int): pass
80
PhysicalLayout = TextLayout(0)
81
RawOrderLayout = TextLayout(1)
84
class LinkDestination(_noinst): pass
86
class Link(_noinst): pass
87
class LinkAction(Link): pass
88
class LinkAnnotation(Link):pass
89
class LinkBrowse(Link): pass
90
class LinkExecute(Link): pass
91
class LinkGoto(Link): pass
92
class LinkJavaScript(Link): pass
93
class LinkSound(Link): pass