/*
 * ImageListView.h
 *
 * (c) 2002 by Thorsten Scheuermann <tscheuermann@gmx.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef _IMAGELISTVIEW_H
#define _IMAGELISTVIEW_H

#include <qlistview.h>

class ImageInfo;
class ImageSet;

class ImageListViewItem : public QListViewItem
{
public:
  ImageListViewItem(QListView *parent, ImageInfo *iInfo);
  ~ImageListViewItem();

  ImageInfo *imageInfo();

private:
  ImageInfo *info;
};

class ImageListView : public QListView
{
  Q_OBJECT

public:
  ImageListView(QWidget *parent = 0, const char *name = 0);
  ~ImageListView();

  void setImageSet(ImageSet *set);

signals:
  void fileSelected(ImageInfo *imgInfo);

public slots:
  void updateList();

protected:
  virtual void keyPressEvent(QKeyEvent *ke);

private slots:
  void itemClicked(QListViewItem *item);
  
private:
  ImageSet *imgSet;
};

#endif
