QCodeEdit 2.2
|
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr> 00004 ** 00005 ** This file is part of the Edyuk project <http://edyuk.org> 00006 ** 00007 ** This file may be used under the terms of the GNU General Public License 00008 ** version 3 as published by the Free Software Foundation and appearing in the 00009 ** file GPL.txt included in the packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ****************************************************************************/ 00015 00016 #ifndef _QCE_CONFIG_H_ 00017 #define _QCE_CONFIG_H_ 00018 00024 #include <qglobal.h> 00025 00030 #ifdef QCE_EXPORT 00031 // QCE_EXPORT manually defined, trust the user 00032 #else 00033 #ifdef _QCODE_EDIT_BUILD_ 00034 #ifdef _QCODE_EDIT_EMBED_ 00035 #define QCE_EXPORT 00036 #else 00037 #define QCE_EXPORT Q_DECL_EXPORT 00038 #endif 00039 #else 00040 #define QCE_EXPORT Q_DECL_IMPORT 00041 #endif 00042 #endif 00043 00044 class QString; 00045 class QStringList; 00046 00047 namespace QCE 00048 { 00049 QString fetchDataFile(const QString& file); 00050 00051 QStringList dataPathes(); 00052 void addDataPath(const QString& path); 00053 00054 template <typename Registerable> 00055 class Registar 00056 { 00057 public: 00058 Registar() 00059 { 00060 Registerable::_register(); 00061 } 00062 }; 00063 } 00064 00065 #define QCE_AUTO_REGISTER(T) \ 00066 static QCE::Registar<T> _auto_##T##_registar; \ 00067 00068 00069 00070 #endif // !_QCE_CONFIG_H_