File: constants.py

package info (click to toggle)
python-enable 3.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,392 kB
  • ctags: 17,135
  • sloc: cpp: 79,151; python: 29,601; makefile: 2,926; sh: 43
file content (110 lines) | stat: -rw-r--r-- 3,023 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110

from PyQt4.QtCore import Qt

BUTTON_NAME_MAP = {
    Qt.LeftButton: "left",
    Qt.RightButton: "right",
    Qt.MidButton: "middle",
}

# TODO: Create bitmap cursor for the following:
#   arrow wait
#   bullseye
#   char
#   magnifier
#   paint brush
#   pencil
#   point left
#   point right
#   right arrow
#   spray can

POINTER_MAP = {
   'arrow':            Qt.ArrowCursor,
   'arrow wait':       Qt.BusyCursor,
   'blank':            Qt.BlankCursor,
   'bullseye':         Qt.CrossCursor,
   'char':             Qt.IBeamCursor,
   'cross':            Qt.CrossCursor,
   'hand':             Qt.PointingHandCursor,
   'ibeam':            Qt.IBeamCursor,
   'left button':      Qt.ArrowCursor,
   'magnifier':        Qt.CrossCursor,
   'middle button':    Qt.ArrowCursor,
   'no entry':         Qt.ForbiddenCursor,
   'paint brush':      Qt.ArrowCursor,
   'pencil':           Qt.CrossCursor,
   'point left':       Qt.ArrowCursor,
   'point right':      Qt.ArrowCursor,
   'question arrow':   Qt.WhatsThisCursor,
   'right arrow':      Qt.ArrowCursor,
   'right button':     Qt.ArrowCursor,
   'size bottom':      Qt.SizeVerCursor,
   'size bottom left': Qt.SizeBDiagCursor,
   'size bottom right':Qt.SizeFDiagCursor,
   'size left':        Qt.SizeHorCursor,
   'size right':       Qt.SizeHorCursor,
   'size top':         Qt.SizeVerCursor,
   'size top left':    Qt.SizeFDiagCursor,
   'size top right':   Qt.SizeBDiagCursor,
   'sizing':           Qt.SizeAllCursor,
   'spray can':        Qt.CrossCursor,
   'wait':             Qt.WaitCursor,
   'watch':            Qt.BusyCursor,
}

KEY_MAP = {
    Qt.Key_Escape: "Esc",
    Qt.Key_Tab: "Tab",
    Qt.Key_Backtab: "Backtab",
    Qt.Key_Backspace: "Backspace",
    Qt.Key_Return: "Enter",
    Qt.Key_Enter: "Enter",
    Qt.Key_Insert: "Insert",
    Qt.Key_Delete: "Delete",
    Qt.Key_Pause: "Pause",
    Qt.Key_Print: "Print",
    Qt.Key_SysReq: "Sysreq",
    Qt.Key_Clear: "Clear",
    Qt.Key_Home: "Home",
    Qt.Key_End: "End",
    Qt.Key_Left: "Left",
    Qt.Key_Up: "Up",
    Qt.Key_Right: "Right",
    Qt.Key_Down: "Down",
    Qt.Key_PageUp: "Page Up",
    Qt.Key_PageDown: "Page Down",
    # We don't pass these on so we don't bother having entries for them.
    #Qt.Key_Shift: "Shift",
    #Qt.Key_Control: "Control",
    #Qt.Key_Alt: "Alt",
    #Qt.Key_AltGr: "Alt",
    Qt.Key_Meta: "Meta",
    Qt.Key_CapsLock: "Caps Lock",
    Qt.Key_NumLock: "Num Lock",
    Qt.Key_ScrollLock: "Scroll Lock",
    Qt.Key_F1:  "F1",
    Qt.Key_F2:  "F2",
    Qt.Key_F3:  "F3",
    Qt.Key_F4:  "F4",
    Qt.Key_F5:  "F5",
    Qt.Key_F6:  "F6",
    Qt.Key_F7:  "F7",
    Qt.Key_F8:  "F8",
    Qt.Key_F9:  "F9",
    Qt.Key_F10:  "F10",
    Qt.Key_F11:  "F11",
    Qt.Key_F12:  "F12",
    Qt.Key_F13:  "F13",
    Qt.Key_F14:  "F14",
    Qt.Key_F15:  "F15",
    Qt.Key_F16:  "F16",
    Qt.Key_F17:  "F17",
    Qt.Key_F18:  "F18",
    Qt.Key_F19:  "F19",
    Qt.Key_F20:  "F20",
    Qt.Key_F21:  "F21",
    Qt.Key_F22:  "F22",
    Qt.Key_F23:  "F23",
    Qt.Key_F24:  "F24",
}