/****************************************************************************
** Form implementation generated from reading ui file 'FormGlossaire.ui'
**
** Created: mer nov 19 01:38:59 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 "FormGlossaire.h"

#include <qvariant.h>
#include <qpoint.h>
#include <qtimer.h>
#include <../../MedinTuxTools/CW_EditText.h>
#include <qpushbutton.h>
#include <qsplitter.h>
#include <qheader.h>
#include <qlistview.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "CApp.h"
#include "drtux.h"
#include "FormGlossaire.ui.h"

/*
 *  Constructs a FormGlossaire as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
FormGlossaire::FormGlossaire( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "FormGlossaire" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    FormGlossaireLayout = new QGridLayout( this, 1, 1, 0, 0, "FormGlossaireLayout"); 

    layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3"); 

    pushButtonHome = new QPushButton( this, "pushButtonHome" );
    pushButtonHome->setMaximumSize( QSize( 32, 32 ) );

    layout3->addWidget( pushButtonHome, 0, 1 );

    pushButtonLocalise = new QPushButton( this, "pushButtonLocalise" );
    pushButtonLocalise->setMaximumSize( QSize( 32, 32 ) );

    layout3->addWidget( pushButtonLocalise, 0, 3 );
    spacer1 = new QSpacerItem( 80, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout3->addItem( spacer1, 0, 4 );

    pushButtonBack = new QPushButton( this, "pushButtonBack" );
    pushButtonBack->setMaximumSize( QSize( 32, 32 ) );

    layout3->addWidget( pushButtonBack, 0, 0 );

    pushButtonEdit = new QPushButton( this, "pushButtonEdit" );
    pushButtonEdit->setMaximumSize( QSize( 32, 32 ) );

    layout3->addWidget( pushButtonEdit, 0, 2 );

    FormGlossaireLayout->addLayout( layout3, 0, 0 );

    splitter2 = new QSplitter( this, "splitter2" );
    splitter2->setOrientation( QSplitter::Vertical );

    ListView_Glossaire = new QListView( splitter2, "ListView_Glossaire" );
    ListView_Glossaire->addColumn( tr( "            Navigation                                   " ) );
    ListView_Glossaire->addColumn( tr( "type" ) );
    ListView_Glossaire->setPaletteForegroundColor( QColor( 0, 0, 0 ) );
    ListView_Glossaire->setPaletteBackgroundColor( QColor( 250, 250, 250 ) );
    ListView_Glossaire->setAcceptDrops( TRUE );
    ListView_Glossaire->setFrameShape( QListView::StyledPanel );
    ListView_Glossaire->setFrameShadow( QListView::Sunken );
    ListView_Glossaire->setRootIsDecorated( FALSE );

    textEditView = new CW_EditText( splitter2, "textEditView" );

    FormGlossaireLayout->addWidget( splitter2, 1, 0 );
    languageChange();
    resize( QSize(331, 364).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( ListView_Glossaire, SIGNAL( clicked(QListViewItem*) ), this, SLOT( ListView_Glossaire_clicked(QListViewItem*) ) );
    connect( pushButtonBack, SIGNAL( clicked() ), this, SLOT( pushButtonBack_clicked() ) );
    connect( pushButtonHome, SIGNAL( clicked() ), this, SLOT( pushButtonHome_clicked() ) );
    connect( ListView_Glossaire, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( ListView_Glossaire_doubleClicked(QListViewItem*) ) );
    connect( ListView_Glossaire, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( ListView_Glossaire_returnPressed(QListViewItem*) ) );
    connect( ListView_Glossaire, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( ListView_Glossaire_selectionChanged(QListViewItem*) ) );
    connect( pushButtonEdit, SIGNAL( clicked() ), this, SLOT( pushButtonEdit_clicked() ) );
    connect( ListView_Glossaire, SIGNAL( contextMenuRequested(QListViewItem*,const QPoint&,int) ), this, SLOT( ListView_Glossaire_contextMenuRequested(QListViewItem*,const QPoint&,int) ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FormGlossaire::languageChange()
{
    setCaption( tr( "InvisibleStringFormGlossaire" ) );
    pushButtonHome->setText( QString::null );
    QToolTip::add( pushButtonHome, trUtf8( "\x41\x6c\x6c\x65\x72\x20\x61\x75\x20\x72\xc3\xa9\x70\x65\x72\x74\x6f\x69\x72\x65\x20\x72\x61\x63\x69\x6e\x65\x20\x64\x65\x73\x20\x64\x6f\x63\x75\x6d\x65\x6e\x74\x73" ) );
    pushButtonLocalise->setText( QString::null );
    QToolTip::add( pushButtonLocalise, trUtf8( "\x43\x68\x6f\x69\x73\x69\x72\x20\x75\x6e\x20\x72\xc3\xa9\x70\x65\x72\x74\x6f\x69\x72\x65\x20\x67\x6c\x6f\x73\x73\x61\x69\x72\x65" ) );
    pushButtonBack->setText( QString::null );
    QToolTip::add( pushButtonBack, trUtf8( "\x52\x65\x6d\x6f\x6e\x74\x65\x72\x20\x64\x27\x75\x6e\x20\x72\xc3\xa9\x70\x65\x72\x74\x6f\x69\x72\x65\x20\x65\x6e\x20\x61\x72\x72\x69\xc3\xa8\x72\x65" ) );
    pushButtonEdit->setText( QString::null );
    QToolTip::add( pushButtonEdit, tr( "Outils de modification des documents" ) );
    ListView_Glossaire->header()->setLabel( 0, tr( "            Navigation                                   " ) );
    ListView_Glossaire->header()->setLabel( 1, tr( "type" ) );
    ListView_Glossaire->clear();
    QListViewItem * item = new QListViewItem( ListView_Glossaire, 0 );
    item->setText( 0, tr( "Item" ) );

    QToolTip::add( ListView_Glossaire, tr( "Documents types (Bouton droit pour le menu contextuel)" ) );
}

