ViewSelectionConfigDialog.cpp
Go to the documentation of this file.
2 
3 #include <QMessageBox>
4 #include <QPushButton>
5 
6 #include <IceUtil/UUID.h>
7 
8 #include <RobotAPI/gui-plugins/ViewSelection/ui_ViewSelectionConfigDialog.h>
9 #include <RobotAPI/interface/components/ViewSelectionInterface.h>
10 
11 using namespace armarx;
12 
14  QDialog(parent), ui(new Ui::ViewSelectionConfigDialog), uuid(IceUtil::generateUUID())
15 {
16  ui->setupUi(this);
17  ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
18  connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(verifyConfig()));
19 
20  viewSelectionProxyFinder = new IceProxyFinder<ViewSelectionInterfacePrx>(this);
21  viewSelectionProxyFinder->setSearchMask("*ViewSelection");
22  //ui->verticalLayout->addWidget(viewSelectionProxyFinder);
23 }
24 
26 {
27  delete ui;
28 }
29 
30 void
32 {
33 }
34 
35 void
37 {
38  viewSelectionProxyFinder->setIceManager(getIceManager());
39 }
40 
41 void
43 {
44  QObject::disconnect();
45 }
46 
47 std::string
49 {
50  return "ViewSelectionConfigDialog" + uuid;
51 }
52 
53 void
55 {
56 
57  if (!viewSelectionProxyFinder->getSelectedProxyName().trimmed().length())
58  {
59  QMessageBox::critical(this, "Invalid Configuration", "The proxy names must not be empty");
60  return;
61  }
62 
63  this->accept();
64 }
armarx::ManagedIceObject::getIceManager
IceManagerPtr getIceManager() const
Returns the IceManager.
Definition: ManagedIceObject.cpp:366
armarx::IceProxyFinderBase::setSearchMask
void setSearchMask(const QString &searchMask)
Definition: IceProxyFinder.cpp:91
armarx::IceProxyFinderBase::setIceManager
void setIceManager(IceManagerPtr icemanager, bool fetchProxies=true)
Definition: IceProxyFinder.cpp:63
IceUtil
Definition: Instance.h:21
ViewSelectionConfigDialog::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: ViewSelectionConfigDialog.cpp:42
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
ViewSelectionConfigDialog::verifyConfig
void verifyConfig()
Definition: ViewSelectionConfigDialog.cpp:54
ViewSelectionConfigDialog::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: ViewSelectionConfigDialog.cpp:48
ViewSelectionConfigDialog::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: ViewSelectionConfigDialog.cpp:36
ViewSelectionConfigDialog::ViewSelectionConfigDialog
ViewSelectionConfigDialog(QWidget *parent=0)
Definition: ViewSelectionConfigDialog.cpp:13
ViewSelectionConfigDialog
Definition: ViewSelectionConfigDialog.h:15
armarx::IceProxyFinderBase::getSelectedProxyName
QString getSelectedProxyName() const
Definition: IceProxyFinder.cpp:73
armarx::IceProxyFinder
Definition: StatechartViewerController.h:49
ViewSelectionConfigDialog::~ViewSelectionConfigDialog
~ViewSelectionConfigDialog() override
Definition: ViewSelectionConfigDialog.cpp:25
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
ViewSelectionConfigDialog::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ViewSelectionConfigDialog.cpp:31
ViewSelectionConfigDialog.h