/****************************************************************************
** Form implementation generated from reading ui file 'DlgAtcd_txt.ui'
**
** Created: mer nov 19 01:41:14 2008
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "DlgAtcd_txt.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qframe.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "DlgAtcd_txt.ui.h"

/*
 *  Constructs a DlgAtcd_txt as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
DlgAtcd_txt::DlgAtcd_txt( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setProperty( "name", "DlgAtcd_txt" );
    DlgAtcd_txtLayout = new QGridLayout( this, 1, 1, 11, 6, "DlgAtcd_txtLayout"); 

    lbl_Titre = new QLabel( this, "lbl_Titre" );
    lbl_Titre->setProperty( "maximumSize", QSize( 32767, 22 ) );
    lbl_Titre->setProperty( "alignment", int( QLabel::WordBreak | QLabel::AlignCenter ) );

    DlgAtcd_txtLayout->addMultiCellWidget( lbl_Titre, 0, 0, 0, 3 );

    line1 = new QFrame( this, "line1" );
    line1->setProperty( "frameShape", "HLine" );
    line1->setProperty( "frameShadow", "Sunken" );
    line1->setProperty( "frameShape", QFrame::VLine );

    DlgAtcd_txtLayout->addMultiCellWidget( line1, 1, 1, 0, 3 );

    m_LineEdit_Libelle = new QLineEdit( this, "m_LineEdit_Libelle" );

    DlgAtcd_txtLayout->addMultiCellWidget( m_LineEdit_Libelle, 2, 2, 1, 3 );

    textLabel2 = new QLabel( this, "textLabel2" );

    DlgAtcd_txtLayout->addWidget( textLabel2, 2, 0 );

    textLabel3 = new QLabel( this, "textLabel3" );
    textLabel3->setProperty( "scaledContents", QVariant( TRUE, 0 ) );

    DlgAtcd_txtLayout->addWidget( textLabel3, 3, 0 );

    layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 
    spacer1 = new QSpacerItem( 431, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer1 );

    but_Valider = new QPushButton( this, "but_Valider" );
    layout2->addWidget( but_Valider );

    but_Annuler = new QPushButton( this, "but_Annuler" );
    layout2->addWidget( but_Annuler );

    DlgAtcd_txtLayout->addMultiCellLayout( layout2, 8, 8, 0, 3 );

    textLabel5 = new QLabel( this, "textLabel5" );

    DlgAtcd_txtLayout->addWidget( textLabel5, 7, 0 );

    m_LineEdit_Commentaire = new QLineEdit( this, "m_LineEdit_Commentaire" );

    DlgAtcd_txtLayout->addMultiCellWidget( m_LineEdit_Commentaire, 7, 7, 1, 3 );

    textLabel4 = new QLabel( this, "textLabel4" );

    DlgAtcd_txtLayout->addWidget( textLabel4, 5, 0 );

    m_Combo_Medical = new QComboBox( FALSE, this, "m_Combo_Medical" );

    DlgAtcd_txtLayout->addMultiCellWidget( m_Combo_Medical, 3, 3, 1, 3 );

    m_Combo_Chirurgical = new QComboBox( FALSE, this, "m_Combo_Chirurgical" );

    DlgAtcd_txtLayout->addMultiCellWidget( m_Combo_Chirurgical, 4, 4, 1, 3 );

    jour = new QComboBox( FALSE, this, "jour" );
    jour->setProperty( "enabled", QVariant( FALSE, 0 ) );

    DlgAtcd_txtLayout->addWidget( jour, 6, 1 );

    annee = new QComboBox( FALSE, this, "annee" );
    annee->setProperty( "enabled", QVariant( FALSE, 0 ) );

    DlgAtcd_txtLayout->addWidget( annee, 6, 3 );

    mois = new QComboBox( FALSE, this, "mois" );
    mois->setProperty( "enabled", QVariant( FALSE, 0 ) );
    mois->setProperty( "sizeLimit", 12 );
    mois->setProperty( "insertionPolicy", "NoInsertion" );

    DlgAtcd_txtLayout->addWidget( mois, 6, 2 );

    chkDate = new QCheckBox( this, "chkDate" );

    DlgAtcd_txtLayout->addMultiCellWidget( chkDate, 5, 5, 1, 3 );
    languageChange();
    resize( QSize(617, 324).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( annee, SIGNAL( activated(int) ), this, SLOT( annee_activated(int) ) );
    connect( mois, SIGNAL( activated(int) ), this, SLOT( mois_activated(int) ) );
    connect( but_Valider, SIGNAL( clicked() ), this, SLOT( but_Valider_clicked() ) );
    connect( but_Annuler, SIGNAL( clicked() ), this, SLOT( but_Annuler_clicked() ) );
    connect( m_Combo_Medical, SIGNAL( activated(int) ), this, SLOT( m_Combo_Medical_activated(int) ) );
    connect( m_Combo_Chirurgical, SIGNAL( activated(int) ), this, SLOT( m_Combo_Chirurgical_activated(int) ) );
    connect( chkDate, SIGNAL( clicked() ), this, SLOT( chkDate_clicked() ) );
    init();
}

/*
 *  Destroys the object and frees any allocated resources
 */
DlgAtcd_txt::~DlgAtcd_txt()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DlgAtcd_txt::languageChange()
{
    setProperty( "caption", trUtf8( "\x41\x6a\x6f\x75\x74\x65\x72\x20\x75\x6e\x20\x61\x6e\x74\xc3\xa9\x63\xc3\xa9\x64\x65\x6e\x74\x20\x65\x6e\x20\x6d\x6f\x64\x65\x20\x74\x65\x78\x74\x65" ) );
    lbl_Titre->setProperty( "text", trUtf8( "\x3c\x62\x3e\x41\x6a\x6f\x75\x74\x65\x72\x20\x75\x6e\x20\x61\x6e\x74\xc3\xa9\x63\xc3\xa9\x64\x65\x6e\x74\x20\x65\x6e\x20\x6d\x6f\x64\x65\x20\x74\x65\x78\x74\x65\x3c\x2f\x62\x3e" ) );
    textLabel2->setProperty( "text", trUtf8( "\x4c\x69\x62\x65\x6c\x6c\xc3\xa9\x20\x64\x65\x20\x6c\x27\x61\x6e\x74\xc3\xa9\x63\xc3\xa9\x64\x65\x6e\x74" ) );
    textLabel3->setProperty( "text", trUtf8( "\x52\x75\x62\x72\x69\x71\x75\x65\x20\x64\x65\x20\x6c\x27\x61\x6e\x74\xc3\xa9\x63\xc3\xa9\x64\x65\x6e\x74" ) );
    but_Valider->setProperty( "text", tr( "Valider" ) );
    but_Annuler->setProperty( "text", tr( "Annuler" ) );
    textLabel5->setProperty( "text", tr( "Commentaire" ) );
    textLabel4->setProperty( "text", trUtf8( "\x44\x61\x74\x65\x20\x64\x65\x20\x6c\x27\x61\x6e\x74\xc3\xa9\x63\xc3\xa9\x64\x65\x6e\x74" ) );
    mois->clear();
    mois->insertItem( tr( "Janvier" ) );
    mois->insertItem( trUtf8( "\x46\xc3\xa9\x76\x72\x69\x65\x72" ) );
    mois->insertItem( tr( "Mars" ) );
    mois->insertItem( tr( "Avril" ) );
    mois->insertItem( tr( "Mai" ) );
    mois->insertItem( tr( "Juin" ) );
    mois->insertItem( tr( "Juillet" ) );
    mois->insertItem( trUtf8( "\x41\x6f\xc3\xbb\x74" ) );
    mois->insertItem( tr( "Septembre" ) );
    mois->insertItem( tr( "Octobre" ) );
    mois->insertItem( tr( "Novembre" ) );
    mois->insertItem( trUtf8( "\x44\xc3\xa9\x63\x65\x6d\x62\x72\x65" ) );
    chkDate->setProperty( "text", tr( "La date est connue" ) );
}

