/*****************************************************************************
 ** Class DialogFont
 **
 **   Created : 
 **        by : Varol Okan
 ** Copyright : (c) Varol Okan
 **   License : GPL v 2.0
 **
 *****************************************************************************/

#ifndef DIALOGFONT_H
#define DIALOGFONT_H

//#include "uidialogfont.h"	//ooo
#include "ui_uidialogfont.h"	//xxx

//class DialogFont : public uiDialogFont			//ooo
class DialogFont : public QDialog, public Ui::uiDialogFont	//xxx
{
  Q_OBJECT
public:
   //DialogFont ( QWidget *p, const char * n=0, Qt::WFlags f=0 );	//ooo
   DialogFont ( QWidget *pParent );					//xxx
  ~DialogFont ( );

  void  initMe     ( QString );
  void  setTheFont ( QFont & );
  QFont &getFont   ( );
  void  setBackgroundColor ( const QRgb );
  void  setForegroundColor ( const QRgb );
  void  setBackgroundColor ( const QColor & );
  void  setForegroundColor ( const QColor & );
  QRgb  backgroundColor    ( );
  QRgb  foregroundColor    ( );

protected:
  void updateFont ( uint );
  int  findString ( QStringList &, QString );

protected slots:
  void slotFontFamilyChanged     ( int  );
  void slotFontStyleChanged      ( int  );
  void slotFontSizeChanged       ( int  );
  void slotBackgroundColor       (      );
  void slotFontColor             (      );
  void slotStrikethrough         ( bool );
  void slotUnderline             ( bool );
  void slotTransparencyChanged   ( int  );
  void slotBGTransparencyChanged ( int  );
  
protected:
  QFont	          m_qfFont;
  int             m_iAlignement;
  QColor          m_backgroundColor;
  unsigned char   m_iBackgroundTransparency;
  QColor          m_foregroundColor;
  unsigned char   m_iForegroundTransparency;

};
 
#endif // DIALOGFONT_H
