Qt < 4.5 had a bug in the layout of QAbstractScrollArea's scrollbars,
[kdelibs.git] / kdoctools / kio_help.h
blob29d5fc7408b0c9b38bf762c3ca2457c73aed2b2b
1 #ifndef __help_h__
2 #define __help_h__
4 /* This file is part of the KDE libraries
5 Copyright (C) 2000 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
6 Copyright (C) 2001 Stephan Kulow <coolo@kde.org>
7 Copyright (C) 2003 Cornelius Schumacher <schumacher@kde.org>
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA.
26 #include <sys/types.h>
27 #include <sys/stat.h>
30 #include <stdio.h>
31 #include <unistd.h>
34 #include <QtCore/QString>
37 #include <kio/global.h>
38 #include <kio/slavebase.h>
40 class HelpProtocol : public KIO::SlaveBase
42 public:
44 HelpProtocol( bool ghelp, const QByteArray &pool, const QByteArray &app);
45 virtual ~HelpProtocol() { }
47 virtual void get( const KUrl& url );
49 virtual void mimetype( const KUrl& url );
51 private:
53 QString langLookup(const QString &fname);
54 void emitFile( const KUrl &url );
55 void get_file( const KUrl& url );
56 QString lookupFile(const QString &fname, const QString &query,
57 bool &redirect);
59 void unicodeError( const QString &t );
61 QString mParsed;
62 bool mGhelp;
66 #endif