@@ -53,6 +53,8 @@ | |||
<file>bitmaps/button_gui.png</file> | |||
<file>bitmaps/button_gui_down.png</file> | |||
<file>bitmaps/button_gui_hover.png</file> | |||
<file>bitmaps/button_off.png</file> | |||
<file>bitmaps/button_on.png</file> | |||
<file>bitmaps/dial_01.png</file> | |||
<file>bitmaps/dial_01d.png</file> | |||
<file>bitmaps/dial_02.png</file> | |||
@@ -54,19 +54,23 @@ | |||
<widget class="PixmapButton" name="b_enable"> | |||
<property name="minimumSize"> | |||
<size> | |||
<width>24</width> | |||
<height>24</height> | |||
<width>22</width> | |||
<height>22</height> | |||
</size> | |||
</property> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>24</width> | |||
<height>24</height> | |||
<width>22</width> | |||
<height>22</height> | |||
</size> | |||
</property> | |||
<property name="text"> | |||
<string/> | |||
</property> | |||
<property name="icon"> | |||
<iconset resource="../resources.qrc"> | |||
<normaloff>:/bitmaps/button_off.png</normaloff>:/bitmaps/button_off.png</iconset> | |||
</property> | |||
<property name="iconSize"> | |||
<size> | |||
<width>24</width> | |||
@@ -303,11 +303,6 @@ | |||
<string>Black</string> | |||
</property> | |||
</item> | |||
<item> | |||
<property name="text"> | |||
<string>Blue</string> | |||
</property> | |||
</item> | |||
<item> | |||
<property name="text"> | |||
<string>System</string> | |||
@@ -1348,9 +1348,6 @@ bool CarlaEngine::loadProject(const char* const filename) | |||
node = node.nextSibling(); | |||
} | |||
// prevent wrong leak detection on close | |||
getSaveStateDictFromXML(QDomNode()); | |||
return true; | |||
} | |||
@@ -722,7 +722,7 @@ const SaveState& CarlaPlugin::getSaveState() | |||
if (paramData.hints & PARAMETER_USES_SAMPLERATE) | |||
stateParameter->value /= sampleRate; | |||
saveState.parameters.push_back(stateParameter); | |||
saveState.parameters.append(stateParameter); | |||
} | |||
// ---------------------------- | |||
@@ -741,7 +741,7 @@ const SaveState& CarlaPlugin::getSaveState() | |||
stateCustomData->key = carla_strdup(cData.key); | |||
stateCustomData->value = carla_strdup(cData.value); | |||
saveState.customData.push_back(stateCustomData); | |||
saveState.customData.append(stateCustomData); | |||
} | |||
return saveState; | |||
@@ -754,7 +754,7 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
// --------------------------------------------------------------------- | |||
// Part 1 - set custom data (except binary/chunks) | |||
for (auto it = saveState.customData.begin(); it != saveState.customData.end(); ++it) | |||
for (auto it = saveState.customData.begin(); it.valid(); it.next()) | |||
{ | |||
const StateCustomData* const stateCustomData(*it); | |||
@@ -832,7 +832,7 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
ParamSymbol(const ParamSymbol&) = delete; | |||
}; | |||
QVector<ParamSymbol*> paramSymbols; | |||
NonRtList<ParamSymbol*> paramSymbols; | |||
if (type() == PLUGIN_LADSPA || type() == PLUGIN_LV2) | |||
{ | |||
@@ -853,7 +853,7 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
const float sampleRate(kData->engine->getSampleRate()); | |||
for (auto it = saveState.parameters.begin(); it != saveState.parameters.end(); ++it) | |||
for (auto it = saveState.parameters.begin(); it.valid(); it.next()) | |||
{ | |||
StateParameter* const stateParameter(*it); | |||
@@ -864,8 +864,10 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
// Try to set by symbol, otherwise use index | |||
if (stateParameter->symbol != nullptr && *stateParameter->symbol != 0) | |||
{ | |||
foreach (const ParamSymbol* paramSymbol, paramSymbols) | |||
for (auto it = paramSymbols.begin(); it.valid(); it.next()) | |||
{ | |||
ParamSymbol* const paramSymbol(*it); | |||
if (std::strcmp(stateParameter->symbol, paramSymbol->symbol) == 0) | |||
{ | |||
index = paramSymbol->index; | |||
@@ -883,8 +885,10 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
// Symbol only | |||
if (stateParameter->symbol != nullptr && *stateParameter->symbol != 0) | |||
{ | |||
foreach (const ParamSymbol* paramSymbol, paramSymbols) | |||
for (auto it = paramSymbols.begin(); it.valid(); it.next()) | |||
{ | |||
ParamSymbol* const paramSymbol(*it); | |||
if (std::strcmp(stateParameter->symbol, paramSymbol->symbol) == 0) | |||
{ | |||
index = paramSymbol->index; | |||
@@ -920,8 +924,9 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
} | |||
// clear | |||
foreach (ParamSymbol* paramSymbol, paramSymbols) | |||
for (auto it = paramSymbols.begin(); it.valid(); it.next()) | |||
{ | |||
ParamSymbol* const paramSymbol(*it); | |||
paramSymbol->free(); | |||
delete paramSymbol; | |||
} | |||
@@ -931,7 +936,7 @@ void CarlaPlugin::loadSaveState(const SaveState& saveState) | |||
// --------------------------------------------------------------------- | |||
// Part 5 - set chunk data | |||
for (auto it = saveState.customData.begin(); it != saveState.customData.end(); ++it) | |||
for (auto it = saveState.customData.begin(); it.valid(); it.next()) | |||
{ | |||
const StateCustomData* const stateCustomData(*it); | |||
@@ -1002,9 +1007,6 @@ bool CarlaPlugin::loadStateFromFile(const char* const filename) | |||
loadSaveState(getSaveStateDictFromXML(xmlNode)); | |||
// prevent wrong leak detection on close | |||
getSaveStateDictFromXML(QDomNode()); | |||
return true; | |||
} | |||
@@ -198,9 +198,7 @@ struct CarlaBackendStandalone { | |||
QString color(settings.value("Main/ProThemeColor", "Black").toString()); | |||
if (color == "Blue") | |||
style->setColorScheme(CarlaStyle::COLOR_BLUE); | |||
else if (color == "System") | |||
if (color == "System") | |||
pass(); //style->setColorScheme(CarlaStyle::COLOR_SYSTEM); | |||
else | |||
style->setColorScheme(CarlaStyle::COLOR_BLACK); | |||
@@ -253,10 +253,8 @@ class CarlaSettingsW(QDialog): | |||
themeColor = settings.value("Main/ProThemeColor", "Black", type=str) | |||
if themeColor == "Blue": | |||
if themeColor == "System": | |||
self.ui.cb_theme_color.setCurrentIndex(1) | |||
elif themeColor == "System": | |||
self.ui.cb_theme_color.setCurrentIndex(2) | |||
else: | |||
self.ui.cb_theme_color.setCurrentIndex(0) | |||
@@ -1981,7 +1981,7 @@ class PluginWidget(QFrame): | |||
#else: | |||
#self.setWidgetColor(PALETTE_COLOR_NONE) | |||
self.ui.b_enable.setPixmaps(":/bitmaps/led_red.png", ":/bitmaps/led_green.png", ":/bitmaps/led_red.png") | |||
self.ui.b_enable.setPixmaps(":/bitmaps/button_off.png", ":/bitmaps/button_on.png", ":/bitmaps/button_off.png") | |||
self.ui.b_gui.setPixmaps(":/bitmaps/button_gui.png", ":/bitmaps/button_gui_down.png", ":/bitmaps/button_gui_hover.png") | |||
self.ui.b_edit.setPixmaps(":/bitmaps/button_edit.png", ":/bitmaps/button_edit_down.png", ":/bitmaps/button_edit_hover.png") | |||
@@ -902,7 +902,7 @@ void CarlaStyle::drawPrimitive(PrimitiveElement elem, | |||
const int margin = 6; | |||
if (option->state & State_Horizontal) { | |||
const int offset = rect.width()/2; | |||
painter->setPen(QPen(option->palette.background().color().darker(110))); | |||
painter->setPen(QPen(highlightedOutline)); | |||
painter->drawLine(rect.bottomLeft().x() + offset, | |||
rect.bottomLeft().y() - margin, | |||
rect.topLeft().x() + offset, | |||
@@ -914,7 +914,7 @@ void CarlaStyle::drawPrimitive(PrimitiveElement elem, | |||
rect.topLeft().y() + margin); | |||
} else { //Draw vertical separator | |||
const int offset = rect.height()/2; | |||
painter->setPen(QPen(option->palette.background().color().darker(110))); | |||
painter->setPen(QPen(highlightedOutline)); | |||
painter->drawLine(rect.topLeft().x() + margin , | |||
rect.topLeft().y() + offset, | |||
rect.topRight().x() - margin, | |||
@@ -19,10 +19,10 @@ | |||
#define __CARLA_STATE_UTILS_HPP__ | |||
#include "CarlaBackendUtils.hpp" | |||
#include "CarlaJuceUtils.hpp" | |||
#include "CarlaMIDI.h" | |||
#include <QtCore/QVector> | |||
#include "RtList.hpp" | |||
#include <QtXml/QDomNode> | |||
CARLA_BACKEND_START_NAMESPACE | |||
@@ -53,7 +53,7 @@ struct StateParameter { | |||
delete[] symbol; | |||
} | |||
CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(StateParameter) | |||
CARLA_DECLARE_NON_COPY_STRUCT(StateParameter) | |||
}; | |||
struct StateCustomData { | |||
@@ -76,11 +76,11 @@ struct StateCustomData { | |||
delete[] value; | |||
} | |||
CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(StateCustomData) | |||
CARLA_DECLARE_NON_COPY_STRUCT(StateCustomData) | |||
}; | |||
typedef QVector<StateParameter*> StateParameterVector; | |||
typedef QVector<StateCustomData*> StateCustomDataVector; | |||
typedef NonRtList<StateParameter*> StateParameterList; | |||
typedef NonRtList<StateCustomData*> StateCustomDataList; | |||
struct SaveState { | |||
const char* type; | |||
@@ -103,8 +103,8 @@ struct SaveState { | |||
int32_t currentMidiProgram; | |||
const char* chunk; | |||
StateParameterVector parameters; | |||
StateCustomDataVector customData; | |||
StateParameterList parameters; | |||
StateCustomDataList customData; | |||
SaveState() | |||
: type(nullptr), | |||
@@ -180,13 +180,13 @@ struct SaveState { | |||
currentMidiBank = -1; | |||
currentMidiProgram = -1; | |||
for (auto it = parameters.begin(); it != parameters.end(); ++it) | |||
for (auto it = parameters.begin(); it.valid(); it.next()) | |||
{ | |||
StateParameter* const stateParameter(*it); | |||
delete stateParameter; | |||
} | |||
for (auto it = customData.begin(); it != customData.end(); ++it) | |||
for (auto it = customData.begin(); it.valid(); it.next()) | |||
{ | |||
StateCustomData* const stateCustomData(*it); | |||
delete stateCustomData; | |||
@@ -534,7 +534,7 @@ const QString& getXMLFromSaveState(const SaveState& saveState) | |||
content += data; | |||
} | |||
for (auto it = saveState.parameters.begin(); it != saveState.parameters.end(); ++it) | |||
for (auto it = saveState.parameters.begin(); it.valid(); it.next()) | |||
{ | |||
StateParameter* const stateParameter(*it); | |||
@@ -585,7 +585,7 @@ const QString& getXMLFromSaveState(const SaveState& saveState) | |||
content += midiProgram; | |||
} | |||
for (auto it = saveState.customData.begin(); it != saveState.customData.end(); ++it) | |||
for (auto it = saveState.customData.begin(); it.valid(); it.next()) | |||
{ | |||
StateCustomData* const stateCustomData(*it); | |||
@@ -49,7 +49,7 @@ protected: | |||
class Itenerator { | |||
public: | |||
Itenerator(k_list_head* queue) | |||
Itenerator(const k_list_head* queue) | |||
: kQueue(queue), | |||
fEntry(queue->next), | |||
fEntry2(fEntry->next), | |||
@@ -79,7 +79,7 @@ protected: | |||
} | |||
private: | |||
k_list_head* const kQueue; | |||
const k_list_head* const kQueue; | |||
k_list_head* fEntry; | |||
k_list_head* fEntry2; | |||
Data* fData; | |||
@@ -100,7 +100,7 @@ public: | |||
CARLA_ASSERT(fCount == 0); | |||
} | |||
Itenerator begin() | |||
Itenerator begin() const | |||
{ | |||
return Itenerator(&fQueue); | |||
} | |||