new preferences
[debian/gnuradio] / grc / src / gui / Constants.py
1 """
2 Copyright 2008 Free Software Foundation, Inc.
3 This file is part of GNU Radio
4
5 GNU Radio Companion 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 GNU Radio Companion 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 Street, Fifth Floor, Boston, MA  02110-1301, USA
18 """
19
20 import os
21
22 ##default path for the open/save dialogs
23 DEFAULT_FILE_PATH = os.getcwd()
24
25 ##file extensions
26 IMAGE_FILE_EXTENSION = '.png'
27
28 ##name for new/unsaved flow graphs
29 NEW_FLOGRAPH_TITLE = 'untitled'
30
31 ##rotation constants
32 DIR_LEFT = 'left'
33 DIR_RIGHT = 'right'
34
35 ##main window constraints
36 MIN_WINDOW_WIDTH = 600
37 MIN_WINDOW_HEIGHT = 400
38 ##dialog constraints
39 MIN_DIALOG_WIDTH = 500
40 MIN_DIALOG_HEIGHT = 500
41 ##default sizes
42 DEFAULT_BLOCKS_WINDOW_WIDTH = 100
43 DEFAULT_REPORTS_WINDOW_WIDTH = 100
44
45 ##How close can the mouse get to the window border before mouse events are ignored.
46 BORDER_PROXIMITY_SENSITIVITY = 50
47 ##How close the mouse can get to the edge of the visible window before scrolling is invoked.
48 SCROLL_PROXIMITY_SENSITIVITY = 30
49 ##When the window has to be scrolled, move it this distance in the required direction.
50 SCROLL_DISTANCE = 15
51 ##The redrawing sensitivity, how many seconds must pass between motion events before a redraw?
52 MOTION_DETECT_REDRAWING_SENSITIVITY = .02
53 ##How close the mouse click can be to a connection and register a connection select.
54 CONNECTION_SELECT_SENSITIVITY = 5
55
56 ##The size of the state saving cache in the flow graph (for undo/redo functionality)
57 STATE_CACHE_SIZE = 42