1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SUPERVGUI_Service.cxx
25 // Author : Francis KLOSS
29 #include "SUPERVGUI_Service.h"
30 #include "SUPERVGUI_Main.h"
31 #include "SUPERVGUI.h"
32 #include "QAD_Tools.h"
33 #include "QAD_FileDlg.h"
35 #include "SALOME_NamingService.hxx"
36 #include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
38 #include <qtextstream.h>
41 static const char * ComponentIcon[] = {
48 " .................. ",
57 " .................. ",
61 " .. .. .. .. .. .. ",
63 " .. .. .. .. .. .. ",
67 static const char * InterfaceIcon[] = {
95 SUPERVGUI_Service::SUPERVGUI_Service(SALOME_NamingService* ns):
96 QDialog(QAD_Application::getDesktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
99 setSizeGripEnabled( true );
100 setCaption(tr("TIT_SERVICES"));
102 QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 4);
104 myTabPane = new QTabWidget(this);
105 connect(myTabPane, SIGNAL(currentChanged(QWidget *)), this, SLOT(tabChanged(QWidget *)));
107 // Create Tab for Corba services
108 QWidget* aCorbaPane = new QWidget(myTabPane);
109 QVBoxLayout* aBaseLayoutV= new QVBoxLayout(aCorbaPane, 0, 4);
110 aBaseLayoutV->setMargin(5);
111 aBaseLayoutV->setSpacing(10);
113 QHBoxLayout* aBaseLayout = new QHBoxLayout(aCorbaPane); //!!
115 components = new QListView(aCorbaPane);
116 components->addColumn(tr("COL_COMPONENTS"));
117 components->addColumn(tr("COL_PORTTYPE"));
118 components->addColumn(tr("COL_PORTWAY"));
119 components->setColumnAlignment(1, AlignLeft);
120 components->setColumnAlignment(2, AlignLeft);
121 components->setColumnAlignment(3, AlignLeft);
122 components->setSelectionMode(QListView::Extended);
123 components->setRootIsDecorated(true);
124 // aBaseLayout->addWidget(components);
125 aBaseLayoutV->addWidget(components); //!!
127 //QHGroupBox* aAddBox = new QHGroupBox(tr("TIT_ADDNODE"), aCorbaPane); //!!
128 //aAddBox->setInsideSpacing(20); //!!
130 QPushButton* aComputeCBtn = new QPushButton(tr("TIT_ADDCNODE"), aCorbaPane); //!!
131 connect(aComputeCBtn, SIGNAL(clicked()), this, SLOT(addComputeNode())); //!!
133 QPushButton* aComputeBtn = new QPushButton(tr("TIT_ADDFNODE"), aCorbaPane);
134 connect(aComputeBtn, SIGNAL(clicked()), this, SLOT(addFactoryNode()));
136 aBaseLayout->addWidget(aComputeBtn);
137 aBaseLayout->addWidget(aComputeCBtn); //!!
139 aBaseLayoutV->insertLayout(-1, aBaseLayout);
140 myTabPane->addTab(aCorbaPane, tr("MODULES_PANE"));
143 // Create Tab for Python services
144 QWidget* aPythonPane = new QWidget(myTabPane);
145 QVBoxLayout* aPythonLayout = new QVBoxLayout(aPythonPane, 0, 4);
146 aPythonLayout->setMargin(5);
147 aPythonLayout->setSpacing(10);
150 QHGroupBox* aAddBox2 = new QHGroupBox(tr("TIT_ADDNODE"), aPythonPane);
151 aAddBox2->setInsideSpacing(20);
153 QLabel* aTypeLbl = new QLabel(tr("LBL_NODETYPE"), aAddBox2);
155 myTypeCombo = new QComboBox(aAddBox2);
156 myTypeCombo->insertItem("Computation");
157 myTypeCombo->insertItem("Switch");
158 myTypeCombo->insertItem("Loop");
159 myTypeCombo->insertItem("GoTo");
160 //myTypeCombo->insertItem("Label");
161 connect(myTypeCombo, SIGNAL(activated(int)), this, SLOT(typeNodeSelected(int)));
163 aPythonLayout->addWidget(aAddBox2);
166 myStackWidget = new QWidgetStack(aPythonPane);
169 myScriptPane = new SUPERVGUI_PythonEditPane(myStackWidget);
170 myOtherId = myStackWidget->addWidget(myScriptPane);
173 QTabWidget* aLoopTabPane = new QTabWidget(myStackWidget);
174 myInitPane = new SUPERVGUI_PythonEditPane(myStackWidget);
175 aLoopTabPane->addTab(myInitPane, "Init");
177 myMorePane = new SUPERVGUI_PythonEditPane(myStackWidget);
178 aLoopTabPane->addTab(myMorePane, "More");
180 myNextPane = new SUPERVGUI_PythonEditPane(myStackWidget);
181 aLoopTabPane->addTab(myNextPane, "Next");
182 myLoopId = myStackWidget->addWidget(aLoopTabPane);
184 myStackWidget->raiseWidget(myOtherId);
186 aPythonLayout->addWidget(myStackWidget, 1);
189 QPushButton* aCreateBtn = new QPushButton(tr("TIT_ADDNODE"), aPythonPane);
190 connect(aCreateBtn, SIGNAL(clicked()), this, SLOT(addInlineNode()));
191 aPythonLayout->addWidget(aCreateBtn);
193 myTabPane->addTab(aPythonPane, tr("INLINE_PANE"));
195 aMainLayout->addWidget(myTabPane);
198 QHBox* aBtnBox = new QHBox(this);
199 QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox->layout());
200 aBtnLayout->addStretch();
202 QPushButton* aCloseBtn = new QPushButton(tr("BUT_CLOSE"), aBtnBox);
203 connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
205 aMainLayout->addWidget(aBtnBox);
215 void SUPERVGUI_Service::initialise() {
216 CORBA::Object_ptr obj = naming->Resolve("/Kernel/ModulCatalog");
217 SALOME_ModuleCatalog::ModuleCatalog_var *aModuleCatalog = new SALOME_ModuleCatalog::ModuleCatalog_var;
218 *aModuleCatalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj);
219 if (CORBA::is_nil(*aModuleCatalog)) {
220 setCaption("Error in Connexion to omniNames with '/Kernel/ModulCatalog'");
224 QAD_ResourceMgr* aResMgr = QAD_Desktop::createResourceManager();
226 SALOME_ModuleCatalog::ListOfComponents_var lComponents = (*aModuleCatalog)->GetComponentList();
227 long nbComp = lComponents->length();
228 for (int i=0; i<nbComp; i++) {
229 SALOME_ModuleCatalog::Acomponent_ptr C = (*aModuleCatalog)->GetComponent((char *)lComponents[i]);
230 QListViewItem* myComponentItem = new QListViewItem(components, (char*)lComponents[i]);
231 myComponentItem->setSelectable(false);
232 QString aIconName = C->component_icone();
233 if (!aIconName.isEmpty()) {
234 QString resDir = aResMgr->findFile(aIconName, C->componentname()) ;
236 resDir = QAD_Tools::addSlash(resDir);
237 QPixmap aIcone(resDir + aIconName);
238 QIconSet aIconSet(aIcone);
239 myComponentItem->setPixmap(0, aIconSet.pixmap(QIconSet::Small, QIconSet::Normal));
241 myComponentItem->setPixmap(0, ComponentIcon);
244 myComponentItem->setPixmap(0, ComponentIcon);
246 SALOME_ModuleCatalog::ListOfInterfaces* lInterfaces = C->GetInterfaceList();
247 long nbInterf = lInterfaces->length();
248 for (int j=0; j<nbInterf; j++) {
249 SALOME_ModuleCatalog::DefinitionInterface* Interface = C->GetInterface((char*)(*lInterfaces)[j]);
250 QListViewItem* myInterfaceItem = new QListViewItem(myComponentItem, (char*)Interface->interfacename);
251 myInterfaceItem->setSelectable(false);
252 myInterfaceItem->setPixmap(0, InterfaceIcon);
254 long nbServices = Interface->interfaceservicelist.length();
255 for (int k=0; k<nbServices; k++) {
256 SALOME_ModuleCatalog::Service* Service = &(Interface->interfaceservicelist[k]);
257 QListViewItem* myServiceItem = new QListViewItem(myInterfaceItem, (char*)Service->ServiceName);
258 myServiceItem->setSelectable(true);
259 components->ensureItemVisible(myServiceItem);
261 long nbPortsOut = Service->ServiceoutParameter.length();
262 for (int m=0; m<nbPortsOut; m++) {
263 SALOME_ModuleCatalog::ServicesParameter* PortOut = &(Service->ServiceoutParameter[m]);
264 QListViewItem* myPortOutItem = new QListViewItem(myServiceItem, (char*)PortOut->Parametername, (char*)PortOut->Parametertype, "Out");
265 myPortOutItem->setSelectable(false);
268 long nbPortsIn = Service->ServiceinParameter.length();
269 for (int l=0; l<nbPortsIn; l++) {
270 SALOME_ModuleCatalog::ServicesParameter* PortIn = &(Service->ServiceinParameter[l]);
271 QListViewItem* myPortInItem = new QListViewItem(myServiceItem, (char*)PortIn->Parametername, (char*)PortIn->Parametertype, "In");
272 myPortInItem->setSelectable(false);
281 SUPERVGUI_Service::~SUPERVGUI_Service() {
282 Trace("SUPERVGUI_Service::~SUPERVGUI_Service")
285 void SUPERVGUI_Service::addComputeNode() {
286 SUPERVGUI_Main* aMain = Supervision.getMain();
288 QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
290 CORBA::Object_ptr obj = naming->Resolve("/Kernel/ModulCatalog");
291 SALOME_ModuleCatalog::ModuleCatalog_var* aModuleCatalog = new SALOME_ModuleCatalog::ModuleCatalog_var;
292 *aModuleCatalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj);
293 if (CORBA::is_nil(*aModuleCatalog)) {
294 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
298 QListViewItemIterator i(components);
299 for (; i.current(); ++i) {
301 if (item->isSelected()) {
302 const char* service = item->text(0).latin1();
303 const char* interface = item->parent()->text(0).latin1();
304 const char* component = item->parent()->parent()->text(0).latin1();
305 SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
306 if (myComponent==NULL) {
307 QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
309 const SALOME_ModuleCatalog::Service* myService = myComponent->GetService(interface, service);
312 SUPERV_CNode node = aMain->getDataflow()->CNode(*myService);
313 if (CORBA::is_nil(node)) {
314 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
317 node->Coords(myX, myY);
320 aMain->addComputeNode(SUPERV::CNode::_narrow(node));
325 QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NONODE_TOADD"));
331 void SUPERVGUI_Service::addFactoryNode() {
332 SUPERVGUI_Main* aMain = Supervision.getMain();
334 QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
336 CORBA::Object_ptr obj = naming->Resolve("/Kernel/ModulCatalog");
337 SALOME_ModuleCatalog::ModuleCatalog_var* aModuleCatalog = new SALOME_ModuleCatalog::ModuleCatalog_var;
338 *aModuleCatalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj);
339 if (CORBA::is_nil(*aModuleCatalog)) {
340 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
344 QListViewItemIterator i(components);
345 for (; i.current(); ++i) {
347 if (item->isSelected()) {
348 const char* service = item->text(0).latin1();
349 const char* interface = item->parent()->text(0).latin1();
350 const char* component = item->parent()->parent()->text(0).latin1();
351 SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
352 if (myComponent==NULL) {
353 QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
355 const SALOME_ModuleCatalog::Service* myService = myComponent->GetService(interface, service);
358 SUPERV_FNode node = aMain->getDataflow()->FNode(component, interface, *myService);
359 if (CORBA::is_nil(node)) {
360 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
363 node->Coords(myX, myY);
366 aMain->addComputeNode(SUPERV::CNode::_narrow(node));
371 QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NONODE_TOADD"));
378 void SUPERVGUI_Service::addInlineNode() {
379 SUPERVGUI_Main* aMain = Supervision.getMain();
381 QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"), tr("MSG_NO_SUPERVISION_WINDOW"));
383 int aSel = myTypeCombo->currentItem();
385 case 0: // Computation
386 if (myScriptPane->isDefined()) {
387 SUPERV_INode aNode = aMain->getDataflow()->INode(myScriptPane->getFuncName().latin1(),
388 (myScriptPane->getFunction()).in());
389 if (CORBA::is_nil(aNode)) {
390 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
393 aNode->Coords(myX, myY);
396 aMain->addComputeNode(SUPERV::CNode::_narrow(aNode));
401 if (myScriptPane->isDefined()) {
402 SUPERV_INode aEndNode;
403 SUPERV_SNode aStartNode = aMain->getDataflow()->SNode(myScriptPane->getFuncName().latin1(),
404 (myScriptPane->getFunction()).in(),
406 if (CORBA::is_nil(aStartNode) || CORBA::is_nil(aEndNode)) {
407 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
410 aStartNode->Coords(myX, myY);
411 aEndNode->Coords(myX + LABEL_WIDTH*2, myY);
414 aMain->addControlNode(SUPERV::CNode::_narrow(aStartNode), SUPERV::CNode::_narrow(aEndNode));
420 SUPERV_INode aEndNode;
421 SUPERV_LNode aStartNode = aMain->getDataflow()->LNode(myInitPane->getFuncName().latin1(), (myInitPane->getFunction()).in(),
422 myMorePane->getFuncName().latin1(), (myMorePane->getFunction()).in(),
423 myNextPane->getFuncName().latin1(), (myNextPane->getFunction()).in(),
425 if (CORBA::is_nil(aStartNode) || CORBA::is_nil(aEndNode)) {
426 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
429 aStartNode->Coords(myX, myY);
430 aEndNode->Coords(myX + LABEL_WIDTH*2, myY);
433 aMain->addControlNode(SUPERV::CNode::_narrow(aStartNode), SUPERV::CNode::_narrow(aEndNode));
439 SUPERV_GNode aGotoNode;
440 if (myScriptPane->isDefined())
441 aGotoNode = aMain->getDataflow()->GNode(myScriptPane->getFuncName().latin1(),
442 (myScriptPane->getFunction()).in(), "");
444 aGotoNode = aMain->getDataflow()->GNode("GoTo", (myScriptPane->getFunction()).in(), "");
445 if (CORBA::is_nil(aGotoNode)) {
446 QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
449 aGotoNode->Coords(myX, myY);
452 aMain->addGOTONode(SUPERV::GNode::_narrow(aGotoNode));
461 void SUPERVGUI_Service::typeNodeSelected(int theRow) {
463 myStackWidget->raiseWidget(myLoopId);
465 myStackWidget->raiseWidget(myOtherId);
470 void SUPERVGUI_Service::choose() {
471 Trace("SUPERVGUI_Service::choose")
477 void SUPERVGUI_Service::showEvent(QShowEvent* theEvent) {
478 SUPERVGUI_Main* aMain = Supervision.getMain();
479 if (aMain && (!aMain->isArrayShown())) {
480 aMain->getGraph()->viewportToContents(0, 0, myX, myY);
482 QDialog::showEvent(theEvent);
486 void SUPERVGUI_Service::tabChanged(QWidget* theWidget) {
487 myIsInline = (myTabPane->currentPageIndex() == 1);
492 //*****************************************************
493 // Pane for Python script editing
494 //*****************************************************
495 SUPERVGUI_PythonEditPane::SUPERVGUI_PythonEditPane(QWidget* theParent)
499 QGridLayout* aEditLayout = new QGridLayout(this, 2, 4);
502 QPushButton* aLoadBtn = new QPushButton(tr("BUT_LOAD"), this);
503 connect(aLoadBtn, SIGNAL(clicked()), this, SLOT(loadFile()));
505 aEditLayout->addWidget(aLoadBtn, 0, 2);
507 myNextBtn = new QPushButton(tr("BUT_NEXT"), this);
508 myNextBtn->setEnabled(false);
509 connect(myNextBtn, SIGNAL(clicked()), this, SLOT(readFunction()));
511 aEditLayout->addWidget(myNextBtn, 0, 3);
514 myText = new QTextEdit(this);
515 myText->setWordWrap(QTextEdit::FixedColumnWidth);
516 myText->setWrapColumnOrWidth(80);
518 aEditLayout->addMultiCellWidget(myText, 1, 1, 0, 3);
523 * Load existing Python script
525 void SUPERVGUI_PythonEditPane::loadFile() {
526 QString aFileName = QAD_FileDlg::getFileName(QAD_Application::getDesktop(),
529 tr("TIT_LOADSCRIPT"),
531 if (aFileName.isEmpty()) return;
533 myFile = new QFile(aFileName);
534 if (!myFile->open(IO_ReadOnly)) {
535 QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"),
536 tr("MSG_CANT_LOADSCRIPT"));
539 myIStream = new QTextStream(myFile);
541 if (myIStream->atEnd()) {
542 QMessageBox::warning(QAD_Application::getDesktop(), tr("ERROR"),
543 tr("MSG_EMTY_FILE"));
544 myNextBtn->setEnabled(false);
551 myNextBtn->setEnabled(true);
557 * Finds and Reads a function from current position in the opened file
559 void SUPERVGUI_PythonEditPane::readFunction() {
560 if (!myIStream) return;
562 while (!myIStream->atEnd()) {
563 QString aLine = myIStream->readLine();
564 if (aLine.isNull()) return;
566 // find first function
567 int aDefPos = aLine.find("def");
568 if (aDefPos == 0) { // only not a class members
571 /*int aStart = aLine.find(" ", aDefPos);
572 int aEnd = aLine.find("(", aStart);
573 QString aName = aLine.mid(aStart, (aEnd-aStart));
574 aName = aName.stripWhiteSpace();
575 myNameEdt->setText(aName);*/
579 aEnd = aLine.find(")", aStart);
580 QString aParams = aLine.mid(aStart, (aEnd-aStart));
581 aParams = aParams.stripWhiteSpace();
582 myParamEdt->setText(aParams);*/
584 myText->append(aLine);
586 QString aBodyLine = myIStream->readLine();
587 while ((!aBodyLine.isNull()) && aBodyLine[0].isSpace()) {
588 myText->append(aBodyLine);
589 aBodyLine = myIStream->readLine();
594 QMessageBox::warning(QAD_Application::getDesktop(), tr("WARNING"),
595 tr("MSG_NOMORE_FUNCTIONS"));
598 myNextBtn->setEnabled(false);
604 QString SUPERVGUI_PythonEditPane::getFuncName() {
606 for (int i=0; i < myText->paragraphs(); i++) {
607 QString aLine = myText->text(i);
608 int aDefPos = aLine.find("def");
610 int aStart = aLine.find(" ", aDefPos);
611 int aEnd = aLine.find("(", aStart);
612 QString aName = aLine.mid(aStart, (aEnd-aStart));
613 return aName.stripWhiteSpace();
620 SUPERV_Strings SUPERVGUI_PythonEditPane::getFunction() {
621 SUPERV_Strings aStrings = new SUPERV::ListOfStrings();
622 aStrings->length(myText->paragraphs());
623 for (int i=0; i < myText->paragraphs(); i++) {
624 aStrings[i] = CORBA::string_dup(myText->text(i).latin1());
626 return aStrings._retn();
630 void SUPERVGUI_PythonEditPane::setFunction(SUPERV_Strings theStr) {
631 int aLen = theStr->length();
632 for (int i=0; i < aLen; i++)
633 myText->append(QString(theStr[i]));
641 SUPERVGUI_EditPythonDlg::SUPERVGUI_EditPythonDlg(bool isLoop)
642 :QDialog(QAD_Application::getDesktop(), 0, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
644 setSizeGripEnabled( true );
645 setCaption(tr("TIT_FUNC_PYTHON"));
647 QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 4);
649 QTabWidget* aLoopTabPane = new QTabWidget(this);
650 myInitPane = new SUPERVGUI_PythonEditPane(this);
651 aLoopTabPane->addTab(myInitPane, "Init");
653 myMorePane = new SUPERVGUI_PythonEditPane(this);
654 aLoopTabPane->addTab(myMorePane, "More");
656 myNextPane = new SUPERVGUI_PythonEditPane(this);
657 aLoopTabPane->addTab(myNextPane, "Next");
659 aMainLayout->addWidget(aLoopTabPane);
661 myEditPane = new SUPERVGUI_PythonEditPane(this);
662 aMainLayout->addWidget(myEditPane);
664 QGroupBox* aBtnBox = new QGroupBox( this );
665 aBtnBox->setColumnLayout( 0, Qt::Vertical );
666 aBtnBox->layout()->setSpacing( 0 ); aBtnBox->layout()->setMargin( 0 );
667 QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox->layout() );
668 aBtnLayout->setAlignment( Qt::AlignTop );
669 aBtnLayout->setSpacing( 6 ); aBtnLayout->setMargin( 11 );
671 QPushButton* aOKBtn = new QPushButton( tr( "BUT_OK" ), aBtnBox );
672 connect( aOKBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
673 aBtnLayout->addWidget( aOKBtn );
675 aBtnLayout->addStretch();
677 QPushButton* aCancelBtn = new QPushButton( tr("BUT_CANCEL"), aBtnBox );
678 connect( aCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
679 aBtnLayout->addWidget( aCancelBtn );
681 aMainLayout->addWidget(aBtnBox);