~mixxxdevelopers/mixxx/engine-control-refactor

« back to all changes in this revision

Viewing changes to mixxx/src/controllers/defs_controllers.h

  • Committer: RJ Ryan
  • Date: 2013-06-04 00:41:29 UTC
  • mfrom: (2890.22.101 mixxx)
  • Revision ID: rryan@mixxx.org-20130604004129-8jjxkicsb3givu4a
MergingĀ fromĀ lp:mixxx.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    email                : spappalardo@mixxx.org
6
6
 ***************************************************************************/
7
7
 
8
 
#define USER_PRESETS_PATH QDir::homePath().append("/").append(SETTINGS_PATH).append("controllers/")
9
 
#define OLD_USER_PRESETS_PATH QDir::homePath().append("/").append(SETTINGS_PATH).append("midi/")
10
 
#define LOCAL_PRESETS_PATH QDir::homePath().append("/").append(SETTINGS_PATH).append("presets/")
 
8
#include <QDir>
 
9
#include "configobject.h"
 
10
 
 
11
inline QString resourcePresetsPath(ConfigObject<ConfigValue>* pConfig) {
 
12
    QString presetsPath = pConfig->getResourcePath();
 
13
    QDir dir(presetsPath.append("/controllers/"));
 
14
    return dir.absolutePath().append("/");
 
15
}
 
16
 
 
17
// Prior to Mixxx 1.11.0 presets were stored in ${SETTINGS_PATH}/midi.
 
18
inline QString legacyUserPresetsPath(ConfigObject<ConfigValue>* pConfig) {
 
19
    QString presetsPath = pConfig->getSettingsPath();
 
20
    QDir dir(presetsPath.append("/midi/"));
 
21
    return dir.absolutePath().append("/");
 
22
}
 
23
 
 
24
inline QString userPresetsPath(ConfigObject<ConfigValue>* pConfig) {
 
25
    QString presetsPath = pConfig->getSettingsPath();
 
26
    QDir dir(presetsPath.append("/controllers/"));
 
27
    return dir.absolutePath().append("/");
 
28
}
 
29
 
 
30
inline QString localPresetsPath(ConfigObject<ConfigValue>* pConfig) {
 
31
    QString presetsPath = pConfig->getSettingsPath();
 
32
    QDir dir(presetsPath.append("/presets/"));
 
33
    return dir.absolutePath().append("/");
 
34
}
 
35
 
11
36
#define HID_PRESET_EXTENSION ".hid.xml"
12
37
#define MIDI_PRESET_EXTENSION ".midi.xml"
13
38
#define BULK_PRESET_EXTENSION ".bulk.xml"