KDevelop API Documentation

documentation_part.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Alexander Dymo                                  *
00003  *   cloudtemple@mksat.net                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef __KDEVPART_DOCUMENTATION_H__
00021 #define __KDEVPART_DOCUMENTATION_H__
00022 
00023 #include <qguardedptr.h>
00024 #include <kdevplugin.h>
00025 
00026 
00027 class FindDocumentation;
00028 class DocumentationWidget;
00029 class IndexBox;
00030 class KConfig;
00031 class KDialogBase;
00032 class ConfigWidgetProxy;
00033 class DocumentationPlugin;
00034 class ProjectDocumentationPlugin;
00035 class KURL;
00036 class Context;
00037 class QPopupMenu;
00038 
00039 /*
00040  Please read the README.dox file for more info about this part
00041  */
00042 class DocumentationPart : public KDevPlugin
00043 {
00044     Q_OBJECT
00045 public:
00046     enum ContextFeature { Finder, IndexLookup, FullTextSearch, GotoMan, GotoInfo };
00047 
00048     DocumentationPart(QObject *parent, const char *name, const QStringList &);
00049     ~DocumentationPart();
00050     
00051     void emitIndexSelected(IndexBox *indexBox);
00052     void emitBookmarkLocation(const QString &title, const KURL &url);
00053     bool configure(int page = 0);
00054     
00055     bool hasContextFeature(ContextFeature feature);
00056     void setContextFeature(ContextFeature feature, bool b);
00057     
00058     bool isAssistantUsed() const;
00059     void setAssistantUsed(bool b);
00060 
00061 public slots:
00062     void lookInDocumentationIndex();
00063     void lookInDocumentationIndex(const QString &term);
00064     void contextLookInDocumentationIndex();
00065     void contextFindDocumentation();
00066     void findInDocumentation();
00067     void findInDocumentation(const QString &term);
00068     void searchInDocumentation();
00069     void searchInDocumentation(const QString &term);
00070     void contextSearchInDocumentation();
00071     void manPage();
00072     void manPage(const QString &term);
00073     void contextManPage();
00074     void infoPage();
00075     void infoPage(const QString &term);
00076     void contextInfoPage();
00077     void projectOpened();
00078     void projectClosed();
00079     
00080 signals:
00081     void indexSelected(IndexBox *indexBox);
00082     void bookmarkLocation(const QString &title, const KURL &url);
00083     
00084 protected:
00085     void loadDocumentationPlugins();
00086     KConfig *config();
00087     void setupActions();
00088     void loadSettings();
00089     void saveProjectDocumentationInfo();
00090     
00091     QCString startAssistant();
00092     void activateAssistantWindow(const QCString &ref);
00093     void callAssistant(const QCString &interface, const QCString &method);
00094     void callAssistant(const QCString &interface, const QCString &method, const QString &dataStr);
00095     
00096 protected slots:
00097     void insertConfigWidget(const KDialogBase *dlg, QWidget *page, unsigned int pageNo);
00098     void contextMenu(QPopupMenu *popup, const Context *context);
00099     
00100 private:
00101     QGuardedPtr<DocumentationWidget> m_widget;
00102     ConfigWidgetProxy *m_configProxy;
00103     
00104     QValueList<DocumentationPlugin*> m_plugins;
00105     ProjectDocumentationPlugin *m_projectDocumentationPlugin;
00106     ProjectDocumentationPlugin *m_userManualPlugin;
00107     
00108     QString m_contextStr;
00109     bool m_hasIndex;
00110     bool m_assistantUsed;
00111     
00112 friend class DocGlobalConfigWidget;
00113 friend class DocProjectConfigWidget;
00114 friend class SearchView;
00115 friend class FindDocumentation;
00116 };
00117 
00118 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:55 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003