backup...
[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 <QtCore>
26 #include "map/mapcommon.h"
27
28 enum Side {LEFT, RIGHT};  ///< Enumerator for panel sideness
29
30 const int DRAG_INIT_TIME = 1000;        ///< How long buttons must be pressed to start drag mode
31 const int FORCE_RELEASE_TIME = 10000;   ///< How long mouse can be grabbed
32
33 const int SIDEBAR_WIDTH = 23;           ///< Width of the sidebar
34 const int SIDEBAR_HEIGHT = 424;         ///< Height of the sidebar
35
36 const int SLIDINGBAR_WIDTH = 24;        ///< Width of the slidingbar
37 const int SLIDINGBAR_HEIGHT = 424;      ///< Height of the slidingbar
38
39 const int PANEL_PEEK_AMOUNT = 25;       ///< Amount of pixels shown when panel is closed
40
41 const int FRIENDPANEL_WIDTH  = 430;     ///< Width of the friends list panel
42 const int FRIENDPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT; ///< Height of the friends list panel
43
44 const int USERPANEL_WIDTH  = 300;       ///< Width of the user panel
45 const int USERPANEL_HEIGHT = DEFAULT_SCREEN_HEIGHT; ///< Height of the user panetl
46
47 const int MARGIN_CORRECTION = 1; ///< Amount of correction to make panels touch the window borders
48 const int MARGIN_CORRECTION2 = 2; ///< Amount of correction to make panels touch the window borders
49
50 const int PANEL_TOP_Y = 0;              ///< Y coordinate for top of both panels
51 const int TOP_CORNER_X = 0;             ///< X coordinate for top left corner
52
53 const int FRIENDPANEL_CLOSED_X =
54         DEFAULT_SCREEN_WIDTH - PANEL_PEEK_AMOUNT
55         - SLIDINGBAR_WIDTH;             ///< X location of the friend list panel when closed
56 const int FRIENDPANEL_OPENED_X =
57         DEFAULT_SCREEN_WIDTH - FRIENDPANEL_WIDTH
58         - SLIDINGBAR_WIDTH;             ///< X location of the friend list panel when opened
59
60 const int USERPANEL_CLOSED_X =
61         2 - USERPANEL_WIDTH + PANEL_PEEK_AMOUNT;  ///< X location of the user panel when closed
62 const int USERPANEL_OPENED_X = 0;       ///< X location of the user panel when opened
63
64
65 const int ZOOM_BUTTON_PANEL_POSITION_X = 10
66                                          + PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
67 const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
68 const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
69
70 const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position";
71
72 #endif // PANELCOMMON_H