5 #include "Utils_ORB_INIT.hxx"
6 #include "Utils_SINGLETON.hxx"
9 #include "SALOME_Selection.h"
10 #include "SALOME_InteractiveObject.hxx"
11 #include "SALOMEGUI_QtCatchCorbaException.hxx"
13 #include "QAD_MessageBox.h"
14 //#include "QAD_Tools.h"
15 //#include "QAD_FileDlg.h"
17 //#include "SMESH_TypeFilter.hxx"
20 #include <qinputdialog.h>
21 #include <qmessagebox.h>
24 HELLO_ORB::HELLO_Gen_ptr HELLOGUI::InitHELLOGen(QAD_Desktop* parent)
26 Engines::Component_var comp =
27 parent->getEngine("FactoryServer", "HELLO");
28 HELLO_ORB::HELLO_Gen_ptr clr = HELLO_ORB::HELLO_Gen::_narrow(comp);
29 ASSERT(!CORBA::is_nil(clr));
35 bool HELLOGUI::OnGUIEvent (int theCommandID, QAD_Desktop* parent)
37 MESSAGE("HELLOGUI::OnGUIEvent");
39 QAD_Study* myActiveStudy = parent->getActiveStudy();
47 MESSAGE("command " << theCommandID << " activated");
49 QString myStudyName = myActiveStudy->getTitle();
50 int myStudyId = myActiveStudy->getStudyId();
55 //meshName = QInputDialog::getText( "Saisie du Prénom", "Please, Enter your name",
56 meshName = QInputDialog::getText( tr("QUE_HELLO_LABEL"), tr("QUE_HELLO_NAME"),
60 if ( ! meshName.isEmpty())
62 HELLO_ORB::HELLO_Gen_ptr hellogen = HELLOGUI::InitHELLOGen(parent);
63 QString banner = hellogen->makeBanner(meshName);
64 QMessageBox::about( parent, tr("INF_HELLO_BANNER"), banner);
66 // QAD_MessageBox::warn1 ((QWidget*)QAD_Application::getDesktop(),
67 // Object::tr("WRN_WARNING"),
68 // QObject::tr("WRN_STUDY_LOCKED"),
69 // QObject::tr("BUT_OK"));
83 bool HELLOGUI::SetSettings (QAD_Desktop* parent)
85 MESSAGE("HELLOGUI::SetSettings");
90 bool HELLOGUI::CustomPopup ( QAD_Desktop* parent,
92 const QString & theContext,
93 const QString & theParent,
94 const QString & theObject )
96 MESSAGE("HELLOGUI::CustomPopup");
100 void HELLOGUI::ActiveStudyChanged( QAD_Desktop* parent )
102 MESSAGE("HELLOGUI::ActiveStudyChanged");
105 void HELLOGUI::DefinePopup( QString & theContext, QString & theParent, QString & theObject )
107 MESSAGE("HELLOGUI::DefinePopup");
117 bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
119 return HELLOGUI::OnGUIEvent(theCommandID, parent);
123 bool SetSettings ( QAD_Desktop* parent )
125 return HELLOGUI::SetSettings( parent );
128 bool customPopup ( QAD_Desktop* parent,
130 const QString & theContext,
131 const QString & theParent,
132 const QString & theObject )
134 return HELLOGUI::CustomPopup( parent, popup, theContext,
135 theParent, theObject );
138 void definePopup ( QString & theContext, QString & theParent, QString & theObject )
140 HELLOGUI::DefinePopup( theContext, theParent, theObject );
143 bool activeStudyChanged ( QAD_Desktop* parent )
145 HELLOGUI::ActiveStudyChanged( parent );