/****************************************************************************
** Class DialogFilter
**
**   Created : Sun May 22 09:13:25 2009
**        by : Varol Okan, using Kate
** Copyright : (c) Varol Okan
**   License : GPL v 2.0
**
**
****************************************************************************/

#ifndef DIALOGALPHATRANS_H
#define DIALOGALPHATRANS_H

//#include <q3iconview.h>   //ooo
#include <QGraphicsView>        //xxx
//#include <q3valuelist.h>	//oxx
//Added by qt3to4:
#include <QPixmap>
#include <QListWidget>  //xxx

//#include "uidialoglibrary.h"		//ooo
#include "ui_uidialoglibrary.h"		//xxx

//class DialogAlphaTrans : public uiDialogLibrary			//ooo
class DialogAlphaTrans : public QDialog, public Ui::uiDialogLibrary	//xxx
{
  Q_OBJECT

protected:
    class FilterPart {
    public:
      //FilterPart ( Q3IconView *, QString );   //ooo
      FilterPart ( QListWidget *, QString );     //xxx
      //Q3IconView   *pIconView;    //ooo
      QListWidget   *pIconView;  //xxx
      QString      qsFilterPath;
    };

    //class Item : public Q3IconViewItem  { //ooo
    class Item : public QListWidgetItem  {  //xxx
    public:
      //Item ( Q3IconView *, const QString &, const QPixmap &, bool );  //ooo
      Item ( QListWidget *, const QString &, const QPixmap &, bool );    //xxx  
      void setChecked  ( bool );
      void toggleCheck ( );
      bool isChecked   ( );
      QString fileName ( );

    protected:
      virtual void calcRect ( const QString &s=QString::null );

    private:
      void refreshIcon ( );

    private:
      bool    m_bChecked;
      QString m_qsFileName;
      QPixmap m_pixmap;
    };

public:
           //DialogAlphaTrans ( QStringList &, QWidget *p=0, const char *n=NULL, bool m=FALSE, Qt::WFlags f=0 );	//ooo
	   DialogAlphaTrans ( QStringList &listEnabled, QWidget *pParent=0 );						//xxx
  virtual ~DialogAlphaTrans ( );

  bool isChecked ( QString & );
  void createTab ( QString, QString, QStringList & );

protected:
  void initMe ( );

protected slots:
  virtual void accept        ( );
  virtual void slotRefresh   ( );
  virtual void slotAfterInit ( );
  //virtual void slotClicked   ( int, Q3IconViewItem *, const QPoint & );   //ooo
  virtual void slotClicked   ( int, QListWidgetItem *, const QPoint & ); //xxx

protected:
  int m_iThumbSize;
  QList<FilterPart *> m_listFilter;		//oxx
  QStringList              m_listEnabled;
};

#endif // DIALOGALPHATRANS_H

