selectdialog.h
00001 /* 00002 This file is part of libkresources. 00003 00004 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> 00005 Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> 00006 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. 00022 */ 00023 00024 #ifndef KRESOURCES_SELECTDIALOG_H 00025 #define KRESOURCES_SELECTDIALOG_H 00026 00027 #include <qobject.h> 00028 #include <qptrlist.h> 00029 #include <qmap.h> 00030 00031 #include <kdialog.h> 00032 00033 class KListBox; 00034 00035 namespace KRES { 00036 00037 class Resource; 00038 00056 class KRESOURCES_EXPORT SelectDialog : KDialog 00057 { 00058 public: 00065 SelectDialog( QPtrList<Resource> list, QWidget *parent = 0, 00066 const char *name = 0); 00067 00071 Resource *resource(); 00072 00077 static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 ); 00078 00079 private: 00080 KListBox *mResourceId; 00081 00082 QMap<int, Resource*> mResourceMap; 00083 }; 00084 00085 } 00086 00087 #endif