OSDN Git Service

7dad133d059c7f431d1d7d8eb390c6dd10e20110
[lamexp/LameXP.git] / src / Global.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version, but always including the *additional*
9 // restrictions defined in the "License.txt" file.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 //
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #pragma once
24
25 #define _CRT_RAND_S
26 #include <cstdlib>
27
28 //Forward declarations
29 class QString;
30 class QStringList;
31 class QDate;
32 class QTime;
33 class QIcon;
34 class QWidget;
35 class QProcess;
36 class QColor;
37 class LockedFile;
38 enum QtMsgType;
39
40 //Variables
41 extern const char* LAMEXP_DEFAULT_LANGID;
42 extern const char* LAMEXP_DEFAULT_TRANSLATION;
43
44 ///////////////////////////////////////////////////////////////////////////////
45 // GLOBAL FUNCTIONS
46 ///////////////////////////////////////////////////////////////////////////////
47
48 const QIcon &lamexp_app_icon(void);
49 QStringList lamexp_available_codepages(bool noAliases = true);
50 bool lamexp_check_tool(const QString &toolName);
51 void lamexp_finalization(void);
52 bool lamexp_install_translator(const QString &language);
53 bool lamexp_install_translator_from_file(const QString &qmFile);
54 const QString lamexp_lookup_tool(const QString &toolName);
55 const char *lamexp_mulders_url(void);
56 bool lamexp_portable_mode(void);
57 QStringList lamexp_query_translations(void);
58 void lamexp_register_tool(const QString &toolName, LockedFile *file, unsigned int version = 0, const QString *tag = NULL);
59 const char *lamexp_support_url(void);
60 unsigned int lamexp_tool_version(const QString &toolName, QString *tag = NULL);
61 unsigned int lamexp_toolver_coreaudio(void);
62 unsigned int lamexp_toolver_fhgaacenc(void);
63 unsigned int lamexp_toolver_neroaac(void);
64 unsigned int lamexp_toolver_qaacenc(void);
65 const char *lamexp_tracker_url(void);
66 unsigned int lamexp_translation_country(const QString &langId);
67 bool lamexp_translation_init(void);
68 QString lamexp_translation_name(const QString &language);
69 bool lamexp_translation_register(const QString &langId, const QString &qmFile, const QString &langName, unsigned int &systemId, unsigned int &country);
70 unsigned int lamexp_translation_sysid(const QString &langId);
71 const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString *tag = NULL);
72 unsigned int lamexp_version_build(void);
73 unsigned int lamexp_version_confg(void);
74 bool lamexp_version_demo(void);
75 QDate lamexp_version_expires(void);
76 unsigned int lamexp_version_major(void);
77 unsigned int lamexp_version_minor(void);
78 const char *lamexp_version_release(void);
79 const char *lamexp_website_url(void);
80
81 ///////////////////////////////////////////////////////////////////////////////
82 // HELPER MACROS
83 ///////////////////////////////////////////////////////////////////////////////
84
85 #define NOBR(STR) (QString("<nobr>%1</nobr>").arg((STR)).replace("-", "&minus;"))