Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

swordoptionlist.h

Go to the documentation of this file.
00001 /*
00002 Dagger - A Bible study program utilizing the Sword library.
00003 Copyright (c) 2004 Dan Williams <drw@handhelds.org>
00004 
00005 This file is free software; you can redistribute it and/or modify it under
00006 the terms of the GNU General Public License as published by the Free Software
00007 Foundation; either version 2 of the License, or (at your option) any later version.
00008 
00009 This file is distributed in the hope that it will be useful, but WITHOUT ANY
00010 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00011 PARTICULAR PURPOSE. See the GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with this
00014 file; see the file COPYING. If not, write to the Free Software Foundation, Inc.,
00015 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00016 */
00017 
00018 #ifndef SWORDOPTIONLIST_H
00019 #define SWORDOPTIONLIST_H
00020 
00021 #include <qaction.h>
00022 #include <qlist.h>
00023 
00024 class SwordOptionList : public QList<QAction>
00025 {
00026 private:
00027 
00028     int compareItems( QCollection::Item item1, QCollection::Item item2 )
00029     {
00030         // Sort by QAction text
00031         QString act1 = reinterpret_cast<QAction*>(item1)->text();
00032         QString act2 = reinterpret_cast<QAction*>(item2)->text();
00033         if ( act1 < act2 )
00034             return -1;
00035         else if ( act1 == act2 )
00036             return 0;
00037         else
00038             return 1;
00039     }
00040 };
00041 
00042 typedef QListIterator<QAction> SwordOptionListIterator;
00043 
00044 #endif

Generated on Sat Nov 5 16:16:48 2005 for OPIE by  doxygen 1.4.2