5e3cea83d86e91d6127a2176f8fb897ba5ce36a5
[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
7     Situare is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License
9     version 2 as published by the Free Software Foundation.
10
11     Situare is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with Situare; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19     USA.
20  */
21
22 #ifndef PANELCOMMON_H
23 #define PANELCOMMON_H
24
25 #include <QString>
26 #include "../common.h"
27
28 // Dragging settings
29 const int DRAG_INIT_TIME = 1000;        ///< How long buttons must be pressed to start drag mode
30 const int FORCE_RELEASE_TIME = 10000;   ///< How long mouse can be grabbed
31
32 // Common panel settings
33 enum Side {LEFT, RIGHT};            ///< Enumerator for panel sideness
34
35 const int MAEMO5_SCROLLBAR_WIDTH = 8; ///< Width of the Maemo scrollbar
36
37 const int PANEL_PEEK_AMOUNT = 27;   ///< Amount of pixels shown when panel is closed
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 SIDEBAR_WIDTH = 23;                       ///< Width of the sidebar
42 const int SIDEBAR_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
43                            - PANEL_BOTTOM_PADDING;  ///< Height of the sidebar
44
45 const int SLIDER_BAR_WIDTH = 5;                     ///< Width of the slider bar
46 const int SLIDER_BUTTON_OFFSET = 19;                ///< Slider bar button extrusion width
47 const int SLIDER_WIDTH = 43;                        ///< Width of the whole slider
48 const int SLIDER_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
49                           - PANEL_BOTTOM_PADDING;   ///< Height of the slider
50
51 // Friend list panel settings
52 const int FRIENDPANEL_WIDTH  = 426;                     ///< Width of the friends list panel
53 const int FRIENDPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
54                                - PANEL_BOTTOM_PADDING;  ///< Height of the friends list panel
55
56 const int FRIENDPANEL_MARGIN_LEFT = SLIDER_BUTTON_OFFSET
57                                     + MAEMO5_SCROLLBAR_WIDTH; ///< Friend list panel inner margin (left)
58 const int FRIENDPANEL_MARGIN_RIGHT = SIDEBAR_WIDTH;         ///< Friend list panel inner margin (right)
59 const int FRIENDPANEL_MARGIN_TOP = 0;                       ///< Friend list panel inner margin (top)
60 const int FRIENDPANEL_MARGIN_BOTTOM = 0;                    ///< Friend list panel inner margin (bottom)
61
62 const int FRIENDPANEL_FILTER_MARGIN_LEFT = FRIENDPANEL_MARGIN_LEFT + 4; ///< Friend list filter bar margin (left)
63 const int FRIENDPANEL_FILTER_MARGIN_RIGHT = FRIENDPANEL_MARGIN_RIGHT
64                                             + MAEMO5_SCROLLBAR_WIDTH + 4; ///< Friend list filter bar margin (right)
65
66 const int SHOW_ALL_BUTTON_RIGHT_MARGIN = SIDEBAR_WIDTH * 2 - 7; ///< Show all button right margin
67
68 const int FRIENDPANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - SLIDER_BUTTON_OFFSET
69                                  - PANEL_PEEK_AMOUNT; ///< Horizontal position of a closed friend list panel
70 const int FRIENDPANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - SLIDER_BUTTON_OFFSET - SLIDER_BAR_WIDTH
71                                  - FRIENDPANEL_WIDTH; ///< Horizontal position of a open friend list panel
72
73 // User info panel settings
74 const int USERPANEL_WIDTH  = 298;                       ///< Width of the user panel
75 const int USERPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
76                              - PANEL_BOTTOM_PADDING;    ///< Height of the user panel
77
78 const int USERPANEL_MARGIN_LEFT = SIDEBAR_WIDTH
79                                   + MAEMO5_SCROLLBAR_WIDTH; ///< User info panel inner margin (left)
80 const int USERPANEL_MARGIN_RIGHT = SLIDER_BUTTON_OFFSET;    ///< User info panel inner margin (right)
81 const int USERPANEL_MARGIN_TOP = 0;                         ///< User info panel inner margin (top)
82 const int USERPANEL_MARGIN_BOTTOM = 0;                      ///< User info panel inner margin (bottom)
83
84 const int USERPANEL_CLOSED_X = - USERPANEL_WIDTH + PANEL_PEEK_AMOUNT
85                                - SLIDER_BAR_WIDTH;  ///< Horizontal position of a closed user info panel
86 const int USERPANEL_OPENED_X = 0;                   ///< Horizontal position of a open user info panel
87
88 // Zoom button panel settings
89 const int ZOOM_BUTTON_PANEL_POSITION_X = 10 + PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
90 const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
91 const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
92
93 const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position";
94
95 #endif // PANELCOMMON_H