~ubuntu-branches/ubuntu/vivid/frescobaldi/vivid

« back to all changes in this revision

Viewing changes to frescobaldi_app/qpopplerview/popplerqt4_dummy.py

  • Committer: Package Import Robot
  • Author(s): Ryan Kavanagh
  • Date: 2012-01-03 16:20:11 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120103162011-tsjkwl4sntwmprea
Tags: 2.0.0-1
* New upstream release 
* Drop the following uneeded patches:
  + 01_checkmodules_no_python-kde4_build-dep.diff
  + 02_no_pyc.diff
  + 04_no_binary_lilypond_upgrades.diff
* Needs new dependency python-poppler-qt4
* Update debian/watch for new download path
* Update copyright file with new holders and years

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of the qpopplerview package.
 
2
#
 
3
# Copyright (c) 2010, 2011 by Wilbert Berendsen
 
4
#
 
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.
 
9
#
 
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.
 
14
#
 
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.
 
19
 
 
20
 
 
21
"""
 
22
A dummy module containing a few of the definitions in popplerqt4.
 
23
 
 
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.
 
26
 
 
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.
 
29
 
 
30
"""
 
31
 
 
32
 
 
33
__all__ = ["Poppler"]
 
34
 
 
35
 
 
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__
 
40
        
 
41
 
 
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)
 
50
        
 
51
    class Page(_noinst):
 
52
        class Orientation(int): pass
 
53
        Landscape = Orientation(0)
 
54
        Portrait = Orientation(1)
 
55
        Seascape = Orientation(2)
 
56
        UpsideDown = Orientation(3)
 
57
        
 
58
        class PageAction(int): pass
 
59
        Opening = PageAction(0)
 
60
        Closing = PageAction(1)
 
61
        
 
62
        class PainterFlag(int): pass
 
63
        DontSaveAndRestore = PainterFlag(1)
 
64
        
 
65
        class Rotation(int): pass
 
66
        Rotate0 = Rotation(0)
 
67
        Rotate90 = Rotation(1)
 
68
        Rotate180 = Rotation(2)
 
69
        Rotate270 = Rotation(3)
 
70
        
 
71
        class SearchDirection(int): pass
 
72
        NextResult = SearchDirection(0)
 
73
        PreviousResult = SearchDirection(1)
 
74
        
 
75
        class SearchMode(int): pass
 
76
        CaseSensitive = SearchMode(0)
 
77
        CaseInsensitive = SearchMode(1)
 
78
        
 
79
        class TextLayout(int): pass
 
80
        PhysicalLayout = TextLayout(0)
 
81
        RawOrderLayout = TextLayout(1)
 
82
        
 
83
        
 
84
    class LinkDestination(_noinst): pass
 
85
    
 
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
 
94
 
 
95