/***********************************************************************
**
**   translationlist.h
**
**   This file is part of KFLog2.
**
************************************************************************
**
**   Copyright (c):  2001 by Harald Maier
**
**   This file is distributed under the terms of the General Public
**   Licence. See the file COPYING for more information.
**
**   $Id: translationlist.h,v 1.2 2003/03/25 21:59:10 eggert Exp $
**
***********************************************************************/

#ifndef TRANSLATIONLIST_H
#define TRANSLATIONLIST_H

#include "translationelement.h"

#include <qlist.h>
#include <qintdict.h>

/**
  *@author Harald Maier
  */

typedef QList<TranslationElement> TranslationListBase;

class TranslationList : public TranslationListBase {
public: 
	TranslationList();
	~TranslationList();
  /** No descriptions */
  void append(const TranslationElement *item);
  /** return index by ID */
  int idxById(int id);
  /** return a transaltion element item by given id */
  TranslationElement *itemById(int id);
protected:
  virtual int compareItems(QCollection::Item e1, QCollection::Item e2);
private: // Private attributes
  /** index list elements by id */
  QIntDict<TranslationElement> idIndex;
};

#endif
