diff --git a/MainWindow.cpp b/MainWindow.cpp index 92b76d1..ca178b0 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -1776,6 +1776,31 @@ int MainWindow::getItemRowFromId(const QListWidget& list, uid id) return (-1); } +void MainWindow::setCurrentPaint(int uid) +{ + currentPaintId = uid; + if (uid != NULL_UID) + paintPropertyPanel->setCurrentWidget(paintGuis[uid]->getPropertiesEditor()); + _hasCurrentPaint = true; +} + +void MainWindow::setCurrentMapping(int uid) +{ + currentMappingId = uid; + if (uid != NULL_UID) + mappingPropertyPanel->setCurrentWidget(mappers[uid]->getPropertiesEditor()); + _hasCurrentMapping = true; +} + +void MainWindow::removeCurrentPaint() { + _hasCurrentPaint = false; + currentPaintId = NULL_UID; +} + +void MainWindow::removeCurrentMapping() { + _hasCurrentMapping = false; + currentMappingId = NULL_UID; +} void MainWindow::startOscReceiver() { diff --git a/MainWindow.h b/MainWindow.h index be8804c..3be33d3 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -307,26 +307,10 @@ public: uid getCurrentMappingId() const { return currentMappingId; } bool hasCurrentPaint() const { return _hasCurrentPaint; } bool hasCurrentMapping() const { return _hasCurrentMapping; } - void setCurrentPaint(int uid) - { - currentPaintId = uid; - _hasCurrentPaint = true; - } - void setCurrentMapping(int uid) - { - currentMappingId = uid; - if (uid != NULL_UID) - mappingPropertyPanel->setCurrentWidget(mappers[uid]->getPropertiesEditor()); - _hasCurrentMapping = true; - } - void removeCurrentPaint() { - _hasCurrentPaint = false; - currentPaintId = NULL_UID; - } - void removeCurrentMapping() { - _hasCurrentMapping = false; - currentMappingId = NULL_UID; - } + void setCurrentPaint(int uid); + void setCurrentMapping(int uid); + void removeCurrentPaint(); + void removeCurrentMapping(); public: // Constants. ///////////////////////////////////////////////////////////////////////////////////////