File indexing completed on 2024-05-12 16:39:38
0001 /* This file is part of the KDE project 0002 Copyright (C) 2002, 2003 Lucijan Busch <lucijan@gmx.at> 0003 Copyright (C) 2005-2007 Jarosław Staniek <staniek@kde.org> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #include "kexipartitem.h" 0022 0023 namespace KexiPart 0024 { 0025 class Q_DECL_HIDDEN Item::Private 0026 { 0027 public: 0028 Private() { 0029 } 0030 int dummy; 0031 // unused for now 0032 }; 0033 } 0034 0035 //----------------------- 0036 0037 using namespace KexiPart; 0038 0039 Item::Item() 0040 : m_id(0) //- null 0041 , m_neverSaved(false) 0042 , d(new Private()) 0043 { 0044 } 0045 0046 Item::~Item() 0047 { 0048 delete d; 0049 } 0050 0051 //----------------------- 0052 0053 ItemDict::ItemDict() 0054 : QHash<int, KexiPart::Item*>() 0055 { 0056 } 0057 0058 ItemDict::~ItemDict() 0059 { 0060 } 0061 0062 //----------------------- 0063 0064 ItemList::ItemList() 0065 : QList<KexiPart::Item*>() 0066 { 0067 } 0068 0069 bool lessThan(KexiPart::Item* item1, KexiPart::Item* item2) 0070 { 0071 return item1->name() < item2->name(); 0072 } 0073 0074 void ItemList::sort() 0075 { 0076 std::sort(begin(), end(), lessThan); 0077 }