~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to parts/doxygen/doxygenpart.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2001 by Bernd Gehrmann                                  *
 
3
 *   bernd@kdevelop.org                                                    *
 
4
 *   Copyright (C) 2004 by Jonas Jacobi                                    *
 
5
 *   jonas.jacobi@web.de                                                   *
 
6
 *                                                                         *
 
7
 *   This program is free software; you can redistribute it and/or modify  *
 
8
 *   it under the terms of the GNU General Public License as published by  *
 
9
 *   the Free Software Foundation; either version 2 of the License, or     *
 
10
 *   (at your option) any later version.                                   *
 
11
 *                                                                         *
 
12
 ***************************************************************************/
 
13
 
 
14
#ifndef _DOXYGENPART_H_
 
15
#define _DOXYGENPART_H_
 
16
 
 
17
#include <qguardedptr.h>
 
18
#include <kdialogbase.h>
 
19
#include <kprocess.h>
 
20
#include <ktempdir.h>
 
21
#include <qstring.h>
 
22
 
 
23
#include "kdevplugin.h"
 
24
 
 
25
class DoxygenDialog;
 
26
class QPopupMenu;
 
27
class Context;
 
28
class KAction;
 
29
class KDialogBase;
 
30
class ConfigWidgetProxy;
 
31
 
 
32
namespace KParts{
 
33
    class Part;
 
34
}
 
35
namespace KTextEditor{
 
36
    class ViewCursorInterface;
 
37
    class EditInterface;
 
38
}
 
39
 
 
40
class DoxygenPart : public KDevPlugin
 
41
{
 
42
    Q_OBJECT
 
43
 
 
44
public:
 
45
    DoxygenPart( QObject *parent, const char *name, const QStringList & );
 
46
    ~DoxygenPart();
 
47
 
 
48
private slots:
 
49
    /**
 
50
     * Configuration dialog under "Project Options..." that alows
 
51
     * to specify doxygen configuration options and store them to
 
52
     * a configuration file. The file name is "Doxyfile" and it's stored
 
53
     * in the project root.
 
54
     */
 
55
//    void projectConfigWidget(KDialogBase *dlg);
 
56
        void insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int );
 
57
 
 
58
    /** run doxygen to generate API documentation */
 
59
    void slotDoxygen();
 
60
 
 
61
    /** clean the html API docs (delete the generated html files) */
 
62
    void slotDoxClean();
 
63
 
 
64
    /**
 
65
     * Gets called, when the Doxygen process for previewing is finished
 
66
     * and shows its output then.
 
67
     */
 
68
    void slotPreviewProcessExited();
 
69
 
 
70
    /**
 
71
      * If the current part is KTextEditor::Document, run Doxygen over it.
 
72
      * When the process exited slotPreviewProcessExited gets called.
 
73
      */
 
74
    void slotRunPreview();
 
75
 
 
76
    /**
 
77
     * Gets called when the currently active part changed.
 
78
     *  When the new part is a KTextEditor::Document the filepath gets
 
79
     * internally stored and gets processed if slotRunPreview() is called.
 
80
     * @see KTextEditor::Document
 
81
     */
 
82
    void slotActivePartChanged(KParts::Part*);
 
83
 
 
84
    /**
 
85
     * Inserts a documentation template above a function declaration/definition.
 
86
     */
 
87
    void slotDocumentFunction();
 
88
 
 
89
 
 
90
private:
 
91
 
 
92
    /**
 
93
     * If a Doxygen configuration file doesn't exist, create one.
 
94
     * And copy some of the project settings to it.
 
95
     */
 
96
    void adjustDoxyfile();
 
97
 
 
98
    DoxygenDialog *m_dialog;
 
99
        ConfigWidgetProxy * _configProxy;
 
100
 
 
101
    //needed for doxygen preview
 
102
    KProcess m_process;
 
103
    QString m_file;
 
104
    KTempDir m_tmpDir;
 
105
    KAction* m_action;
 
106
 
 
107
    //needed for documentFunction
 
108
    KAction* m_actionDocumentFunction;
 
109
    KAction* m_actionPreview;
 
110
    KTextEditor::EditInterface* m_activeEditor;
 
111
    KTextEditor::ViewCursorInterface* m_cursor;
 
112
};
 
113
 
 
114
#endif