/********************************* CMDI_GroupedView.h ****************************
 *                                                                                *
 *   #include "CMDI_GroupedView.h"                                               *
 *   Project: MedinTux                                                            *
 *   Copyright (C) 2003 2004 2005 by Sevin Roland  and Data Medical Design        *
 *   E-Mail: data.medical.design@club-internet.fr                                 *
 *                                                                                *
 *   This program is free software; you can redistribute it and/or modify         *
 *   it under the terms of the CeCILL Version 1 du 21/06/2004                     *
 *   License (GPL compatible)                                                     *
 *                              http://www.cecill.info/                           *
 *   as published by :                                                            *
 *                                                                                *
 *   Commissariat à l'Energie Atomique                                            *
 *   - CEA,                                                                       *
 *                            31-33 rue de la Fédération, 75752 PARIS cedex 15.   *
 *                            FRANCE                                              *
 *   Centre National de la Recherche Scientifique                                 *
 *   - CNRS,                                                                      *
 *                            3 rue Michel-Ange, 75794 Paris cedex 16.            *
 *                            FRANCE                                              *
 *   Institut National de Recherche en Informatique et en Automatique             *
 *   - INRIA,                                                                     *
 *                            Domaine de Voluceau, Rocquencourt, BP 105, 78153    *
 *                            FRANCE                                              *
 *                                                                                *
 *         This program is distributed in the hope that it will be useful,        *
 *         but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 *         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                   *
 *         CeCILL  License (GPL compatible) for more details.                     *
 *                                                                                *
 **********************************************************************************/


#ifndef CMDI_GroupedView_H
#define CMDI_GroupedView_H

#include <qsplitter.h>
#include "CMDI_Generic.h"
#include "Rub_Centrale.h"
#include "Rub_Centrale_TTT.h"

//====================================== CMDI_GroupedView =======================================================
class CMDI_GroupedView: public CMDI_Generic
{
    Q_OBJECT
public:
	static  QString      S_GetRubName(){return QString("GroupedView");};
	static  int          S_GetType() {return 19840000;};      //TYP_GROUPEDVIEW    19840000

	CMDI_GroupedView( QWidget* parent, const char* name, int wflags , CMoteurBase *pCMoteurBase, RUBREC_LIST *pRubList,
                      const char* num_GUID, const char* id_doss,  const char* dossNom, const char* dossPrenom, const char* user);

	~CMDI_GroupedView();


	/////////////////////////////////////////////////////////
	/////////////////     METHODES       ////////////////////
	/////////////////////////////////////////////////////////

	int          		GetCurrent_RubList_ID();
	RUBREC_LIST::iterator 	Current_RubList_Iterator();
	int			initData();
	void			IfModified_SaveInRubList(void);
	int			SetCurentDocByPrimkey(const QString &pk);
	MyEditText*		GetCurrentEditor();
	void			SetInterfaceOnDroits(const QString &droits);
	void			AddNewDocument(	const QString &strData, int typ, const char *path =0, 
						const QDateTime *pQDateTime=0, const QString *libelle=0, const QString *subType=0);
	void			SetZoom(int zoom);
	void			setWordWrap(int width);
	void			ChangeCurrentComboBoxItemName(const QString &name);


	/////////////////////////////////////////////////////////
	/////////////////        SLOTS       ////////////////////
	/////////////////////////////////////////////////////////

public slots:
	void	RubOnUserChange(const char*user, const char*sign_user);
	void	OnIdentChange(	const char* num_GUID, const char* id_doss, 
				const char* dossNom,const char* dossPrenom );
	void	OnPrint(void);
	void	SetModifiableState(int state);
	void	Slot_ExeCommand(QString &command);
	void	Slot_Get_Custom_Menu(const QString &, QString&, QString &, QKeySequence &);
	void	Slot_ChangeViewToRub( QString idRubList );


	/////////////////////////////////////////////////////////
	/////////////////      SIGNAUX       ////////////////////
	/////////////////////////////////////////////////////////

signals:
	void message(const QString&, int );
	void Sign_RubIsDeleted(const char* name);

	/////////////////////////////////////////////////////////
	/////////////////      DONNEES       ////////////////////
	/////////////////////////////////////////////////////////

public:
	int		m_CustomMenuRequestState;
	MyEditText*	m_pMyEditText;
	Rub_Centrale*	m_pRub_Centrale;
	QSplitter*	m_splitterVertical;
	QSplitter*	m_splitterVerticalImbrique;
	QSplitter*	m_splitterHorizontal;


private:

};
#endif

