Salome HOME
6551164b5924fd2d7276add4e96387e95b589c1b
[modules/med.git] / src / MEDOP / gui / dialogs / DlgAlias.cxx
1 #include "DlgAlias.hxx"
2
3 #include <iostream>
4 using std::cout;
5 using std::endl;
6 #define LOG(msg) cout << "[XMED - DlgAlias]::"<< msg << endl;
7
8
9 DlgAlias::DlgAlias(QDialog *parent) : QDialog(parent)
10 {
11   ui.setupUi(this); // A faire en premier
12   
13   /*
14     Personnalisez vos widgets ici si nécessaire
15     Réalisez des connexions supplémentaires entre signaux et slots
16   */
17   
18   // The slots accept() and reject() are already connected to the
19   // buttonbox (inherited features) 
20 }
21
22 void DlgAlias::accept() {
23   if ( this->getAlias().isEmpty() ) {
24     LOG("accept(): the alias can't be void");
25   }
26   else {
27     QDialog::accept();
28   }
29 }
30
31 //void DlgAlias::reject() {
32 //  LOG("reject() is not implemented yet");
33 //}
34
35 void DlgAlias::setAlias(QString alias) {
36   ui.txtAlias->setText(alias);
37 }
38
39 QString DlgAlias::getAlias() {
40   return ui.txtAlias->text().trimmed();
41 }