Loading...
Searching...
No Matches
DefaultProtocolFactory.hpp
1#pragma once
2#include <Device/Protocol/DeviceInterface.hpp>
3#include <Device/Protocol/ProtocolFactoryInterface.hpp>
4
5#include <Explorer/Explorer/Widgets/AddressEditDialog.hpp>
6
7namespace Protocols
8{
10{
11public:
12 using Device::ProtocolFactory::ProtocolFactory;
13
14 Device::AddressDialog* makeEditAddressDialog(
16 const score::DocumentContext& ctx, QWidget* parent) override
17 {
18 auto ptr = new Explorer::AddressEditDialog{set, parent};
19
20 ptr->setCanRename(dev.capabilities().canRenameNode);
21 ptr->setCanEditProperties(dev.capabilities().canSetProperties);
22
23 return ptr;
24 }
25 Device::AddressDialog* makeAddAddressDialog(
27 QWidget* parent) override
28 {
29 auto ptr = new Explorer::AddressEditDialog{parent};
30
31 ptr->setCanRename(dev.capabilities().canRenameNode);
32 ptr->setCanEditProperties(dev.capabilities().canSetProperties);
33
34 return ptr;
35 }
36};
37}
Definition ProtocolSettingsWidget.hpp:41
Definition DeviceInterface.hpp:66
Definition ProtocolFactoryInterface.hpp:49
Definition AddressEditDialog.hpp:21
Definition DefaultProtocolFactory.hpp:10
Definition AddressSettings.hpp:49
Definition DocumentContext.hpp:18