/****************************************************************************
** Form interface generated from reading ui file 'Wdg_User.ui'
**
** Created: Tue Jun 9 19:17:02 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!
****************************************************************************/

#ifndef WDG_USER_H
#define WDG_USER_H

#include <qvariant.h>
#include <qwidget.h>
#include <qtimer.h>
#include <qpopupmenu.h>
#include "CApp.h"

class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QPushButton;
class QLabel;
class QComboBox;
class QListView;
class QListViewItem;

class Wdg_User : public QWidget
{
    Q_OBJECT

public:
    Wdg_User( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
    ~Wdg_User();

    QPushButton* pushButtonEditUser;
    QLabel* textLabelMessage;
    QComboBox* comboBoxUserTyp;
    QPushButton* pushButtonSetDefault;
    QPushButton* pushButtonCPS;
    QListView* ListView_UserList;

    virtual QString InitComboBoxUserTyp();
    virtual QListViewItem * getSignUser();
    virtual QListViewItem * getSignUser( QListViewItem * pQListViewItem );
    virtual QListViewItem * getUserItem( const QString & user, const QString & sign_user );
    virtual QString GetSelectedUser();
    virtual QString DoPopupList( QStringList & list );

public slots:
    virtual void SetData();
    virtual void comboBoxUserTyp_activated( const QString & userQualite );
    virtual void setComboOnValue( QComboBox * pQComboBox, const QString & value );
    virtual void SetUnLogged();
    virtual void SetLogged();
    virtual void timerDone();
    virtual void SetUser( const char * user, const char * sign_user );
    virtual void SetUserItem( QListViewItem * pQListViewItem );
    virtual bool IsUserInList( const char * user );
    virtual void ListView_UserList_selectionChanged( QListViewItem * pQListViewItem );
    virtual void ListView_UserList_LineChanged( QListViewItem * pQListViewItem );
    virtual void RestaureOldUser();
    virtual void pushButtonEditUser_clicked();
    virtual void pushButtonCPS_clicked();
    virtual void pushButtonSetDefault_clicked();
    virtual void OnMenuActivated( int id );
    virtual void GetPopupItem();

signals:
    void Sign_UserSelected(QListViewItem*, QListViewItem*);
    void Sign_UserMustBeEdited();
    void Sign_CPS_IsClicked();
    void Sign_ComboUserTypClicked(const QString&);

protected:
    QGridLayout* Wdg_UserLayout;
    QHBoxLayout* layout2;

protected slots:
    virtual void languageChange();

private:
    QTimer *m_pQtimer;
    CMoteurBase *m_pCMoteurBase;
    QListViewItem *m_pQListViewLastSelectedItem;
    QListViewItem *m_pQListViewItemTmp;
    QPopupMenu *m_pQPopupMenu;
    QString m_RetPopupItem;
    QString m_CurrentPopupItem;

    void init();
    void destroy();

};

#endif // WDG_USER_H
