Qmmp
qmmp.h
1 /***************************************************************************
2  * Copyright (C) 2008-2018 by Ilya Kotov *
3  * forkotov02@ya.ru *
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. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef QMMP_H
21 #define QMMP_H
22 
23 #include <QString>
24 
25 #define QMMP_VERSION_MAJOR 1
26 #define QMMP_VERSION_MINOR 2
27 #define QMMP_VERSION_PATCH 6
28 #define QMMP_VERSION_STABLE 1
29 
30 #define QMMP_VERSION_INT (QMMP_VERSION_MAJOR<<16 | QMMP_VERSION_MINOR<<8 | QMMP_VERSION_PATCH)
31 
35 #ifdef Q_OS_WIN
36 #define QStringToFileName(s) TagLib::FileName(reinterpret_cast<const wchar_t *>(s.utf16()))
37 #else
38 #define QStringToFileName(s) s.toLocal8Bit().constData()
39 #endif
40 
41 
45 class Qmmp
46 {
47 public:
51  enum State
52  {
53  Playing = 0,
59  };
63  enum MetaData
64  {
65  UNKNOWN = -1,
66  TITLE = 0,
73  YEAR,
76  URL
77  };
82  {
87  };
92  {
93  PCM_UNKNOWM = -1,
94  PCM_S8 = 0,
109  };
110 
115  {
116  CHAN_NULL = 0x00,
119  CHAN_REAR_LEFT = 0x04,
123  CHAN_SIDE_LEFT = 0x40,
125  CHAN_LFE = 0x100,
126  };
127 
131  static const QString configFile();
135  static const QString configDir();
139  static void setConfigDir(const QString &path);
143  static const QString strVersion();
147  static const QString pluginsPath();
151  static QString systemLanguageID();
155  static QString uiLanguageID();
160  static void setUiLanguageID(const QString &code);
161 #ifdef Q_OS_WIN
162 
165  static bool isPortable();
166 #endif
167 
168 private:
169  static QString m_configDir;
170  static QString m_langID;
171 #ifdef Q_OS_WIN
172  static QString m_appDir;
173 #endif
174 
175 };
176 
177 #endif
Definition: qmmp.h:67
Definition: qmmp.h:121
Definition: qmmp.h:70
static QString uiLanguageID()
Definition: qmmp.h:104
Definition: qmmp.h:117
Definition: qmmp.h:57
Definition: qmmp.h:72
Definition: qmmp.h:96
Definition: qmmp.h:83
Definition: qmmp.h:94
Definition: qmmp.h:99
Definition: qmmp.h:107
State
Definition: qmmp.h:51
ChannelPosition
Definition: qmmp.h:114
static void setUiLanguageID(const QString &code)
Definition: qmmp.h:122
Definition: qmmp.h:58
Definition: qmmp.h:93
Definition: qmmp.h:95
Definition: qmmp.h:68
Definition: qmmp.h:56
Definition: qmmp.h:75
Definition: qmmp.h:71
static const QString pluginsPath()
Definition: qmmp.h:120
Definition: qmmp.h:55
Definition: qmmp.h:119
Definition: qmmp.h:54
Definition: qmmp.h:66
Definition: qmmp.h:101
Definition: qmmp.h:106
Definition: qmmp.h:105
Definition: qmmp.h:74
MetaData
Definition: qmmp.h:63
Definition: qmmp.h:103
Definition: qmmp.h:84
Definition: qmmp.h:73
Definition: qmmp.h:100
ReplayGainKey
Definition: qmmp.h:81
Definition: qmmp.h:97
Definition: qmmp.h:125
Definition: qmmp.h:123
Definition: qmmp.h:76
static const QString configDir()
Definition: qmmp.h:108
Definition: qmmp.h:98
static const QString strVersion()
Definition: qmmp.h:86
Definition: qmmp.h:116
AudioFormat
Definition: qmmp.h:91
static const QString configFile()
static QString systemLanguageID()
Definition: qmmp.h:118
Definition: qmmp.h:102
Definition: qmmp.h:124
Definition: qmmp.h:69
Definition: qmmp.h:53
static void setConfigDir(const QString &path)
The Qmmp class stores global settings and enums.
Definition: qmmp.h:45
Definition: qmmp.h:85