2 * This file is part of the KDE Help Center
4 * Copyright (C) 1999 Matthias Elter (me@kde.org)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef __navigator_h__
22 #define __navigator_h__
26 #include <k3listview.h>
30 #include <QTextStream>
32 #include <Qt3Support/Q3PtrList>
34 #include <Qt3Support/Q3CheckListItem>
35 #include <Qt3Support/Q3Dict>
55 class Navigator
: public QWidget
59 explicit Navigator(View
*, QWidget
*parent
=0, const char *name
=0);
64 SearchEngine
*searchEngine() const;
65 Formatter
*formatter() const;
67 const GlossaryEntry
&glossEntry(const QString
&term
) const { return mGlossaryTree
->entry( term
); }
69 void insertParentAppDocs( const QString
&name
, NavigatorItem
*parent
);
70 NavigatorItem
*insertScrollKeeperDocs( NavigatorItem
*parentItem
,
71 NavigatorItem
*after
);
72 void insertInfoDocs( NavigatorItem
*parentItem
);
73 void insertKCMDocs(const QString
&, NavigatorItem
*parent
, const QString
&);
74 void insertIOSlaveDocs(const QString
&, NavigatorItem
*parent
);
76 void createItemFromDesktopFile( NavigatorItem
*item
, const QString
&name
);
78 bool showMissingDocs() const;
80 void clearSelection();
82 void showOverview( NavigatorItem
*item
, const KUrl
&url
);
88 void openInternalUrl( const KUrl
&url
);
89 void slotItemSelected(Q3ListViewItem
* index
);
91 void slotShowSearchResult( const QString
& );
92 void slotSelectGlossEntry( const QString
&id
);
93 void selectItem( const KUrl
&url
);
94 void showIndexDialog();
97 void itemSelected(const QString
& itemURL
);
98 void glossSelected(const GlossaryEntry
&entry
);
101 void slotSearchFinished();
102 void slotTabChanged( QWidget
* );
103 void checkSearchButton();
105 bool checkSearchIndex();
110 QString
createChildrenList( Q3ListViewItem
*child
);
113 void setupContentsTab();
114 void setupIndexTab();
115 void setupSearchTab();
116 void setupGlossaryTab();
118 void insertPlugins();
121 K3ListView
*mContentsTree
;
122 Glossary
*mGlossaryTree
;
124 SearchWidget
*mSearchWidget
;
125 KCMHelpCenter
*mIndexDialog
;
127 QTabWidget
*mTabWidget
;
129 QFrame
*mSearchFrame
;
130 KLineEdit
*mSearchEdit
;
131 QPushButton
*mSearchButton
;
133 bool mShowMissingDocs
;
135 SearchEngine
*mSearchEngine
;