File indexing completed on 2024-12-22 04:17:21
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2007 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 #ifndef OBJECTLIST_H 0013 #define OBJECTLIST_H 0014 0015 #include <QList> 0016 #include <QStringList> 0017 0018 #include "rwlock.h" 0019 #include "sharedptr.h" 0020 0021 namespace Kst { 0022 0023 template<class T> 0024 class ObjectList : public QList<SharedPtr<T> > { 0025 0026 #if QT_VERSION < 0x040500 0027 public: 0028 void append(const SharedPtr<T>& ptr) { 0029 QList<SharedPtr<T> >::append(ptr); 0030 } 0031 void append(const ObjectList& list) { 0032 foreach(const SharedPtr<T>& ptr, list) { 0033 QList<SharedPtr<T> >::append(ptr); 0034 } 0035 } 0036 #endif 0037 0038 }; 0039 0040 } 0041 #endif 0042 0043 // vim: ts=2 sw=2 et