NJointControllerGuiPluginBase.cpp
Go to the documentation of this file.
2
3#include <QPushButton>
4
6
8{
9 std::string
11 {
12 return getName() + "_controller";
13 }
14
15 void
19
20 void
24
25 void
29
30 void
34
36 {
37 }
38
40 {
41 }
42
43 void
45 QPushButton* ac,
46 QPushButton* dc,
47 QPushButton* de)
48 {
49 if (cr)
50 {
51 connect(cr, &QPushButton::clicked, this, &Base::createController);
52 }
53 if (ac)
54 {
55 connect(ac, &QPushButton::clicked, this, &Base::activateController);
56 }
57 if (dc)
58 {
59 connect(dc, &QPushButton::clicked, this, &Base::deactivateController);
60 }
61 if (de)
62 {
63 connect(de, &QPushButton::clicked, this, &Base::deleteController);
64 }
65 }
66
67 void
68 Base::loadSettings(QSettings* settings)
69 {
71 std::lock_guard g{_allMutex};
73 settings->value("rsc", "Armar6StateComponent").toString().toStdString());
75 settings->value("ru", "Armar6Unit").toString().toStdString());
76 }
77
78 void
79 Base::saveSettings(QSettings* settings)
80 {
82 std::lock_guard g{_allMutex};
83 settings->setValue(
84 "rsc",
85 QString::fromStdString(getRobotStateComponentPlugin().getRobotStateComponentName()));
86 settings->setValue(
87 "ru", QString::fromStdString(getRobotUnitComponentPlugin().getRobotUnitName()));
88 }
89
90 QPointer<QDialog>
91 Base::getConfigDialog(QWidget* parent)
92 {
94 std::lock_guard g{_allMutex};
95 if (!_dialog)
96 {
97 _dialog = new SimpleConfigDialog(parent);
98 _dialog->addProxyFinder<RobotUnitInterfacePrx>({"ru", "Robot Unit", "*Unit"});
100 {"rsc", "Robot State Component", "*Component"});
101 }
102 return qobject_cast<SimpleConfigDialog*>(_dialog);
103 }
104
105 void
107 {
109 std::lock_guard g{_allMutex};
112 }
113
114 void
124
125 void
134
135 void
145
146 void
147 Base::doSetupGuiAfterConnect()
148 {
150 std::lock_guard g{_allMutex};
151 if (_robot)
152 {
154 }
155 ARMARX_IMPORTANT << "call setupGuiAfterConnect";
157 }
158
159 void
163} // namespace armarx::detail::_NJointControllerGuiPluginBase
virtual void preOnConnectComponent() override
virtual void postOnDisconnectComponent()
std::string getName() const
Retrieve name of object.
virtual void preOnConnectComponent()
virtual void postOnConnectComponent()
bool synchronizeLocalClone(const VirtualRobot::RobotPtr &robot) const
const RobotStateComponentPlugin & getRobotStateComponentPlugin() const
VirtualRobot::RobotPtr addRobot(const std::string &id, const VirtualRobot::RobotPtr &robot, const VirtualRobot::RobotNodeSetPtr &rns={}, const VirtualRobot::RobotNodePtr &node={})
plugins::RobotUnitComponentPlugin & getRobotUnitComponentPlugin()
A config-dialog containing one (or multiple) proxy finders.
void loadSettings(QSettings *settings) override
Implement to load the settings that are part of the GUI configuration.
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
void connectCreateAcivateDeactivateDelete(QPushButton *cr, QPushButton *ac, QPushButton *dc, QPushButton *de)
void configured() override
This function must be implemented by the user, if he supplies a config dialog.
QPointer< QDialog > getConfigDialog(QWidget *parent) override
getConfigDialog returns a pointer to the a configuration widget of this controller.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
Definition Logging.h:190
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotUnitInterface > RobotUnitInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
#define ARMARX_TRACE
Definition trace.h:77