blob: 9e0bec82242302e62fe5cebf0258fc485da5cc1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "qml/qmlconfigproxy.h"
#include "preferences/colorpalettesettings.h"
namespace {
QVariantList paletteToQColorList(const ColorPalette& palette) {
QVariantList colors;
for (mixxx::RgbColor rgbColor : palette) {
colors.append(mixxx::RgbColor::toQVariantColor(rgbColor));
}
return colors;
}
} // namespace
namespace mixxx {
namespace skin {
namespace qml {
QmlConfigProxy::QmlConfigProxy(
UserSettingsPointer pConfig, QObject* parent)
: QObject(parent), m_pConfig(pConfig) {
}
QVariantList QmlConfigProxy::getHotcueColorPalette() {
ColorPaletteSettings colorPaletteSettings(m_pConfig);
return paletteToQColorList(colorPaletteSettings.getHotcueColorPalette());
}
QVariantList QmlConfigProxy::getTrackColorPalette() {
ColorPaletteSettings colorPaletteSettings(m_pConfig);
return paletteToQColorList(colorPaletteSettings.getTrackColorPalette());
}
} // namespace qml
} // namespace skin
} // namespace mixxx
|