1 /*
2     MIDI Virtual Piano Keyboard
3     Copyright (C) 2008-2021, Pedro Lopez-Cabanillas <plcl@users.sf.net>
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 3 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 along
16     with this program; If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef CONSTANTS_H_
20 #define CONSTANTS_H_
21 
22 #include <QApplication>
23 #include <QString>
24 
25 /* Don't translate any string defined in this header */
26 
27 const QString PGM_VERSION(QT_STRINGIFY(VERSION));
28 
29 const QString BLD_DATE(__DATE__);
30 const QString BLD_TIME(__TIME__);
31 #if defined(Q_CC_CLANG)
32 const QString CMP_VERSION("CLANG/LLVM " __VERSION__);
33 #elif defined(Q_CC_GNU) || defined(Q_CC_GCCE)
34 const QString CMP_VERSION("GNU C++ " __VERSION__);
35 #elif defined(Q_CC_MSVC)
36 const QString CMP_VERSION("MSVC " + QString::number(_MSC_VER/100.0f,'f',2));
37 #else
38 const QString CMP_VERSION(QString());
39 #endif
40 
41 const QString QSTR_APPNAME("VMPK");
42 const QString QSTR_DOMAIN("vmpk.sourceforge.net");
43 const QString QSTR_VMPKPX("vmpk_");
44 const QString QSTR_QTPX("qt_");
45 const QString QSTR_DRUMSTICKPX("drumstick-widgets_");
46 
47 const QString QSTR_WINDOW("Window");
48 const QString QSTR_GEOMETRY("Geometry");
49 const QString QSTR_STATE("State");
50 const QString QSTR_PREFERENCES("Preferences");
51 const QString QSTR_CHANNEL("Channel");
52 const QString QSTR_VELOCITY("Velocity");
53 const QString QSTR_BASEOCTAVE("BaseOctave");
54 const QString QSTR_TRANSPOSE("Transpose");
55 const QString QSTR_NUMKEYS("NumKeys");
56 const QString QSTR_STARTINGKEY("StartingKey");
57 const QString QSTR_INSTRUMENTSDEFINITION("InstrumentsDefinition");
58 const QString QSTR_INSTRUMENTNAME("InstrumentName");
59 const QString QSTR_CONNECTIONS("Connections");
60 const QString QSTR_INENABLED("InEnabled");
61 const QString QSTR_THRUENABLED("ThruEnabled");
62 const QString QSTR_OMNIENABLED("OmniEnabled");
63 const QString QSTR_ADVANCEDENABLED("AdvancedEnabled");
64 const QString QSTR_INDRIVER("InputDriver");
65 const QString QSTR_OUTDRIVER("OutputDriver");
66 const QString QSTR_INPORT("InPort");
67 const QString QSTR_OUTPORT("OutPort");
68 const QString QSTR_KEYBOARD("Keyboard");
69 const QString QSTR_MAPFILE("MapFile");
70 const QString QSTR_RAWMAPFILE("RawMapFile");
71 const QString QSTR_DEFAULT("default");
72 const QString QSTR_CONTROLLERS("Controllers");
73 const QString QSTR_INSTRUMENT("Instrument");
74 const QString QSTR_BANK("Bank");
75 const QString QSTR_PROGRAM("Program");
76 const QString QSTR_CONTROLLER("Controller");
77 const QString QSTR_GRABKB("GrabKeyboard");
78 const QString QSTR_STYLEDKNOBS("StyledKnobs");
79 const QString QSTR_ALWAYSONTOP("AlwaysOnTop");
80 const QString QSTR_SHOWSTATUSBAR("ShowStatusBar");
81 const QString QSTR_RAWKEYBOARDMODE("RawKeyboardMode");
82 const QString QSTR_EXTRACONTROLLERS("ExtraControllers");
83 const QString QSTR_EXTRACTLPREFIX("ExtraCtl_");
84 const QString QSTR_VMPK("VMPK");
85 const QString QSTR_VMPKINPUT("VMPK Input");
86 const QString QSTR_VMPKOUTPUT("VMPK Output");
87 const QString QSTR_DEFAULTINS("gmgsxg.ins");
88 const QString QSTR_DRUMSCHANNEL("DrumsChannel");
89 const QString QSTR_SHORTCUTS("Shortcuts");
90 const QString QSTR_LANGUAGE("Language");
91 const QString QSTR_VELOCITYCOLOR("VelocityColor");
92 const QString QSTR_NETWORKPORT("NetworkPort");
93 const QString QSTR_NETWORKIFACE("NetworkInterface");
94 const QString QSTR_ENFORCECHANSTATE("EnforceChannelState");
95 const QString QSTR_ENABLEKEYBOARDINPUT("EnableKeyboardInput");
96 const QString QSTR_ENABLEMOUSEINPUT("EnableMouseInput");
97 const QString QSTR_ENABLETOUCHINPUT("EnableTouchInput");
98 
99 const QString QSTR_MULTICAST_ADDRESS("225.0.0.37");
100 const QString QSTR_PALETTEPREFIX("Palette_");
101 const QString QSTR_CURRENTPALETTE("CurrentPalette");
102 const QString QSTR_SHOWCOLORSCALE("ShowColorScale");
103 const QString QSTR_CHKBOXSTYLE("QCheckBox::indicator {width: 20px; height: 20px; background: none;} QCheckBox::indicator:checked {image: url(:/vpiano/led_green.png);} QCheckBox::indicator:unchecked{image: url(:/vpiano/led_grey.png);}");
104 const QString QSTR_DEFAULTFONT("Helvetica, 50");
105 const QString QSTR_WINSNAP("StickyWindowSnapping");
106 const QString QSTR_DARKMODE("ForcedDarkMode");
107 const QString QSTR_STYLE("QtStyle");
108 
109 #if defined(Q_OS_WINDOWS)
110 const QString DEFAULTSTYLE("fusion");
111 #else
112 const QString DEFAULTSTYLE;
113 #endif
114 
115 #if defined(SMALL_SCREEN)
116 const QString QSTR_VMPKURL("http://vmpk.sourceforge.net/m/");
117 const QString QSTR_HELP("hm.html");
118 const QString QSTR_HELPL("hm_%1.html");
119 #else
120 const QString QSTR_VMPKURL("http://vmpk.sourceforge.net");
121 const QString QSTR_HELP("help.html");
122 const QString QSTR_HELPL("help_%1.html");
123 #endif
124 
125 const char MIDICTLNUMBER[] = "MIDICTLNUMBER\0";
126 const char MIDICTLONVALUE[] = "MIDICTLONVAL\0";
127 const char MIDICTLOFFVALUE[] = "MIDICTLOFFVAL\0";
128 const char SYSEXFILENAME[] = "SYSEXFILENAME\0";
129 const char SYSEXFILEDATA[] = "SYSEXFILEDATA\0";
130 
131 const int MIDIGMDRUMSCHANNEL = 9;
132 const int MIDICHANNELS = 16;
133 const int MIDIVELOCITY = 100;
134 const int MIDIPAN = 64;
135 const int MIDIVOLUME = 100;
136 const int MIDIMAXVALUE = 127;
137 const int DEFAULTBASEOCTAVE = 3;
138 
139 #if defined(SMALL_SCREEN)
140 const int DEFAULTNUMBEROFKEYS = 25;
141 const int TOOLBARLABELMARGIN = 2;
142 const int KEYLABELFONTSIZE = 3;
143 #else
144 const int TOOLBARLABELMARGIN = 5;
145 #endif
146 const int NETWORKPORTNUMBER = 21928;
147 
148 const int RESTART_VMPK = 42;
149 
150 #endif /*CONSTANTS_H_*/
151