Enable changing the ACN EPI 19 user assignable name
This commit is contained in:
parent
d84dde0cb2
commit
b7f045cd6b
|
@ -1,4 +1,5 @@
|
|||
#include "adduniversedialog.h"
|
||||
#include "lineeditdialog.h"
|
||||
#include "multiverseview.h"
|
||||
#include "multiversemodel.h"
|
||||
#include "ui_multiverseview.h"
|
||||
|
@ -38,6 +39,9 @@ MultiverseView::MultiverseView(QWidget *parent, QSacnNode *node)
|
|||
connect(ui->multiverseView, &QTreeView::doubleClicked,
|
||||
this, &MultiverseView::createEditor);
|
||||
|
||||
connect(ui->actionUACN, &QAction::triggered,
|
||||
this, &MultiverseView::showUacnEditor);
|
||||
|
||||
connect(ui->actionInspect, &QAction::triggered,
|
||||
this, [this]() {
|
||||
auto selected = ui->multiverseView->currentIndex();
|
||||
|
@ -207,3 +211,19 @@ void MultiverseView::createEditor(const QModelIndex &index)
|
|||
subscribe->exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief MultiverseView::showUacnEditor
|
||||
*/
|
||||
void MultiverseView::showUacnEditor()
|
||||
{
|
||||
auto editor = new LineEditDialog(this, "Name", 63,
|
||||
node->name().c_str(), node->fixedName().c_str());
|
||||
editor->setWindowTitle("User Assigned Component Name");
|
||||
|
||||
connect(editor, &LineEditDialog::submit,
|
||||
this, [&](QString name) {node->assignUserName(name.toStdString());});
|
||||
|
||||
editor->exec();
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public slots:
|
|||
void selectionChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void createContextMenu(const QPoint &pos);
|
||||
void createEditor(const QModelIndex &index);
|
||||
void showUacnEditor();
|
||||
|
||||
private:
|
||||
Ui::MultiverseView *ui;
|
||||
|
|
|
@ -142,9 +142,6 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="actionUACN">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>User Assigned Component Name</string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue