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

#ifndef DIALOGFONT_H
#define DIALOGFONT_H

#include "uidialogfont.h"

class DialogFont : public uiDialogFont
{
  Q_OBJECT
public:
   DialogFont ( QWidget *p, const char * n=0, WFlags f=0 );
  ~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
