some fixes to the cmake files. It still is not working
[kdeedu-porting.git] / kalzium / libavogadro-kalzium / src / global.h
blob35c93ac90c6711b41a0873375876f316c31ed226
1 /**********************************************************************
2 global.h - Setup some default defines.
4 Copyright (C) 2007 by Donald Ephraim Curtis
6 This file is part of the Avogadro molecular editor project.
7 For more information, see <http://avogadro.sourceforge.net/>
9 Avogadro is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 Avogadro is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 02110-1301, USA.
23 **********************************************************************/
25 #ifndef __GLOBAL_H
26 #define __GLOBAL_H
28 #include <QTranslator>
30 #ifdef WIN32
31 # ifndef NOMINMAX
32 # define NOMINMAX 1
33 # endif
34 #endif
36 #ifdef WIN32
37 # define A_DECL_IMPORT __declspec(dllimport)
38 # define A_DECL_EXPORT __declspec(dllexport)
39 #else
40 # define A_DECL_IMPORT
41 # define A_DECL_EXPORT
42 #endif
44 #ifndef A_EXPORT
45 # ifdef avogadro_lib_EXPORTS
46 # define A_EXPORT A_DECL_EXPORT
47 # else
48 # define A_EXPORT A_DECL_IMPORT
49 # endif
50 #else
51 # define A_EXPORT
52 #endif
54 #ifndef GL_RESCALE_NORMAL
55 # define GL_RESCALE_NORMAL 0x803A
56 #endif
58 #ifndef GL_COLOR_SUM_EXT
59 # define GL_COLOR_SUM_EXT 0x8458
60 #endif
62 #ifndef GL_LIGHT_MODEL_COLOR_CONTROL_EXT
63 # define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
64 #endif
66 #ifndef GL_SEPARATE_SPECULAR_COLOR_EXT
67 # define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
68 #endif
70 #ifndef GL_TEXTURE_RECTANGLE_ARB
71 # define GL_TEXTURE_RECTANGLE_ARB 0x84F5
72 #endif
74 const double ROTATION_SPEED = 0.005;
75 const double ZOOM_SPEED = 0.02;
76 const double MOUSE_WHEEL_SPEED = 0.1;
77 const double CAMERA_MOL_RADIUS_MARGIN = 10.0;
78 const double CAMERA_NEAR_DISTANCE = 2.0;
79 const int SEL_BUF_MAX_SIZE = 262144;
80 const int SEL_BUF_MARGIN = 128;
81 const int SEL_BOX_HALF_SIZE = 4;
82 const int SEL_BOX_SIZE = 2 * SEL_BOX_HALF_SIZE + 1;
83 const double SEL_ATOM_EXTRA_RADIUS = 0.18;
84 const double SEL_BOND_EXTRA_RADIUS = 0.07;
86 namespace Avogadro
88 class A_EXPORT Library
90 public:
91 static QTranslator *createTranslator();
92 static QString version();
93 static QString svnRevision();
94 static QString prefix();
98 #endif // __GLOBAL_H