/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/

//------------------------------- initDialog -------------------------------------
void DlgDateNom::initDialog(QString *date_time, QString *nom, QString *subType)  //1999-10-08 00:00:00
{*date_time += "                   "; 
 QDate  date ( atoi(date_time->mid(0,4)), 
               atoi(date_time->mid(5,2)), 
               atoi(date_time->mid(8,2)) 
             );
 QTime  time ( atoi(date_time->mid(11,2)),  // ( int h, int m, int s = 0, int ms = 0 )
               atoi(date_time->mid(14,2)), 
               atoi(date_time->mid(17,2)) 
             );
 dateTimeEdit1->dateEdit()->setDate (date );
 dateTimeEdit1->timeEdit()->setTime (time );
 lineEditNom->setText(*nom);
 lineEdit_SubType->setText(*subType);
 m_pDateTime = date_time;
 m_pNom      = nom;
 m_pSubType  = subType;
}

//------------------------------- pushButtonOK_clicked -------------------------------------
void DlgDateNom::pushButtonOK_clicked()
{ *m_pDateTime = dateTimeEdit1->dateEdit()->date().toString ("yyyy-MM-dd") + 
                 " " + 
		 dateTimeEdit1->timeEdit()->time().toString ("hh:mm:ss");
  *m_pNom      = lineEditNom->text();
  *m_pSubType  = lineEdit_SubType->text();
 accept();
}
