kmdi Library API Documentation

kmdilistiterator.h

00001 //---------------------------------------------------------------------------- 00002 // filename : kmdilistiterator.h 00003 //---------------------------------------------------------------------------- 00004 // Project : KDE MDI extension 00005 // 00006 // begin : 02/2000 by Massimo Morin 00007 // changes : 02/2000 by Falk Brettschneider to create an 00008 // - 06/2000 stand-alone Qt extension set of 00009 // classes and a Qt-based library 00010 // 2000-2003 maintained by the KDevelop project 00011 // 00012 // copyright : (C) 1999-2003 by Massimo Morin (mmorin@schedsys.com) 00013 // and 00014 // Falk Brettschneider 00015 // email : falkbr@kdevelop.org (Falk Brettschneider) 00016 //---------------------------------------------------------------------------- 00017 // 00018 //---------------------------------------------------------------------------- 00019 // 00020 // This program is free software; you can redistribute it and/or modify 00021 // it under the terms of the GNU Library General Public License as 00022 // published by the Free Software Foundation; either version 2 of the 00023 // License, or (at your option) any later version. 00024 // 00025 //---------------------------------------------------------------------------- 00026 00027 #ifndef _KMDILISTITERATOR_H_ 00028 #define _KMDILISTITERATOR_H_ 00029 00030 #include <kmdiiterator.h> 00031 00032 template<class I> class QPtrList; 00033 template<class I> class QPtrListIterator; 00034 00035 template <class Item> 00036 class KMdiListIterator : public KMdiIterator<Item*> { 00037 public: 00038 KMdiListIterator(QPtrList<Item>& list) { 00039 m_iterator = new QPtrListIterator<Item>(list); 00040 } 00041 00042 virtual void first() { 00043 m_iterator->toFirst(); 00044 } 00045 virtual void last() { 00046 m_iterator->toLast(); 00047 } 00048 virtual void next() { ++(*m_iterator); } 00049 virtual void prev() { --(*m_iterator); } 00050 virtual bool isDone() const { return m_iterator->current() == NULL; } 00051 virtual Item* currentItem() const { return m_iterator->current(); } 00052 00053 virtual ~KMdiListIterator() { 00054 delete m_iterator; 00055 } 00056 00057 private: 00058 QPtrListIterator<Item> *m_iterator; 00059 }; 00060 00061 #endif // _KMDILISTITERATOR_H_
KDE Logo
This file is part of the documentation for kmdi Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:50:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003