Initial commit
[tietoopcom] / include / uidefs.h
1 /** \file uidefs.h
2  * \brief Declarations of global typedefs and enumerators for UI.
3  * 
4  * Tieto Open Communicator - Client for the Telepathy communications framework.
5  * Copyright (c) 2010, Tieto Corporation
6  *
7  * All rights reserved.
8  * Redistribution and use in source and binary forms, with or without modification,
9  * are permitted provided that the following conditions are met:
10  *
11  *      Redistributions of source code must retain the above copyright notice,
12  *      this list of conditions and the following disclaimer.
13  *      Redistributions in binary form must reproduce the above copyright notice,
14  *      this list of conditions and the following disclaimer in the documentation
15  *      and/or other materials provided with the distribution.
16  *      Neither the name of the Tieto Corporation nor the names of its contributors 
17  *      may be used to endorse or promote products derived from this software without
18  *      specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23  * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  * 
30  */
31
32 #ifndef UIDEFS_H
33 #define UIDEFS_H
34
35 #define STYLESHEET_ONLINE       "QFrame { background-color: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0,"\
36 "stop: 0 #00aa00, stop: 0.55 #00aa00,"\
37 "stop: 0.56 #00bb00, stop: 1 #00ff00);}"
38
39 #define STYLESHEET_AWAY         "QFrame { background-color: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0,"\
40 "stop: 0 #999900, stop: 0.55 #aaaa00,"\
41 "stop: 0.56 #bbbb00, stop: 1 #ffff00);}"
42
43 #define STYLESHEET_BUSY         "QFrame { background-color: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0,"\
44 "stop: 0 #990000, stop: 0.55 #aa0000,"\
45 "stop: 0.56 #bb0000, stop: 1 #ff0000);}"
46
47 #define STYLESHEET_OFFLINE      "QFrame { background-color: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0,"\
48 "stop: 0 #999, stop: 0.55 #aaa,"\
49 "stop: 0.56 #bbb, stop: 1 #fff);}"
50
51 #define LOGO_BLUE               qRgb(  0, 128, 197)
52 #define LOGO_LIGHT_BLUE         qRgb(118, 206, 234)
53 #define LOGO_GREEN              qRgb(153, 204,  51)
54 #define LOGO_ORANGE             qRgb(255, 153,  51)
55 #define LOGO_RED                qRgb(230,  40,  88)
56
57 enum ViewType {
58         Login,
59         Contacts,
60         Chat,
61         UserInfo,
62         Settings,
63         General,
64         Account,
65         AccountCreate,
66         AccountIntermediate,
67         FTU,
68         Themes
69 };
70
71 Q_DECLARE_METATYPE(ViewType);
72
73 enum TecUserRole {
74         DisplayRole,
75         DecorationRole,                         ///An icon merged with status frame
76         ContactRole = Qt::UserRole
77 };
78
79 #ifdef QT_NO_DEBUG
80   #define emotsPath     QString("/usr/share/tietoopcom/emoticons/")
81 #else
82   #define emotsPath     QString("./data/emoticons/")
83 #endif //QT_NO_DEBUG
84
85 #define emotSmile_32x32         emotsPath + "face-smile32x32.png"
86 #define emotSad_32x32           emotsPath + "face-sad32x32.png"
87 #define emotWink_32x32          emotsPath + "face-wink32x32.png"
88 #define emotGrin_32x32          emotsPath + "face-grin32x32.png"
89 #define emotSurprise_32x32      emotsPath + "face-surprise32x32.png"
90 #define emotPlain_32x32         emotsPath + "face-plain32x32.png"
91 #define emotKiss_32x32          emotsPath + "face-kiss32x32.png"
92 #define emotAngel_32x32         emotsPath + "face-angel32x32.png"
93 #define emotDevil_32x32         emotsPath + "face-devilish32x32.png"
94 #define emotMonkey_32x32        emotsPath + "face-monkey32x32.png"
95 #define emotCrying_32x32        emotsPath + "face-crying32x32.png"
96 #define emotGlasses_32x32       emotsPath + "face-glasses32x32.png"
97 #define emotSmileBig_32x32      emotsPath + "face-smile-big32x32.png"
98
99 #define emotSmile_24x24         emotsPath + "face-smile24x24.png"
100 #define emotSad_24x24           emotsPath + "face-sad24x24.png"
101 #define emotWink_24x24          emotsPath + "face-wink24x24.png"
102 #define emotGrin_24x24          emotsPath + "face-grin24x24.png"
103 #define emotSurprise_24x24      emotsPath + "face-surprise24x24.png"
104 #define emotPlain_24x24         emotsPath + "face-plain24x24.png"
105 #define emotKiss_24x24          emotsPath + "face-kiss24x24.png"
106 #define emotAngel_24x24         emotsPath + "face-angel24x24.png"
107 #define emotDevil_24x24         emotsPath + "face-devilish24x24.png"
108 #define emotMonkey_24x24        emotsPath + "face-monkey24x24.png"
109 #define emotCrying_24x24        emotsPath + "face-crying24x24.png"
110 #define emotGlasses_24x24       emotsPath + "face-glasses24x24.png"
111 #define emotSmileBig_24x24      emotsPath + "face-smile-big24x24.png"
112
113 #endif // UIDEFS_H