--- a/Orb/Doxygen/src/htmlhelp.cpp Fri Apr 23 20:47:58 2010 +0100
+++ b/Orb/Doxygen/src/htmlhelp.cpp Wed Aug 11 14:49:30 2010 +0100
@@ -2,7 +2,7 @@
*
*
*
- * Copyright (C) 1997-2008 by Dimitri van Heesch.
+ * Copyright (C) 1997-2010 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -24,6 +24,7 @@
#include <qdict.h>
#include <qregexp.h>
#include "qtextcodec.h"
+#include "sortdict.h"
#include "htmlhelp.h"
#include "config.h"
@@ -43,28 +44,15 @@
bool reversed;
};
-class IndexFieldList : public QList<IndexField>
+class IndexFieldSDict : public SDict<IndexField>
{
public:
+ IndexFieldSDict() : SDict<IndexField>(17) {}
+ ~IndexFieldSDict() {}
int compareItems(GCI item1, GCI item2)
{
return stricmp(((IndexField *)item1)->name,((IndexField *)item2)->name);
}
- ~IndexFieldList() {}
-};
-
-class IndexFieldListIterator : public QListIterator<IndexField>
-{
- public:
- IndexFieldListIterator( const IndexFieldList &list) :
- QListIterator<IndexField>(list) {}
-};
-
-class IndexFieldDict : public QDict<IndexField>
-{
- public:
- IndexFieldDict(int size) : QDict<IndexField>(size) {}
- ~IndexFieldDict() {}
};
/*! A helper class for HtmlHelp that manages a two level index in
@@ -80,22 +68,19 @@
bool hasLink,bool reversed);
void writeFields(QTextStream &t);
private:
- IndexFieldList *list;
- IndexFieldDict *dict;
+ IndexFieldSDict *dict;
};
/*! Constructs a new HtmlHelp index */
HtmlHelpIndex::HtmlHelpIndex()
{
- list = new IndexFieldList;
- dict = new IndexFieldDict(10007);
- list->setAutoDelete(TRUE);
+ dict = new IndexFieldSDict;
+ dict->setAutoDelete(TRUE);
}
/*! Destroys the HtmlHelp index */
HtmlHelpIndex::~HtmlHelpIndex()
{
- delete list;
delete dict;
}
@@ -132,8 +117,7 @@
f->anchor = anchor;
f->link = hasLink;
f->reversed = reversed;
- list->inSort(f);
- dict->insert(key,f);
+ dict->append(key,f);
}
}
@@ -165,7 +149,8 @@
*/
void HtmlHelpIndex::writeFields(QTextStream &t)
{
- IndexFieldListIterator ifli(*list);
+ dict->sort();
+ IndexFieldSDict::Iterator ifli(*dict);
IndexField *f;
QCString lastLevel1;
bool level2Started=FALSE;
@@ -506,9 +491,11 @@
s = indexFiles.next();
}
t << "tabs.css" << endl;
- t << "tab_b.gif" << endl;
- t << "tab_l.gif" << endl;
- t << "tab_r.gif" << endl;
+ t << "tab_a.png" << endl;
+ t << "tab_b.png" << endl;
+ t << "tab_h.png" << endl;
+ t << "tab_s.png" << endl;
+ t << "nav_h.png" << endl;
if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
{
t << "open.gif" << endl;