Added indicatorbuttonpanel.cpp and indicatorbuttonpanel.h
[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 enum Side {LEFT, RIGHT};            ///< Enumerator for panel sideness
37
38 const int MAEMO5_SCROLLBAR_WIDTH = 8; ///< Width of the Maemo scrollbar
39
40 const int PANEL_PEEK_AMOUNT = 27;   ///< Amount of pixels shown when panel is closed
41 const int PANEL_TOP_PADDING = 0;    ///< Amount of padding in top of panels
42 const int PANEL_BOTTOM_PADDING = 0; ///< Amount of padding in bottom of panels
43
44 const int SIDEBAR_WIDTH = 23;                       ///< Width of the sidebar
45 const int SIDEBAR_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
46                            - PANEL_BOTTOM_PADDING;  ///< Height of the sidebar
47
48 const int SLIDER_BAR_WIDTH = 5;                     ///< Width of the slider bar
49 const int SLIDER_BUTTON_OFFSET = 19;                ///< Slider bar button extrusion width
50 const int SLIDER_WIDTH = 43;                        ///< Width of the whole slider
51 const int SLIDER_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
52                           - PANEL_BOTTOM_PADDING;   ///< Height of the slider
53
54 // Friend list panel settings
55 const int FRIENDPANEL_WIDTH  = 426;                     ///< Width of the friends list panel
56 const int FRIENDPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
57                                - PANEL_BOTTOM_PADDING;  ///< Height of the friends list panel
58
59 /**
60  * @brief Friend list panel inner margin (left)
61  *
62  * @var FRIENDPANEL_MARGIN_LEFT
63  */
64 const int FRIENDPANEL_MARGIN_LEFT = SLIDER_BUTTON_OFFSET
65                                     + MAEMO5_SCROLLBAR_WIDTH;
66 const int FRIENDPANEL_MARGIN_RIGHT = SIDEBAR_WIDTH;     ///< Friend list panel inner margin (right)
67 const int FRIENDPANEL_MARGIN_TOP = 0;                   ///< Friend list panel inner margin (top)
68 const int FRIENDPANEL_MARGIN_BOTTOM = 0;                ///< Friend list panel inner margin (bottom)
69
70 /**
71  * @brief Friend list filter bar margin (left)
72  *
73  * @var FRIENDPANEL_FILTER_MARGIN_LEFT
74  */
75 const int FRIENDPANEL_FILTER_MARGIN_LEFT = FRIENDPANEL_MARGIN_LEFT + 4;
76
77 /**
78  * @brief Friend list filter bar margin (right)
79  *
80  * @var FRIENDPANEL_FILTER_MARGIN_RIGHT
81  */
82 const int FRIENDPANEL_FILTER_MARGIN_RIGHT = FRIENDPANEL_MARGIN_RIGHT
83                                             + MAEMO5_SCROLLBAR_WIDTH + 4;
84
85 const int SHOW_ALL_BUTTON_RIGHT_MARGIN = SIDEBAR_WIDTH * 2 - 7; ///< Show all button right margin
86
87 /**
88  * @brief Horizontal position of a closed friend list panel
89  *
90  * @var FRIENDPANEL_CLOSED_X
91  */
92 const int FRIENDPANEL_CLOSED_X = DEFAULT_SCREEN_WIDTH - SLIDER_BUTTON_OFFSET
93                                  - PANEL_PEEK_AMOUNT;
94
95 /**
96  * @brief Horizontal position of a open friend list panel
97  *
98  * @var FRIENDPANEL_OPENED_X
99  */
100 const int FRIENDPANEL_OPENED_X = DEFAULT_SCREEN_WIDTH - SLIDER_BUTTON_OFFSET - SLIDER_BAR_WIDTH
101                                  - FRIENDPANEL_WIDTH;
102
103 // User info panel settings
104 const int USERPANEL_WIDTH  = 298;                       ///< Width of the user panel
105 const int USERPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT - PANEL_TOP_PADDING
106                              - PANEL_BOTTOM_PADDING;    ///< Height of the user panel
107
108 const int USERPANEL_MARGIN_LEFT = SIDEBAR_WIDTH
109                                   + MAEMO5_SCROLLBAR_WIDTH; ///< User info panel inner margin (left)
110 const int USERPANEL_MARGIN_RIGHT = SLIDER_BUTTON_OFFSET;    ///< User info panel inner margin (right)
111 const int USERPANEL_MARGIN_TOP = 0;                         ///< User info panel inner margin (top)
112 const int USERPANEL_MARGIN_BOTTOM = 0;                      ///< User info panel inner margin (bottom)
113
114 /**
115  * @brief Horizontal position of a closed user info panel
116  *
117  * @var USERPANEL_CLOSED_X
118  */
119 const int USERPANEL_CLOSED_X = - USERPANEL_WIDTH + PANEL_PEEK_AMOUNT
120                                - SLIDER_BAR_WIDTH;
121 const int USERPANEL_OPENED_X = 0;                 ///< Horizontal position of a open user info panel
122
123 // Zoom button panel settings
124 const int ZOOM_BUTTON_PANEL_POSITION_X = 10 +
125                                          PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
126 const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
127 const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
128
129 const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position";
130
131 // Direction indicator button settings
132 /**
133  * @brief Horizontal position of direction indicator button
134  *
135  * @var DIRECTION_INDICATOR_POSITION_X
136  */
137 const int DIRECTION_INDICATOR_POSITION_X = 10 + PANEL_PEEK_AMOUNT;
138 const int DIRECTION_INDICATOR_POSITION_Y = 290; ///< Vertical position of direction indicator button
139
140 const QString DIRECTION_INDICATOR_BUTTON_POSITION = "Direction_Indicator_Position";
141
142 #endif // PANELCOMMON_H