JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
jkqtmathtext_imexport.h
1#ifndef JKQTMATHTEXT_IMPORT_H
2#define JKQTMATHTEXT_IMPORT_H
3
4
5/*
6 Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
7
8 last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $)
9
10 This software is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License (LGPL) as published by
12 the Free Software Foundation, either version 2.1 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License (LGPL) for more details.
19
20 You should have received a copy of the GNU Lesser General Public License (LGPL)
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
22*/
23
24
25
26
27/*! \def JKQTMATHTEXT_LIB_EXPORT
28 \ingroup jkqtmathtext_libfacilities
29
30 This define allows to export functions and classes from the jkqtcommon-library when building a dynamic/shared library.
31 Usage is as follows:
32 \code
33 #include "jkqtmathtext/jkqtmathtext_imexport.h"
34
35 class JKQTMATHTEXT_LIB_EXPORT exportedClassName {
36 ...
37 };
38
39 JKQTMATHTEXT_LIB_EXPORT void exportedFunctionName();
40 \endcode
41
42 These macros append the appropriate \c Q_DECL_EXPORT and \c Q_DECL_IMPORT
43 to the function/class body and thus tell windows compilers to export these sysmbols from
44 the shared library, or import them from a shared library.
45
46 Note that these attributes are only necessary on windows systems!
47
48 These macros are controlled by two other macros:
49 - \c JKQTMATHTEXT_LIB_IN_DLL declares that the application should link against a shared version of
50 JKQTMathText, i.e. \c JKQTMathTextSharedLib_XYZ .
51 This needs to be defined while compiling the library and while compiling
52 any application linking against \c JKQTMathTextSharedLib_XYZ.
53 - \c JKQTMATHTEXT_LIB_EXPORT_LIBRARY is only defined while compiling JKQTMathText into \c JKQTMathTextSharedLib_XYZ
54 and ensures thet the symbols are exported. If it is not defined (e.g. while
55 compiling an application), the symbols are imported
56 .
57
58 */
59
60// necessary to add this define to the Doxygen autodoc!!!
61#ifdef DOXYGEN
62# define JKQTMATHTEXT_LIB_IN_DLL
63#endif
64/*! \def JKQTMATHTEXT_LIB_IN_DLL
65 \ingroup jkqtmathtext_libfacilities
66 \brief declares that the application should link against a shared version of
67 JKQTMathText, i.e. \c JKQTMathTextSharedLib_XYZ .
68 This needs to be defined while compiling the library and while compiling
69 any application linking against \c JKQTMathTextSharedLib_XYZ.
70*/
71
72// necessary to add this define to the Doxygen autodoc!!!
73#ifdef DOXYGEN
74# define JKQTMATHTEXT_LIB_EXPORT_LIBRARY
75#endif
76/*! \def JKQTMATHTEXT_LIB_EXPORT_LIBRARY
77 \ingroup jkqtmathtext_libfacilities
78 \brief is only defined while compiling JKQTMathText into \c JKQTMathTextSharedLib_XYZ
79 and ensures thet the symbols are exported. If it is not defined (e.g. while
80 compiling an application), the symbols are imported
81*/
82
83#include <QtCore/QtGlobal>
84
85# ifndef __WINDOWS__
86# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)
87# define __WINDOWS__
88# endif
89# endif
90
91#ifdef __WINDOWS__
92# ifdef JKQTMATHTEXT_LIB_IN_DLL
93# ifndef JKQTMATHTEXT_LIB_EXPORT
94# ifdef JKQTMATHTEXT_LIB_EXPORT_LIBRARY
95 /* We are building this library */
96# define JKQTMATHTEXT_LIB_EXPORT Q_DECL_EXPORT
97# else
98 /* We are using this library */
99# define JKQTMATHTEXT_LIB_EXPORT Q_DECL_IMPORT
100# endif
101# endif
102# else
103# ifndef JKQTMATHTEXT_LIB_EXPORT
104# define JKQTMATHTEXT_LIB_EXPORT
105# endif
106# endif
107#else
108# define JKQTMATHTEXT_LIB_EXPORT
109#endif
110
111
112
113
114
115
116
117#endif // JKQTMATHTEXT_IMPORT_H
118