Merge branch 'master' into new_panels
[situare] / src / ui / panelcommon.h
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Kaj Wallin - kaj.wallin@ixonos.com
6         Katri Kaikkonen - katri.kaikkonen@ixonos.com
7         Pekka Nissinen - pekka.nissinen@ixonos.com
8
9     Situare is free software; you can redistribute it and/or
10     modify it under the terms of the GNU General Public License
11     version 2 as published by the Free Software Foundation.
12
13     Situare is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License for more details.
17
18     You should have received a copy of the GNU General Public License
19     along with Situare; if not, write to the Free Software
20     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
21     USA.
22 */
23
24 #ifndef PANELCOMMON_H
25 #define PANELCOMMON_H
26
27 #include <QString>
28
29 #include "../common.h"
30
31 // Dragging settings
32 const int DRAG_INIT_TIME = 1000;        ///< How long buttons must be pressed to start drag mode
33 const int FORCE_RELEASE_TIME = 10000;   ///< How long mouse can be grabbed
34
35 // Common panel settings
36 const int MAEMO5_SCROLLBAR_WIDTH = 8; ///< Width of the Maemo scrollbar
37
38 const int PANEL_TOP_PADDING = 0;    ///< Amount of padding in top of panels
39 const int PANEL_BOTTOM_PADDING = 0; ///< Amount of padding in bottom of panels
40
41 const int PANEL_BAR_WIDTH = 5;                                          ///< Width of the slider bar
42 const int PANEL_TAB_WIDTH = 74;                                         ///< Panel tab (maximum) width
43 const int PANEL_BAR_TABBED_WIDTH = PANEL_BAR_WIDTH + PANEL_TAB_WIDTH;   ///< Width of the tabbed bar
44 const int PANEL_WIDTH  = 384;                                           ///< Width of the panel
45 const int PANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
46                          - PANEL_BOTTOM_PADDING;                        ///< Height of the panel
47
48 const int PANEL_MARGIN_LEFT = MAEMO5_SCROLLBAR_WIDTH; ///< Panel inner margin (left)
49 const int PANEL_MARGIN_RIGHT = 0;                     ///< Panel inner margin (right)
50 const int PANEL_MARGIN_TOP = 0;                       ///< Panel inner margin (top)
51 const int PANEL_MARGIN_BOTTOM = 0;                    ///< Panel inner margin (bottom)
52
53 /**
54  * @brief Friend list filter bar margin (left)
55  *
56  * @var FRIENDPANEL_FILTER_MARGIN_LEFT
57  */
58 const int FRIENDPANEL_FILTER_MARGIN_LEFT = PANEL_MARGIN_LEFT + 4;
59
60 /**
61  * @brief Friend list filter bar margin (right)
62  *
63  * @var FRIENDPANEL_FILTER_MARGIN_RIGHT
64  */
65 const int FRIENDPANEL_FILTER_MARGIN_RIGHT = PANEL_MARGIN_RIGHT + MAEMO5_SCROLLBAR_WIDTH + 4;
66
67 const int SHOW_ALL_BUTTON_RIGHT_MARGIN = 39; ///< Show all button right margin
68
69 const int PANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_WIDTH
70                                  - PANEL_BAR_WIDTH; ///< Horizontal position of a closed panel
71
72 const int PANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - PANEL_TAB_WIDTH - PANEL_BAR_WIDTH
73                                  - PANEL_WIDTH;     ///< Horizontal position of a open panel
74
75 // Zoom button panel settings
76 const int ZOOM_BUTTON_PANEL_POSITION_X = 10; ///< Horizontal position of zoom panel
77 const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
78 const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
79
80 const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position";
81
82 #endif // PANELCOMMON_H