diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..58fb20f30c3a4c6797e794fb8d743f33654419aa Binary files /dev/null and b/.DS_Store differ diff --git a/.vscode/settings.json b/.vscode/settings.json index 418de16bdb77a6fe9e3032f6f2dc1a65c8d6d814..2b0522bb4f21daeda5d494bc8d6901d06fe98155 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -94,7 +94,11 @@ "qstring": "cpp", "qregularexpression": "cpp", "qmessagebox": "cpp", - "regex": "cpp" + "regex": "cpp", + "qpushbutton": "cpp", + "qdialog": "cpp", + "valarray": "cpp", + "*.ipp": "cpp" }, "editor.defaultFormatter": "chiehyu.vscode-astyle", "[xml]": { diff --git a/Components/ModulesPicker/modulespicker.cpp b/Components/ModulesPicker/modulespicker.cpp index fe40242e3f01b80f70aa443a2f8302446dc75ca8..1553cf8e5dfee6f83942f6d6ee8efb22b5641680 100644 --- a/Components/ModulesPicker/modulespicker.cpp +++ b/Components/ModulesPicker/modulespicker.cpp @@ -1,135 +1,148 @@ #include "modulespicker.h" -#include "ui_modulespicker.h" -#include "Core/modulesmanager.h" -#include <QPushButton> #include <QDebug> +#include <QPushButton> + +#include "Core/modulesmanager.h" +#include "ui_modulespicker.h" -ModulesPicker::ModulesPicker() : QDialog(), ui(new Ui::ModulesPicker) { +ModulesPicker::ModulesPicker() : QDialog(), ui(new Ui::ModulesPicker) +{ ui->setupUi(this); createAndConnectUI(); - this->setAttribute(Qt::WA_DeleteOnClose, true); // WA_DeleteOnClose is set to true, so this widget will be deleted on close -} - -ModulesPicker::~ModulesPicker() { - delete ui; + this->setAttribute(Qt::WA_DeleteOnClose, + true); // WA_DeleteOnClose is set to true, so this + // widget will be deleted on close } +ModulesPicker::~ModulesPicker() { delete ui; } -void ModulesPicker::createAndConnectUI() { - connect(ui->button_createModule, &QPushButton::clicked, this, &ModulesPicker::onCreateModuleButtonClick); - - connect(ui->pushButton_horizontal, &QPushButton::clicked, this, [ = ]() { - createSplitter(Qt::Horizontal); - }); - connect(ui->pushButton_vertical, &QPushButton::clicked, this, [ = ]() { - createSplitter(Qt::Vertical); - }); +void ModulesPicker::createAndConnectUI() +{ + connect(ui->button_createModule, &QPushButton::clicked, this, + &ModulesPicker::onCreateModuleButtonClick); + connect(ui->pushButton_horizontal, &QPushButton::clicked, this, + [=]() { createSplitter(Qt::Horizontal); }); + connect(ui->pushButton_vertical, &QPushButton::clicked, this, + [=]() { createSplitter(Qt::Vertical); }); /* Important: - * The text of this buttons is set to be the name of the module to load onclick + * The text of this buttons is set to be the name of the module to load + * onclick */ - for(ModuleInfo moduleInfo : ModulesManager::getModulesInfo()) { - - - switch (moduleInfo.getModuleCategory()) { - case ModuleCategory::DEFAULT : + for (ModuleInfo moduleInfo : ModulesManager::getModulesInfo()) + { + switch (moduleInfo.getModuleCategory()) + { + case ModuleCategory::DEFAULT: ui->comboBox_modulesList->addItem(moduleInfo.getModuleName()); break; - case ModuleCategory::DATASOURCE : - ui->data_source_layout->insertWidget(0, createButton(moduleInfo.getModuleName())); + case ModuleCategory::DATASOURCE: + ui->data_source_layout->insertWidget( + 0, createButton(moduleInfo.getModuleName())); break; - case ModuleCategory::DATAVISUAL : - ui->data_visual_layout->insertWidget(0, createButton(moduleInfo.getModuleName())); + case ModuleCategory::DATAVISUAL: + ui->data_visual_layout->insertWidget( + 0, createButton(moduleInfo.getModuleName())); break; - case ModuleCategory::UTILITY : - ui->utility_layout->insertWidget(0, createButton(moduleInfo.getModuleName())); + case ModuleCategory::UTILITY: + ui->utility_layout->insertWidget( + 0, createButton(moduleInfo.getModuleName())); break; - case ModuleCategory::HOME : - ui->home_layout->insertWidget(0, createButton(moduleInfo.getModuleName())); + case ModuleCategory::HOME: + ui->home_layout->insertWidget( + 0, createButton(moduleInfo.getModuleName())); break; default: break; } } - } -void ModulesPicker::connectSlot(QPushButton* button) { - connect(button, &QPushButton::clicked, this, [this, button]() { - Module* module = ModulesManager::instantiateModuleByName(button->text()); - if(module != nullptr) { - onModuleSelected(module); - } - }); +void ModulesPicker::connectSlot(QPushButton* button) +{ + connect(button, &QPushButton::clicked, this, + [this, button]() + { + Module* module = + ModulesManager::instantiateModuleByName(button->text()); + if (module != nullptr) + { + onModuleSelected(module); + } + }); } -void ModulesPicker::onCreateModuleButtonClick() { +void ModulesPicker::onCreateModuleButtonClick() +{ QString moduleName = ui->comboBox_modulesList->currentText(); onModuleSelected(moduleName); } -void ModulesPicker::createSplitter(Qt::Orientation orientation) { +void ModulesPicker::createSplitter(Qt::Orientation orientation) +{ XmlObject params; params.addAttribute("Orientation", orientation); - Module* module = ModulesManager::instantiateModuleById(ModuleId::SPLITTER); - if(module != nullptr) { + if (module != nullptr) + { module->initialize(params); onModuleSelected(module); } } - - -QPushButton* ModulesPicker::createButton(const QString& name) { +QPushButton* ModulesPicker::createButton(const QString& name) +{ QPushButton* button = new QPushButton(name); - connect(button, &QPushButton::clicked, this, [this, button]() { - if(button != nullptr) { - onModuleSelected(button->text()); - } - }); + connect(button, &QPushButton::clicked, this, + [this, button]() + { + if (button != nullptr) + { + onModuleSelected(button->text()); + } + }); return button; } - -void ModulesPicker::onModuleSelected(const QString& mName) { +void ModulesPicker::onModuleSelected(const QString& mName) +{ Module* module = ModulesManager::instantiateModuleByName(mName); - if(module != nullptr) + if (module != nullptr) onModuleSelected(module); } -void ModulesPicker::onModuleSelected(Module* module) { +void ModulesPicker::onModuleSelected(Module* module) +{ *selectedModule = module; emit moduleSelected(module); - this->close(); // WA_DeleteOnClose is set to true, so this widget will be deleted on close + this->close(); // WA_DeleteOnClose is set to true, so this widget will be + // deleted on close } - - -Module* ModulesPicker::start() { +Module* ModulesPicker::start() +{ Module* mSelected = nullptr; - selectedModule = &mSelected; + selectedModule = &mSelected; this->exec(); - return mSelected; } -//QWidget *PanelsPickerModule::toWidget() +// QWidget *PanelsPickerModule::toWidget() //{ -// return this; -//} +// return this; +// } -//XmlObject PanelsPickerModule::toXmlObject() +// XmlObject PanelsPickerModule::toXmlObject() //{ //} -//void PanelsPickerModule::fromXmlObject(const XmlObject &xmlObject) +// void PanelsPickerModule::fromXmlObject(const XmlObject &xmlObject) //{ -// Q_UNUSED(xmlObject); -//} +// Q_UNUSED(xmlObject); +// } diff --git a/Modules/CommandPad/CommandPad.cpp b/Modules/CommandPad/CommandPad.cpp new file mode 100644 index 0000000000000000000000000000000000000000..176f70fffb979a23cd719e1f1fecbadb09ccdfe0 --- /dev/null +++ b/Modules/CommandPad/CommandPad.cpp @@ -0,0 +1,99 @@ +#include "CommandPad.h" + +#include <Modules/CommandPad/MessagesList.h> + +#include <QVBoxLayout> + +CommandPad::CommandPad(QWidget *parent) : DefaultModule(parent) +{ + setupUi(); + defaultContextMenuSetup(); +} + +CommandPad::~CommandPad() +{ + delete messagesListComboBox; + for (auto key : formElements.keys()) + delete formElements[key]; +} + +QWidget *CommandPad::toWidget() { return this; } + +XmlObject CommandPad::toXmlObject() +{ + XmlObject obj = XmlObject(getName(ModuleId::COMMANDPAD)); + + auto key = messagesListComboBox->currentText(); + if (formElements.contains(key)) + { + obj.addAttribute("message_id", key); + formElements[key]->toXmlObject(obj); + } + + return obj; +} + +void CommandPad::fromXmlObject(const XmlObject &obj) +{ + if (obj.getObjectName() == getName(ModuleId::COMMANDPAD)) + { + auto key = obj.getAttribute("message_id"); + + if (formElements.contains(key)) + { + formElements[key]->fromXmlObject(obj); + messagesListComboBox->setCurrentText(key); + } + } +} + +void CommandPad::setupUi() +{ + QVBoxLayout *outerLayout = new QVBoxLayout; + outerLayout->addStretch(); + + messagesListComboBox = new QComboBox; + messagesListComboBox->setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + messagesListComboBox->addItems(MessagesList::messagesList); + outerLayout->addWidget(messagesListComboBox); + + QGridLayout *formGridLayout = new QGridLayout; + outerLayout->addLayout(formGridLayout); + + QPushButton *sendButton = new QPushButton("Send"); + outerLayout->addWidget(sendButton); + + setLayout(outerLayout); + + MessagesList::fillMessagesMap(formElements); + + // Set default value + currentMessage = "PING_TC"; + messagesListComboBox->setCurrentText(currentMessage); + + connect(messagesListComboBox, &QComboBox::currentTextChanged, this, + [=](QString key) + { + if (formElements.contains(key)) + { + formElements[currentMessage]->removeFromGridLayout( + formGridLayout); + formElements[key]->applyToGridLayout(formGridLayout); + currentMessage = key; + } + }); + + connect(sendButton, &QPushButton::clicked, + [=]() + { + auto key = messagesListComboBox->currentText(); + if (formElements.contains(key)) + { + auto message = formElements[key]->prepareMessage(key); + qDebug() << message.getTopic().toString(); + qDebug() << message.toString(); + getCore()->getModuleMessagesBroker()->publish(message); + } + }); +} diff --git a/Modules/CommandPad/commandpad.h b/Modules/CommandPad/CommandPad.h similarity index 56% rename from Modules/CommandPad/commandpad.h rename to Modules/CommandPad/CommandPad.h index 32427b2562aab947ec5cb3a389a1afdca87e98a7..25b37d9d0c9e4fada82ea38f4bae9387afe9fdba 100644 --- a/Modules/CommandPad/commandpad.h +++ b/Modules/CommandPad/CommandPad.h @@ -1,23 +1,16 @@ #ifndef COMMANDPAD_H #define COMMANDPAD_H -#include <tuple> +#include <Modules/CommandPad/MessageFormElement.h> +#include <Modules/DefaultModule/defaultmodule.h> -#include "MessageFormElement.h" -#include "Modules/DefaultModule/defaultmodule.h" +#include <tuple> class CommandPad : public DefaultModule { Q_OBJECT public: - static const QStringList messagesList; - - static const QMap<QString, int> systemTmList; - static const QMap<QString, int> sensorsList; - static const QMap<QString, int> commandsList; - static const QMap<QString, int> servosList; - explicit CommandPad(QWidget* parent = nullptr); ~CommandPad(); @@ -27,13 +20,11 @@ public: void fromXmlObject(const XmlObject& xmlObject) override; private: - void removeWidgetsFromForm(); void setupUi(); QString currentMessage; QComboBox* messagesListComboBox; QMap<QString, MessageFormElement*> formElements; - QGridLayout* formGridLayout; }; #endif // COMMANDPAD_H diff --git a/Modules/CommandPad/MessageFormElement.cpp b/Modules/CommandPad/MessageFormElement.cpp index 2e53416dbd3a7dad7c47935188f2ab07d7d378ad..7483cd528e614596f859d5cb4c920e47c4eb21a8 100644 --- a/Modules/CommandPad/MessageFormElement.cpp +++ b/Modules/CommandPad/MessageFormElement.cpp @@ -84,122 +84,78 @@ bool MessageFormElement::addInteger(QString id, QString label, int min, int max) } } -XmlObject MessageFormElement::toXmlObject() +XmlObject MessageFormElement::toXmlObject(XmlObject& obj) { - XmlObject comboBoxList("combo_box_list"); for (auto key : comboBoxMap.keys()) { auto comboBox = comboBoxMap[key]; XmlObject comboBoxXml("combo_box"); comboBoxXml.addAttribute("id", key); - comboBoxXml.addAttribute("label", comboBox.first->text()); comboBoxXml.addAttribute("text", comboBox.second->currentText()); - comboBoxList.addChild(comboBoxXml); + obj.addChild(comboBoxXml); } - XmlObject floatList("float_list"); for (auto key : floatMap.keys()) { auto floatField = floatMap[key]; XmlObject floatFieldXml("float_field"); floatFieldXml.addAttribute("id", key); - floatFieldXml.addAttribute("label", std::get<0>(floatField)->text()); floatFieldXml.addAttribute("text", std::get<1>(floatField)->text()); floatFieldXml.addAttribute("min", std::get<2>(floatField)); floatFieldXml.addAttribute("max", std::get<3>(floatField)); floatFieldXml.addAttribute("decimals", std::get<4>(floatField)); - floatList.addChild(floatFieldXml); + obj.addChild(floatFieldXml); } - XmlObject integerList("integer_list"); for (auto key : floatMap.keys()) { auto integerField = floatMap[key]; XmlObject integerFieldXml("integer_field"); integerFieldXml.addAttribute("id", key); - integerFieldXml.addAttribute("label", - std::get<0>(integerField)->text()); integerFieldXml.addAttribute("text", std::get<1>(integerField)->text()); integerFieldXml.addAttribute("min", std::get<2>(integerField)); integerFieldXml.addAttribute("max", std::get<3>(integerField)); - integerList.addChild(integerFieldXml); + obj.addChild(integerFieldXml); } - XmlObject configuration("configuration"); - configuration.addChild(comboBoxList); - configuration.addChild(floatList); - configuration.addChild(integerList); - - return configuration; + return obj; } void MessageFormElement::fromXmlObject(const XmlObject& obj) { - int comboBoxListIndex = obj.searchChild("combo_box_list"); - if (comboBoxListIndex != -1) + for (int i = 0; i < obj.childCount(); i++) { - auto comboBoxList = obj.childAt(comboBoxListIndex); - for (int i = 0; i < comboBoxList.childCount(); i++) + auto child = obj.childAt(i); + auto key = child.getAttribute("id"); + + if (child.getObjectName() == "combo_box" && comboBoxMap.contains(key)) { - auto comboBoxXml = comboBoxList.childAt(i); - auto key = comboBoxXml.getAttribute("id"); - if (comboBoxMap.contains(key)) - { - auto comboBox = comboBoxMap[key]; - comboBox.first->setText(comboBoxXml.getAttribute("label")); - comboBox.second->setCurrentText( - comboBoxXml.getAttribute("text")); - } + auto comboBox = comboBoxMap[key]; + comboBox.second->setCurrentText(child.getAttribute("text")); } - } - - int floatListIndex = obj.searchChild("float_list"); - if (floatListIndex != -1) - { - auto floatList = obj.childAt(floatListIndex); - for (int i = 0; i < floatList.childCount(); i++) + else if (child.getObjectName() == "float_field" && + floatMap.contains(key)) { - auto floatFieldXml = floatList.childAt(i); - auto key = floatFieldXml.getAttribute("id"); - if (floatMap.contains(key)) - { - auto floatField = floatMap[key]; - std::get<0>(floatField) - ->setText(floatFieldXml.getAttribute("label")); - std::get<1>(floatField) - ->setText(floatFieldXml.getAttribute("text")); - floatFieldXml.getAttribute("min", std::get<2>(floatField)); - floatFieldXml.getAttribute("max", std::get<3>(floatField)); - floatFieldXml.getAttribute("decimals", std::get<4>(floatField)); - std::get<1>(floatField) - ->setValidator(new QDoubleValidator( - std::get<2>(floatField), std::get<3>(floatField), - std::get<4>(floatField))); - } + auto floatField = floatMap[key]; + std::get<1>(floatField)->setText(child.getAttribute("text")); + child.getAttribute("min", std::get<2>(floatField)); + child.getAttribute("max", std::get<3>(floatField)); + child.getAttribute("decimals", std::get<4>(floatField)); + std::get<1>(floatField) + ->setValidator(new QDoubleValidator(std::get<2>(floatField), + std::get<3>(floatField), + std::get<4>(floatField))); } - } - - int integerListIndex = obj.searchChild("integer_list"); - if (integerListIndex != -1) - { - auto floatList = obj.childAt(integerListIndex); - for (int i = 0; i < floatList.childCount(); i++) + else if (child.getObjectName() == "integer_field" && + integerMap.contains(key)) { - auto integerFieldXml = floatList.childAt(i); - auto key = integerFieldXml.getAttribute("id"); - if (integerMap.contains(key)) - { - auto integerField = integerMap[key]; - std::get<0>(integerField) - ->setText(integerFieldXml.getAttribute("label")); - std::get<1>(integerField) - ->setText(integerFieldXml.getAttribute("text")); - integerFieldXml.getAttribute("min", std::get<2>(integerField)); - integerFieldXml.getAttribute("max", std::get<3>(integerField)); - std::get<1>(integerField) - ->setValidator(new QIntValidator( - std::get<2>(integerField), std::get<3>(integerField))); - } + auto integerField = integerMap[key]; + std::get<1>(integerField)->setText(child.getAttribute("text")); + child.getAttribute("min", std::get<2>(integerField)); + child.getAttribute("max", std::get<3>(integerField)); + std::get<1>(integerField) + ->setValidator(new QIntValidator(std::get<2>(integerField), + std::get<3>(integerField))); } } } diff --git a/Modules/CommandPad/MessageFormElement.h b/Modules/CommandPad/MessageFormElement.h index 81946d49e7000e38e15db99bd564601a6fbd796a..cc4961481dafbbcdd959995b7296dbc62d57430c 100644 --- a/Modules/CommandPad/MessageFormElement.h +++ b/Modules/CommandPad/MessageFormElement.h @@ -44,7 +44,7 @@ public: int min = std::numeric_limits<int>::min(), int max = std::numeric_limits<int>::max()); - XmlObject toXmlObject(); + XmlObject toXmlObject(XmlObject& obj); void fromXmlObject(const XmlObject& obj); diff --git a/Modules/CommandPad/commandpad.cpp b/Modules/CommandPad/MessagesList.h similarity index 62% rename from Modules/CommandPad/commandpad.cpp rename to Modules/CommandPad/MessagesList.h index 6c352b0b9d8103d5d3757cffeb11412327b04294..f7bc731c5570b66d77081991cf806896f24d1a4b 100644 --- a/Modules/CommandPad/commandpad.cpp +++ b/Modules/CommandPad/MessagesList.h @@ -1,10 +1,15 @@ -#include "commandpad.h" +#pragma once -#include <QVBoxLayout> +#include <Modules/CommandPad/MessageFormElement.h> +#include <Modules/Mavlink/mavlinkversionheader.h> -#include "Modules/Mavlink/mavlinkversionheader.h" +#include <QMap> +#include <QString> -const QStringList CommandPad::messagesList{ +namespace MessagesList +{ + +static const QStringList messagesList{ "PING_TC", "COMMAND_TC", "SYSTEM_TM_REQUEST_TC", @@ -23,7 +28,7 @@ const QStringList CommandPad::messagesList{ "SET_ALGORITHM_TC", }; -const QMap<QString, int> CommandPad::systemTmList{ +static const QMap<QString, int> systemTmList{ {"MAV_SYS_ID", MAV_SYS_ID}, {"MAV_FSM_ID", MAV_FSM_ID}, {"MAV_PIN_OBS_ID", MAV_PIN_OBS_ID}, @@ -38,7 +43,7 @@ const QMap<QString, int> CommandPad::systemTmList{ {"MAV_SENSORS_STATE_ID", MAV_SENSORS_STATE_ID}, }; -const QMap<QString, int> CommandPad::sensorsList{ +static const QMap<QString, int> sensorsList{ {"MAV_GPS_ID", MAV_GPS_ID}, {"MAV_BMX160_ID", MAV_BMX160_ID}, {"MAV_VN100_ID", MAV_VN100_ID}, @@ -55,7 +60,7 @@ const QMap<QString, int> CommandPad::sensorsList{ {"MAV_STRAIN_GAUGE_ID", MAV_STRAIN_GAUGE_ID}, }; -const QMap<QString, int> CommandPad::commandsList{ +static const QMap<QString, int> commandsList{ {"MAV_CMD_ARM", MAV_CMD_ARM}, {"MAV_CMD_DISARM", MAV_CMD_DISARM}, {"MAV_CMD_CALIBRATE", MAV_CMD_CALIBRATE}, @@ -74,85 +79,15 @@ const QMap<QString, int> CommandPad::commandsList{ {"MAV_CMD_STOP_RECORDING", MAV_CMD_STOP_RECORDING}, }; -const QMap<QString, int> CommandPad::servosList{ +const QMap<QString, int> servosList{ {"AIRBRAKES_SERVO", AIRBRAKES_SERVO}, {"EXPULSION_SERVO", EXPULSION_SERVO}, {"PARAFOIL_SERVO1", PARAFOIL_SERVO1}, {"PARAFOIL_SERVO2", PARAFOIL_SERVO2}, }; -CommandPad::CommandPad(QWidget *parent) : DefaultModule(parent) -{ - setupUi(); - defaultContextMenuSetup(); -} - -CommandPad::~CommandPad() -{ - delete messagesListComboBox; - for (auto key : formElements.keys()) - delete formElements[key]; - delete formGridLayout; -} - -QWidget *CommandPad::toWidget() { return this; } - -XmlObject CommandPad::toXmlObject() -{ - XmlObject obj = XmlObject(getName(ModuleId::COMMANDPAD)); - - auto key = messagesListComboBox->currentText(); - if (formElements.contains(key)) - { - obj.addAttribute("message_id", key); - obj.addChild(formElements[key]->toXmlObject()); - } - - return obj; -} - -void CommandPad::fromXmlObject(const XmlObject &obj) +inline void fillMessagesMap(QMap<QString, MessageFormElement *> &formElements) { - int configurationIndex = obj.searchChild("configuration"); - if (obj.hasAttribute("message_id") && configurationIndex != -1) - { - auto key = obj.getAttribute("message_id"); - - if (formElements.contains(key)) - { - auto configuration = obj.childAt(configurationIndex); - formElements[key]->fromXmlObject(configuration); - messagesListComboBox->setCurrentText(key); - } - } -} - -void CommandPad::removeWidgetsFromForm() -{ - QLayoutItem *child; - while ((child = formGridLayout->takeAt(0)) != nullptr) - formGridLayout->removeWidget(child->widget()); -} - -void CommandPad::setupUi() -{ - QVBoxLayout *outerLayout = new QVBoxLayout; - outerLayout->addStretch(); - - messagesListComboBox = new QComboBox; - messagesListComboBox->setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); - messagesListComboBox->addItems(messagesList); - outerLayout->addWidget(messagesListComboBox); - - formGridLayout = new QGridLayout; - outerLayout->addLayout(formGridLayout); - - QPushButton *sendButton = new QPushButton("Send"); - outerLayout->addWidget(sendButton); - - setLayout(outerLayout); - MessageFormElement *element; element = new MessageFormElement(); @@ -223,31 +158,6 @@ void CommandPad::setupUi() element = new MessageFormElement(); element->addInteger("algorithm_number", "Algorithm:", 0, 999); formElements["SET_ALGORITHM_TC"] = element; - - // Set default value - currentMessage = "PING_TC"; - messagesListComboBox->setCurrentText(currentMessage); - - connect(messagesListComboBox, &QComboBox::currentTextChanged, this, - [=](QString key) - { - if (formElements.contains(key)) - { - formElements[currentMessage]->removeFromGridLayout( - formGridLayout); - formElements[key]->applyToGridLayout(formGridLayout); - currentMessage = key; - } - }); - - connect(sendButton, &QPushButton::clicked, - [=]() - { - auto key = messagesListComboBox->currentText(); - if (formElements.contains(key)) - { - auto message = formElements[key]->prepareMessage(key); - getCore()->getModuleMessagesBroker()->publish(message); - } - }); } + +} \ No newline at end of file diff --git a/Modules/CompactCommandPad/CommandSelector.cpp b/Modules/CompactCommandPad/CommandSelector.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a08764533f7b2147b573595d3add0374e7d61ed1 --- /dev/null +++ b/Modules/CompactCommandPad/CommandSelector.cpp @@ -0,0 +1,115 @@ +#include "CommandSelector.h" + +#include <Modules/CommandPad/MessagesList.h> + +#include <QDebug> + +CommandSelector::CommandSelector() : QDialog() { setupUi(); } + +CommandSelector::~CommandSelector() +{ + for (auto key : formElements.keys()) + delete formElements[key]; +} + +XmlObject CommandSelector::toXmlObject(XmlObject& obj) +{ + auto key = messagesListComboBox->currentText(); + if (formElements.contains(key)) + { + obj.addAttribute("message_id", key); + obj.addAttribute("label", lineEdit->text()); + formElements[key]->toXmlObject(obj); + } + + return obj; +} + +void CommandSelector::fromXmlObject(const XmlObject& obj) +{ + if (obj.hasAttribute("message_id")) + { + auto key = obj.getAttribute("message_id"); + + if (formElements.contains(key)) + { + formElements[key]->fromXmlObject(obj); + messagesListComboBox->setCurrentText(key); + + selectedMessage = formElements[key]->prepareMessage(key); + selectedLabel = obj.getAttribute("label"); + lineEdit->setText(selectedLabel); + selected = !selectedLabel.isEmpty(); + + qDebug() << "Command selector setup"; + qDebug() << selectedMessage.getTopic().toString(); + qDebug() << selectedMessage.toString(); + } + } +} + +bool CommandSelector::getSelection(QString& label, ModuleMessage& message) +{ + message = selectedMessage; + label = selectedLabel; + return selected; +} + +void CommandSelector::setupUi() +{ + outerLayout = new QVBoxLayout; + outerLayout->setSizeConstraint(QLayout::SetFixedSize); + + lineEdit = new QLineEdit; + lineEdit->setPlaceholderText("Write the button label"); + outerLayout->addWidget(lineEdit); + + messagesListComboBox = new QComboBox; + messagesListComboBox->setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + messagesListComboBox->addItems(MessagesList::messagesList); + outerLayout->addWidget(messagesListComboBox); + + formGridLayout = new QGridLayout; + outerLayout->addLayout(formGridLayout); + + outerLayout->addStretch(); + + sendButton = new QPushButton("Select"); + outerLayout->addWidget(sendButton); + + setLayout(outerLayout); + + MessagesList::fillMessagesMap(formElements); + + // Set default value + currentMessage = "PING_TC"; + messagesListComboBox->setCurrentText(currentMessage); + + connect(messagesListComboBox, &QComboBox::currentTextChanged, this, + [=](QString key) + { + if (formElements.contains(key)) + { + formElements[currentMessage]->removeFromGridLayout( + formGridLayout); + formElements[key]->applyToGridLayout(formGridLayout); + currentMessage = key; + } + }); + + connect(sendButton, &QPushButton::clicked, + [=]() + { + auto key = messagesListComboBox->currentText(); + if (formElements.contains(key)) + { + selectedMessage = formElements[key]->prepareMessage(key); + selectedLabel = lineEdit->text(); + selected = !selectedLabel.isEmpty(); + + if (selected) + this->close(); + } + }); +} diff --git a/Modules/CompactCommandPad/CommandSelector.h b/Modules/CompactCommandPad/CommandSelector.h new file mode 100644 index 0000000000000000000000000000000000000000..3fa838b5c99f150d56ecfddc0bdb4ede5710636b --- /dev/null +++ b/Modules/CompactCommandPad/CommandSelector.h @@ -0,0 +1,42 @@ +#pragma once + +#include <Core/xmlobject.h> +#include <Modules/CommandPad/MessageFormElement.h> + +#include <QBoxLayout> +#include <QComboBox> +#include <QDialog> +#include <QGridLayout> +#include <QLineEdit> +#include <QMap> +#include <QPushButton> +#include <QString> + +class CommandSelector : public QDialog +{ + Q_OBJECT + +public: + explicit CommandSelector(); + ~CommandSelector(); + + XmlObject toXmlObject(XmlObject& obj); + void fromXmlObject(const XmlObject& xmlObject); + + bool getSelection(QString& label, ModuleMessage& message); + +private: + void setupUi(); + + QString currentMessage; + QVBoxLayout* outerLayout; + QLineEdit* lineEdit; + QComboBox* messagesListComboBox; + QMap<QString, MessageFormElement*> formElements; + QGridLayout* formGridLayout; + QPushButton* sendButton; + + bool selected = false; + QString selectedLabel; + ModuleMessage selectedMessage; +}; \ No newline at end of file diff --git a/Modules/CompactCommandPad/CompactCommandPad.cpp b/Modules/CompactCommandPad/CompactCommandPad.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92f68daa57e5c16cd346336fb63a58dde2ddba53 --- /dev/null +++ b/Modules/CompactCommandPad/CompactCommandPad.cpp @@ -0,0 +1,75 @@ +#include "CompactCommandPad.h" + +CompactCommandPad::CompactCommandPad(QWidget* parent) : DefaultModule(parent) +{ + setupUi(); + defaultContextMenuSetup(); +} + +CompactCommandPad::~CompactCommandPad() { delete selector; } + +QWidget* CompactCommandPad::toWidget() { return this; } + +XmlObject CompactCommandPad::toXmlObject() +{ + XmlObject obj = XmlObject("compact_command_pad"); + + selector->toXmlObject(obj); + + return obj; +} + +void CompactCommandPad::fromXmlObject(const XmlObject& obj) +{ + if (obj.getObjectName() == "compact_command_pad") + selector->fromXmlObject(obj); + + QString label; + selected = selector->getSelection(label, selectedMessage); + + if (selected) + button->setText(label); +} + +void CompactCommandPad::buttonEditActionTriggered() +{ + selector->exec(); + + QString label; + selected = selector->getSelection(label, selectedMessage); + + if (selected) + button->setText(label); +} + +void CompactCommandPad::setupUi() +{ + QVBoxLayout* outerLayout = new QVBoxLayout; + outerLayout->setContentsMargins(2, 2, 2, 2); + + button = new QPushButton("Edit me"); + outerLayout->addWidget(button); + connect( + button, &QPushButton::clicked, + [=]() + { + if (selected) + { + qDebug() << selectedMessage.getTopic().toString(); + qDebug() << selectedMessage.toString(); + getCore()->getModuleMessagesBroker()->publish(selectedMessage); + } + }); + + setLayout(outerLayout); + + selector = new CommandSelector; +} + +void CompactCommandPad::addCustomActionsToMenu() +{ + QAction* edit = new QAction("Edit button", this); + addActionToMenu(edit); + connect(edit, &QAction::triggered, this, + &CompactCommandPad::buttonEditActionTriggered); +} \ No newline at end of file diff --git a/Modules/CompactCommandPad/CompactCommandPad.h b/Modules/CompactCommandPad/CompactCommandPad.h new file mode 100644 index 0000000000000000000000000000000000000000..7f7518fc1510b08da76bb54521fdfdbf2dc527b7 --- /dev/null +++ b/Modules/CompactCommandPad/CompactCommandPad.h @@ -0,0 +1,31 @@ +#pragma once + +#include <Modules/CompactCommandPad/CommandSelector.h> +#include <Modules/DefaultModule/defaultmodule.h> + +class CompactCommandPad : public DefaultModule +{ + Q_OBJECT + +public: + explicit CompactCommandPad(QWidget* parent = nullptr); + ~CompactCommandPad(); + + QWidget* toWidget() override; + + XmlObject toXmlObject() override; + void fromXmlObject(const XmlObject& obj) override; + +private slots: + void buttonEditActionTriggered(); + +private: + void setupUi(); + void addCustomActionsToMenu(); + + CommandSelector* selector; + QPushButton* button; + + bool selected; + ModuleMessage selectedMessage; +}; diff --git a/Modules/Mavlink/mavlinkmodule.cpp b/Modules/Mavlink/mavlinkmodule.cpp index 9ff74b90a39f9690ca12fac033c68c2eed2beddf..93d3b6b20619c7792974815cd6d3db7563bcd0a6 100644 --- a/Modules/Mavlink/mavlinkmodule.cpp +++ b/Modules/Mavlink/mavlinkmodule.cpp @@ -27,19 +27,7 @@ MavlinkModule::MavlinkModule(QWidget *parent) [this](const ModuleMessage &msg) { onCommandReceived(msg); }); } -MavlinkModule::~MavlinkModule() -{ - onStopClicked(); - - delete portsLabel; - delete portsComboBox; - delete baudrateLabel; - delete baudrateComboBox; - delete startToggleButton; - delete rateLabel; - delete logCheckBox; - delete openLogFolderButton; -} +MavlinkModule::~MavlinkModule() { onStopClicked(); } QWidget *MavlinkModule::toWidget() { return this; } @@ -171,7 +159,7 @@ void MavlinkModule::setupUi() QHBoxLayout *outerLayout = new QHBoxLayout; outerLayout->setContentsMargins(6, 0, 6, 0); - portsLabel = new QLabel("Available ports:"); + QLabel *portsLabel = new QLabel("Available ports:"); portsLabel->setSizePolicy( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(portsLabel); @@ -181,7 +169,7 @@ void MavlinkModule::setupUi() QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(portsComboBox); - baudrateLabel = new QLabel("Baudrate:"); + QLabel *baudrateLabel = new QLabel("Baudrate:"); baudrateLabel->setSizePolicy( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(baudrateLabel); @@ -191,16 +179,14 @@ void MavlinkModule::setupUi() QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(baudrateComboBox); - startToggleButton = new ToggleButton; + ToggleButton *startToggleButton = new ToggleButton; startToggleButton->setSizePolicy( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(startToggleButton); connect(startToggleButton, &ToggleButton::toggled, this, &MavlinkModule::onStartStreamToggled); - spacer = new QSpacerItem(0, 10000, QSizePolicy::Expanding, - QSizePolicy::Expanding); - outerLayout->addSpacerItem(spacer); + outerLayout->addStretch(); rateLabel = new QLabel("Rate: 0 msg/s"); rateLabel->setSizePolicy( @@ -212,7 +198,7 @@ void MavlinkModule::setupUi() QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(logCheckBox); - openLogFolderButton = new QPushButton("Log folder"); + QPushButton *openLogFolderButton = new QPushButton("Log folder"); openLogFolderButton->setSizePolicy( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); outerLayout->addWidget(openLogFolderButton); diff --git a/Modules/Mavlink/mavlinkmodule.h b/Modules/Mavlink/mavlinkmodule.h index e8e74e8c74f12922ccba06a2b635b8318e5006ce..e64b54ad6c35113e22f4b4ad8ccb00ed8f75fd4f 100644 --- a/Modules/Mavlink/mavlinkmodule.h +++ b/Modules/Mavlink/mavlinkmodule.h @@ -60,15 +60,10 @@ private: MavlinkCommandAdapter mavlinkCommandAdapter; QSerialPort serialPort; - QLabel *portsLabel; QComboBox *portsComboBox; - QLabel *baudrateLabel; QComboBox *baudrateComboBox; - ToggleButton *startToggleButton; - QSpacerItem *spacer; QLabel *rateLabel; QCheckBox *logCheckBox; - QPushButton *openLogFolderButton; QTimer linkQualityTimer; const int linkQualityPeriod = 2000; // [ms] diff --git a/Modules/moduleinfo.h b/Modules/moduleinfo.h index d8b6795c68f442db8deecaf9366bb971990d9d52..a395cc62910a4855ebfa1bd5173a296cb776f70b 100644 --- a/Modules/moduleinfo.h +++ b/Modules/moduleinfo.h @@ -10,6 +10,7 @@ enum ModuleId { SPLITTER, SKYWARDHUB, COMMANDPAD, + COMPACT_COMMAND_PAD, BROKERTEST, GRAPH, OUTCOMINGMESSAGEVIEWER, diff --git a/Modules/moduleslist.cpp b/Modules/moduleslist.cpp index c40c7dcad6c10d57a7d5ec73447f10d50ba43b07..2f95bff03cc1882c8b35e9041a5d53a9d7ac84e4 100644 --- a/Modules/moduleslist.cpp +++ b/Modules/moduleslist.cpp @@ -1,37 +1,36 @@ #include "moduleslist.h" -# -// ____________________________________________________________________________________________ -#include "Components/ModulesPicker/modulespicker.h" -#include "Modules/CommandPad/commandpad.h" -#include "Modules/Empty/emptymodule.h" -#include "Modules/FileStream/filestreammodule.h" -#include "Modules/Graph/graphmodule.h" -#include "Modules/IncomingMessagesViewer/incomingmessagesviewermodule.h" -#include "Modules/Mavlink/mavlinkmodule.h" -#include "Modules/Mavlink/mavlinkrocketmsgtestingmodule.h" -#include "Modules/OutgoingMessagesViewer/outgoingmessagesviewermodule.h" -#include "Modules/SkywardHub/skywardhubmodule.h" -#include "Modules/Splitter/splittermodule.h" -#include "Modules/StateViewer/stateviewermodule.h" -#include "Modules/Tabs/tabsmodule.h" -#include "Modules/Test/testmodule.h" -#include "Modules/TimerController/timercontrollermodule.h" -#include "Modules/ValuesConverterViewer/valuesconverterviewermodule.h" +#include <Components/ModulesPicker/modulespicker.h> +#include <Modules/CommandPad/commandpad.h> +#include <Modules/CompactCommandPad/CompactCommandPad.h> +#include <Modules/Empty/emptymodule.h> +#include <Modules/FileStream/filestreammodule.h> +#include <Modules/Graph/graphmodule.h> +#include <Modules/IncomingMessagesViewer/incomingmessagesviewermodule.h> +#include <Modules/Mavlink/mavlinkmodule.h> +#include <Modules/Mavlink/mavlinkrocketmsgtestingmodule.h> +#include <Modules/OutgoingMessagesViewer/outgoingmessagesviewermodule.h> +#include <Modules/SkywardHub/skywardhubmodule.h> +#include <Modules/Splitter/splittermodule.h> +#include <Modules/StateViewer/stateviewermodule.h> +#include <Modules/Tabs/tabsmodule.h> +#include <Modules/Test/testmodule.h> +#include <Modules/TimerController/timercontrollermodule.h> +#include <Modules/ValuesConverterViewer/valuesconverterviewermodule.h> void ModulesList::createModuleList() { - /* - * addModule(MODULE UNIQUE ID, MODULE UNIQUE NAME, a function that instantiate your module) - * If you are creating a new Module, please add it's id in the ModuleId enum (you can find it in moduleslist.h) - * + /** + * addModule(MODULE UNIQUE ID, MODULE UNIQUE NAME, a function that + * instantiate your module) If you are creating a new Module, please add + * it's id in the ModuleId enum (you can find it in moduleslist.h) * * WARNING! - * ⚠ Each ID must be unique - * ⚠ Each ModuleName must be unique and WITHOUT spaces - * ⚠ A Module must NOT include a file outside its folder - * ⚠ The ModuleSourceFiles allow you to specify which files will be included - * (all the files that match the strings you privide will be included) + * - Each ID must be unique + * - Each ModuleName must be unique and WITHOUT spaces + * - A Module must NOT include a file outside its folder + * - The ModuleSourceFiles allow you to specify which files will be included + * (all the files that match the strings you provide will be included) */ #ifdef EMPTYMODULE_H @@ -42,12 +41,20 @@ void ModulesList::createModuleList() #endif #ifdef COMMANDPAD_H - ModuleInfo commandPad(ModuleId::COMMANDPAD, "CommandPad", ModuleCategory::UTILITY); + ModuleInfo commandPad(ModuleId::COMMANDPAD, "CommandPad", + ModuleCategory::UTILITY); commandPad.setFactory([]() { return new CommandPad(); }); commandPad.addModuleSourceFiles("Modules/CommandPad/"); addModuleInfo(commandPad); #endif + ModuleInfo compactCommandPad(ModuleId::COMPACT_COMMAND_PAD, + "compact_command_pad", + ModuleCategory::UTILITY); + compactCommandPad.setFactory([]() { return new CompactCommandPad(); }); + compactCommandPad.addModuleSourceFiles("Modules/CompactCommandPad/"); + addModuleInfo(compactCommandPad); + #ifdef SPLITTERMODULE_H ModuleInfo splitter(ModuleId::SPLITTER, "Splitter"); splitter.setFactory([]() { return new SplitterModule(); }); @@ -63,69 +70,87 @@ void ModulesList::createModuleList() #endif #ifdef TESTMODULE_H - ModuleInfo testModule(ModuleId::BROKERTEST, "TestBroker", ModuleCategory::DEFAULT); + ModuleInfo testModule(ModuleId::BROKERTEST, "TestBroker", + ModuleCategory::DEFAULT); testModule.setFactory([]() { return new TestModule(); }); testModule.addModuleSourceFiles("Modules/Test/"); addModuleInfo(testModule); #endif #ifdef GRAPHMODULE_H - ModuleInfo graphModule(ModuleId::GRAPH, "Graph", ModuleCategory::DATAVISUAL); + ModuleInfo graphModule(ModuleId::GRAPH, "Graph", + ModuleCategory::DATAVISUAL); graphModule.setFactory([]() { return new GraphModule(); }); graphModule.addModuleSourceFiles("Modules/Graph/"); addModuleInfo(graphModule); #endif #ifdef OUTCOMINGMESSAGESVIEWERMODULE_H - ModuleInfo outMsgViewer(ModuleId::OUTCOMINGMESSAGEVIEWER, "OutgoingMessagesViewer", ModuleCategory::DATAVISUAL); - outMsgViewer.setFactory([]() { return new OutgoingMessagesViewerModule(); }); + ModuleInfo outMsgViewer(ModuleId::OUTCOMINGMESSAGEVIEWER, + "OutgoingMessagesViewer", + ModuleCategory::DATAVISUAL); + outMsgViewer.setFactory([]() + { return new OutgoingMessagesViewerModule(); }); outMsgViewer.addModuleSourceFiles("Modules/OutgoingMessageViewer/"); addModuleInfo(outMsgViewer); #endif #ifdef INCOMINGMESSAGESVIEWERMODULE_H - ModuleInfo inMsgViewer(ModuleId::INCOMINGMESSAGESVIEWER, "IncomingMessagesViewer", ModuleCategory::DATAVISUAL); + ModuleInfo inMsgViewer(ModuleId::INCOMINGMESSAGESVIEWER, + "IncomingMessagesViewer", + ModuleCategory::DATAVISUAL); inMsgViewer.setFactory([]() { return new IncomingMessagesViewerModule(); }); inMsgViewer.addModuleSourceFiles("Modules/IncomingMessageViewer/"); addModuleInfo(inMsgViewer); #endif #ifdef MAVLINKMODULE_H - ModuleInfo mavlink(ModuleId::MAVLINK, "Mavlink", ModuleCategory::DATASOURCE); + ModuleInfo mavlink(ModuleId::MAVLINK, "Mavlink", + ModuleCategory::DATASOURCE); mavlink.setFactory([]() { return new MavlinkModule(); }); mavlink.addModuleSourceFiles("Modules/Mavlink/"); addModuleInfo(mavlink); #endif #ifdef MAVLINKROCKETMSGTESTINGMODULE_H - ModuleInfo mvkRckTesting(ModuleId::MAVLINK_RCK_TESTING, "MavlinkRocketMsgTesting", ModuleCategory::DEFAULT); - mvkRckTesting.setFactory([]() { return new MavlinkRocketMsgTestingModule(); }); + ModuleInfo mvkRckTesting(ModuleId::MAVLINK_RCK_TESTING, + "MavlinkRocketMsgTesting", + ModuleCategory::DEFAULT); + mvkRckTesting.setFactory([]() + { return new MavlinkRocketMsgTestingModule(); }); addModuleInfo(mvkRckTesting); #endif #ifdef FILESTREAMMODULE_H - ModuleInfo fileStream(ModuleId::FILESTREAM, "FileStream", ModuleCategory::DATASOURCE); + ModuleInfo fileStream(ModuleId::FILESTREAM, "FileStream", + ModuleCategory::DATASOURCE); fileStream.setFactory([]() { return new FileStreamModule(); }); fileStream.addModuleSourceFiles("Modules/FileStream/"); addModuleInfo(fileStream); #endif #ifdef STATEVIEWERMODULE_H - ModuleInfo stateViewer(ModuleId::STATEVIEWER, "StateViewer", ModuleCategory::DATAVISUAL); + ModuleInfo stateViewer(ModuleId::STATEVIEWER, "StateViewer", + ModuleCategory::DATAVISUAL); stateViewer.setFactory([]() { return new StateViewerModule(); }); stateViewer.addModuleSourceFiles("Modules/StateViewer/"); addModuleInfo(stateViewer); #endif #ifdef VALUESCONVERTERVIEWERMODULE_H - ModuleInfo valuesconverterviewer(ModuleId::VALUESCONVERTERVIEWER, "ValuesConverterViewer", ModuleCategory::UTILITY); - valuesconverterviewer.setFactory([]() { return new ValuesConverterViewerModule(); }); - valuesconverterviewer.addModuleSourceFiles("Modules/ValuesConverterViewer/"); + ModuleInfo valuesconverterviewer(ModuleId::VALUESCONVERTERVIEWER, + "ValuesConverterViewer", + ModuleCategory::UTILITY); + valuesconverterviewer.setFactory( + []() { return new ValuesConverterViewerModule(); }); + valuesconverterviewer.addModuleSourceFiles( + "Modules/ValuesConverterViewer/"); addModuleInfo(valuesconverterviewer); #endif #ifdef TIMERCONTROLLERMODULE_H - ModuleInfo timerController(ModuleId::TIMER_CONTROLLER, "TimerController", ModuleCategory::UTILITY); + ModuleInfo timerController(ModuleId::TIMER_CONTROLLER, "TimerController", + ModuleCategory::UTILITY); timerController.setFactory([]() { return new TimerControllerModule(); }); timerController.addModuleSourceFiles("Modules/TimerController/"); addModuleInfo(timerController); @@ -153,7 +178,10 @@ bool ModulesList::containsId(ModuleId id) return false; } -void ModulesList::addModuleInfo(const ModuleInfo& info) { modulesInfo.append(info); } +void ModulesList::addModuleInfo(const ModuleInfo& info) +{ + modulesInfo.append(info); +} QString ModulesList::getModuleName(ModuleId id) const { @@ -175,7 +203,8 @@ std::function<Module*()> ModulesList::getFactory(ModuleId id) const return []() { return nullptr; }; } -std::function<Module*()> ModulesList::findFactoryByModuleName(const QString& name) +std::function<Module*()> ModulesList::findFactoryByModuleName( + const QString& name) { for (int i = 0; i < modulesInfo.count(); i++) { diff --git a/SkywardHub.pro b/SkywardHub.pro index fe27039ddda1a52cfbbb8cd810e92c534f83ddca..da3983b183ec9dc8b0cbbe97e763dc0026f6578f 100644 --- a/SkywardHub.pro +++ b/SkywardHub.pro @@ -30,8 +30,10 @@ SOURCES += \ Core/modulesmanager.cpp \ Core/skywardhubcore.cpp \ Core/xmlobject.cpp \ - Modules/CommandPad/commandpad.cpp \ + Modules/CommandPad/CommandPad.cpp \ Modules/CommandPad/MessageFormElement.cpp \ + Modules/CompactCommandPad/CompactCommandPad.cpp \ + Modules/CompactCommandPad/CommandSelector.cpp \ Modules/DefaultModule/defaultmodule.cpp \ Modules/Empty/emptymodule.cpp \ Modules/FileStream/filestreammodule.cpp \ @@ -84,8 +86,11 @@ HEADERS += \ Core/modulesmanager.h \ Core/skywardhubcore.h \ Core/xmlobject.h \ - Modules/CommandPad/commandpad.h \ + Modules/CommandPad/CommandPad.h \ Modules/CommandPad/MessageFormElement.h \ + Modules/CommandPad/MessagesList.h \ + Modules/CompactCommandPad/CompactCommandPad.h \ + Modules/CompactCommandPad/CommandSelector.h \ Modules/DefaultModule/defaultmodule.h \ Modules/Empty/emptymodule.h \ Modules/FileStream/filestreammodule.h \