/****************************************************************************
** Form implementation generated from reading ui file 'Dlg_PermsDefine.ui'
**
** Created: Tue Jun 9 19:16:06 2009
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "Dlg_PermsDefine.h"

#include <qvariant.h>
#include <qstringlist.h>
#include <qpushbutton.h>
#include <qheader.h>
#include <qlistview.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "CApp.h"
#include "../../drtux/src/CMoteur_Base.h"
#include "Dlg_PermsDefine.ui.h"

/*
 *  Constructs a Dlg_PermsDefine 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.
 */
Dlg_PermsDefine::Dlg_PermsDefine( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setProperty( "name", "Dlg_PermsDefine" );
    QFont f( font() );
    f.setPointSize( 9 );
    setFont( f ); 
    Dlg_PermsDefineLayout = new QGridLayout( this, 1, 1, 11, 6, "Dlg_PermsDefineLayout"); 

    pushButtonAnnuler = new QPushButton( this, "pushButtonAnnuler" );

    Dlg_PermsDefineLayout->addWidget( pushButtonAnnuler, 2, 1 );

    pushButtonOk = new QPushButton( this, "pushButtonOk" );

    Dlg_PermsDefineLayout->addWidget( pushButtonOk, 2, 0 );

    listViewPermsList = new QListView( this, "listViewPermsList" );
    listViewPermsList->addColumn( QString::null );
    listViewPermsList->addColumn( trUtf8( "\x4c\x69\x62\x65\x6c\x6c\xc3\xa9" ) );
    listViewPermsList->addColumn( tr( "Code" ) );
    listViewPermsList->addColumn( tr( "Flag" ) );
    listViewPermsList->setProperty( "allColumnsShowFocus", QVariant( TRUE, 0 ) );

    Dlg_PermsDefineLayout->addMultiCellWidget( listViewPermsList, 1, 1, 0, 1 );

    layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); 

    pushButtonAllErase = new QPushButton( this, "pushButtonAllErase" );
    layout1->addWidget( pushButtonAllErase );

    pushButtonAllSelect = new QPushButton( this, "pushButtonAllSelect" );
    layout1->addWidget( pushButtonAllSelect );

    Dlg_PermsDefineLayout->addMultiCellLayout( layout1, 0, 0, 0, 1 );
    languageChange();
    resize( QSize(308, 375).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushButtonOk, SIGNAL( clicked() ), this, SLOT( pushButtonOk_clicked() ) );
    connect( pushButtonAnnuler, SIGNAL( clicked() ), this, SLOT( pushButtonAnnuler_clicked() ) );
    connect( listViewPermsList, SIGNAL( clicked(QListViewItem*,const QPoint&,int) ), this, SLOT( listViewPermsList_clicked(QListViewItem*,const QPoint&,int) ) );
    connect( pushButtonAllErase, SIGNAL( clicked() ), this, SLOT( pushButtonAllErase_clicked() ) );
    connect( pushButtonAllSelect, SIGNAL( clicked() ), this, SLOT( pushButtonAllSelect_clicked() ) );
    connect( listViewPermsList, SIGNAL( spacePressed(QListViewItem*) ), this, SLOT( listViewPermsList_spacePressed(QListViewItem*) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Dlg_PermsDefine::languageChange()
{
    setProperty( "caption", trUtf8( "\x44\xc3\xa9\x66\x69\x6e\x69\x74\x69\x6f\x6e\x20\x64\x65\x73\x20\x70\x65\x72\x6d\x69"
    "\x73\x73\x69\x6f\x6e\x73" ) );
    pushButtonAnnuler->setProperty( "text", tr( "&Annuler" ) );
    pushButtonAnnuler->setProperty( "accel", QKeySequence( tr( "Alt+A" ) ) );
    pushButtonOk->setProperty( "text", tr( "&Confirmer" ) );
    pushButtonOk->setProperty( "accel", QKeySequence( tr( "Alt+C" ) ) );
    listViewPermsList->header()->setLabel( 0, QString::null );
    listViewPermsList->header()->setLabel( 1, trUtf8( "\x4c\x69\x62\x65\x6c\x6c\xc3\xa9" ) );
    listViewPermsList->header()->setLabel( 2, tr( "Code" ) );
    listViewPermsList->header()->setLabel( 3, tr( "Flag" ) );
    pushButtonAllErase->setProperty( "text", tr( "&Tout effacer" ) );
    pushButtonAllErase->setProperty( "accel", QKeySequence( tr( "Alt+T" ) ) );
    pushButtonAllSelect->setProperty( "text", trUtf8( "\x54\x6f\x75\x74\x20\x26\x73\xc3\xa9\x6c\x65\x63\x74\x69\x6f\x6e\x6e\x65\x72" ) );
    pushButtonAllSelect->setProperty( "accel", QKeySequence( tr( "Alt+S" ) ) );
}

