QCodeEdit  2.2
qce-config.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
4 **
5 ** This file is part of the Edyuk project <http://edyuk.org>
6 **
7 ** This file may be used under the terms of the GNU General Public License
8 ** version 3 as published by the Free Software Foundation and appearing in the
9 ** file GPL.txt included in the packaging of this file.
10 **
11 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 **
14 ****************************************************************************/
15 
16 #ifndef _QCE_CONFIG_H_
17 #define _QCE_CONFIG_H_
18 
24 #include <qglobal.h>
25 
30 #ifdef QCE_EXPORT
31  // QCE_EXPORT manually defined, trust the user
32 #else
33  #ifdef _QCODE_EDIT_BUILD_
34  #ifdef _QCODE_EDIT_EMBED_
35  #define QCE_EXPORT
36  #else
37  #define QCE_EXPORT Q_DECL_EXPORT
38  #endif
39  #else
40  #define QCE_EXPORT Q_DECL_IMPORT
41  #endif
42 #endif
43 
44 class QString;
45 class QStringList;
46 
47 namespace QCE
48 {
49  QString fetchDataFile(const QString& file);
50 
51  QStringList dataPathes();
52  void addDataPath(const QString& path);
53 
54  template <typename Registerable>
55  class Registar
56  {
57  public:
58  Registar()
59  {
60  Registerable::_register();
61  }
62  };
63 }
64 
65 #define QCE_AUTO_REGISTER(T) \
66  static QCE::Registar<T> _auto_##T##_registar; \
67 
68 
69 
70 #endif // !_QCE_CONFIG_H_
Definition: qce-config.h:55