2 This file is part of KHelpcenter.
4 Copyright (C) 2002 Cornelius Schumacher <schumacher@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (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 GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
21 #ifndef KCMHELPCENTER_H
22 #define KCMHELPCENTER_H
25 #include <ksharedconfig.h>
28 #include "scopeitem.h"
41 class HtmlSearchConfig
;
46 class IndexDirDialog
: public KDialog
50 IndexDirDialog( QWidget
*parent
);
54 void slotUrlChanged( const QString
&_url
);
56 KUrlRequester
*mIndexUrlRequester
;
59 class IndexProgressDialog
: public KDialog
63 IndexProgressDialog( QWidget
*parent
);
64 ~IndexProgressDialog();
66 void setTotalSteps( int );
67 void advanceProgress();
68 void setLabelText( const QString
& );
69 void setMinimumLabelWidth( int width
);
70 void setFinished( bool );
72 void appendLog( const QString
&text
);
87 QProgressBar
*mProgressBar
;
94 class KCMHelpCenter
: public KDialog
98 explicit KCMHelpCenter( KHC::SearchEngine
*, QWidget
*parent
= 0,
99 const char *name
= 0 );
109 void searchIndexUpdated();
111 void slotIndexError( const QString
& );
112 void slotIndexProgress();
115 void cancelBuildIndex();
116 void slotIndexFinished( int exitCode
, QProcess::ExitStatus exitStatus
);
117 void slotReceivedStdout();
118 void slotReceivedStderr();
119 void slotProgressClosed();
123 void showIndexDirDialog();
125 void checkSelection();
128 void setupMainWidget( QWidget
*parent
);
130 void startIndexProcess();
132 void deleteProcess();
133 void deleteCmdFile();
135 void advanceProgress();
138 KHC::SearchEngine
*mEngine
;
140 K3ListView
*mListView
;
141 QLabel
*mIndexDirLabel
;
142 QPushButton
*mBuildButton
;
143 IndexProgressDialog
*mProgressDialog
;
145 QList
<KHC::DocEntry
*> mIndexQueue
;
146 QList
<KHC::DocEntry
*>::ConstIterator mCurrentEntry
;
148 KSharedConfigPtr mConfig
;
150 KAboutData
*mAboutData
;
152 KHC::HtmlSearchConfig
*mHtmlSearchTab
;
155 KTemporaryFile
*mCmdFile
;