DoxygenPart Class Reference
Integrates Doxygen - http://www.doxygen.org into KDevelop. More...
#include <doxygenpart.h>
Inheritance diagram for DoxygenPart:


Public Member Functions | |
DoxygenPart (QObject *parent, const char *name, const QStringList &) | |
~DoxygenPart () | |
Private Slots | |
void | insertConfigWidget (const KDialogBase *dlg, QWidget *page, unsigned int) |
Configuration dialog under "Project Options..." that alows to specify doxygen configuration options and store them to a configuration file. | |
void | slotDoxygen () |
run doxygen to generate API documentation | |
void | slotDoxClean () |
clean the html API docs (delete the generated html files) | |
void | slotPreviewProcessExited () |
Gets called, when the Doxygen process for previewing is finished and shows its output then. | |
void | slotRunPreview () |
If the current part is KTextEditor::Document, run Doxygen over it. | |
void | slotActivePartChanged (KParts::Part *) |
Gets called when the currently active part changed. | |
void | slotDocumentFunction () |
Inserts a documentation template above a function declaration/definition. | |
Private Member Functions | |
void | adjustDoxyfile () |
If a Doxygen configuration file doesn't exist, create one. | |
Private Attributes | |
DoxygenDialog * | m_dialog |
ConfigWidgetProxy * | _configProxy |
KProcess | m_process |
QString | m_file |
KTempDir | m_tmpDir |
KAction * | m_action |
KAction * | m_actionDocumentFunction |
KAction * | m_actionPreview |
KTextEditor::EditInterface * | m_activeEditor |
KTextEditor::ViewCursorInterface * | m_cursor |
Detailed Description
Integrates Doxygen - http://www.doxygen.org into KDevelop.It allows you to call the Doxygen executable from a KDevelop menu. It integrates a GUI into the "KDevelop Project Configuration dialog" to configure Doxygen (it reads and writes Doxygen Compatible configuration files).
To update to a newer doxygen version:
- Merge over the config.h and config.cpp files from the addon/doxywizard/ directory in the doxygen sources. You'll need:
- GNU bison v1.34 or better
- GNU flex v2.5.4 or better
- Kompare from KDEsdk
to get the config.h and config.cpp files on this directory. You should also copy config.l if you'd like to do some debugging.$ ./configure --with-doxywizard && make
- To do the merge on config.cpp you should use:
$ kompare doxygen-location/addon/doxywizard/config.cpp kdevelop-location/parts/doxygen/config.cpp
- Be careful because doxygen uses the deprecated QList class while KDevelop uses the new QPtrList so you should not merge certain lines of code!!!
- Be careful because doxygen uses the deprecated QRegExp::match() method while KDevelop uses the new QRegExp::search() and QRegExp::matchedLength() mehtods instead so you should not merge certain lines of code!!!
- Be careful because KDevlop uses the QFile::encodeName() function and the original doxygen code doesn't. So do NOT delete the QFile::encodeName() calls.
- To do the merge on config.h you should use:
$ kompare doxygen-location/addon/doxywizard/config.h kdevelop-location/parts/doxygen/config.h
- Again, be careful because doxygen uses the deprecated QList class while KDevelop uses the new QPtrList so you should not merge certain lines of code!!!
- Copy over the file lang_cfg.h from the src/ directory in the doxygen sources.
- Add the new i18n strings to messages.cpp. To do so, run KDevelop and go to Project-> Project Options... -> Doxygen. Take a look at KDevelop' console output, it will warn you about the missing messages. Add them to messages.cpp file.
- Update version.cpp
- Add anything else you needed to do, to get it to compile, to the parts/doxygen/README.dox file.
Everything else we can customize for our look & feel.
- Feature(s):
- Call Doxygen executable from a KDevelop menu.
Configure Doxygen inside KDevelop.
Create a configuration file with correct ProjectName, Author, Version and location of source files whenever a new KDevelop project is created.
Automaticaly generate a Doxygen search database whenever the "search engine" option in Doxygen configuration is activated and you "Run Doxygen".
- Requirement(s):
- You need to install the Doxygen binaries in your machine. This part supports all versions up to the version stated on the version.cpp file. As usual it is recomended to use the latest version or at least >= 1.3.4.
It is recomended that you also install dot >= 1.8.7 (tool to generate graphical dependencies).
- Bug:
- doesn't resize the configuration GUI properly.
- F.A.Q.:
- Do I need to install Doxygen? Yes
Definition at line 40 of file doxygenpart.h.
Constructor & Destructor Documentation
|
|
|
Definition at line 106 of file doxygenpart.cpp. |
Member Function Documentation
|
If a Doxygen configuration file doesn't exist, create one. And copy some of the project settings to it. Definition at line 125 of file doxygenpart.cpp. References ConfigList::addValue(), Config::check(), Config::get(), KMessageBox::information(), ConfigList::init(), ConfigString::init(), Config::init(), Config::instance(), main(), KDevPlugin::mainWindow(), KDevPlugin::project(), KDevProject::projectDirectory(), KDevPlugin::projectDom(), ConfigString::setDefaultValue(), ConfigBool::setValueString(), and Config::writeTemplate(). Referenced by insertConfigWidget(), and slotDoxygen(). |
|
Configuration dialog under "Project Options..." that alows to specify doxygen configuration options and store them to a configuration file. The file name is "Doxyfile" and it's stored in the project root. Definition at line 111 of file doxygenpart.cpp. References adjustDoxyfile(), and KDevPlugin::project(). |
|
Gets called when the currently active part changed. When the new part is a KTextEditor::Document the filepath gets internally stored and gets processed if slotRunPreview() is called.
Definition at line 468 of file doxygenpart.cpp. References m_activeEditor, m_cursor, m_file, KURL::path(), KParts::ReadOnlyPart::url(), and KParts::Part::widget(). |
|
Inserts a documentation template above a function declaration/definition.
Definition at line 481 of file doxygenpart.cpp. References CodeModelUtils::allFunctionDefinitionsDetailed(), CodeModelUtils::allFunctions(), KDevPlugin::codeModel(), KTextEditor::ViewCursorInterface::cursorPosition(), file, CodeModel::fileByName(), FileDom, FunctionDefinitionDom, FunctionDefinitionList, FunctionDom, FunctionList, CodeModel::hasFile(), KTextEditor::EditInterface::insertText(), length(), m_activeEditor, m_cursor, m_file, KTextEditor::ViewCursorInterface::setCursorPosition(), text(), and KTextEditor::EditInterface::textLine(). |
|
clean the html API docs (delete the generated html files)
Definition at line 274 of file doxygenpart.cpp. References Config_getBool, Config_getString, kdDebug(), KDevPlugin::makeFrontend(), KDevPlugin::project(), KDevProject::projectDirectory(), KDevMakeFrontend::queueCommand(), and KShellProcess::quote(). |
|
run doxygen to generate API documentation
Definition at line 214 of file doxygenpart.cpp. References adjustDoxyfile(), Config_getBool, Config_getString, Config::convertStrToVal(), Config::get(), Config::init(), Config::instance(), kdDebug(), KDevPlugin::makeFrontend(), Config::parse(), KDevPlugin::project(), KDevProject::projectDirectory(), KDevMakeFrontend::queueCommand(), and KShellProcess::quote(). |
|
Gets called, when the Doxygen process for previewing is finished and shows its output then.
Definition at line 344 of file doxygenpart.cpp. References m_tmpDir, KTempDir::name(), KDevPlugin::partController(), and KDevPartController::showDocument(). |
|
If the current part is KTextEditor::Document, run Doxygen over it. When the process exited slotPreviewProcessExited gets called. Definition at line 349 of file doxygenpart.cpp. References Config::addList(), KProcess::clearArguments(), KMessageBox::error(), file, Config::get(), Config::instance(), KProcess::isRunning(), KProcess::kill(), m_file, m_process, m_tmpDir, main(), KDevPlugin::mainWindow(), KTempDir::name(), KDevPlugin::project(), KDevProject::projectDirectory(), KTempDir::setAutoDelete(), KProcess::start(), KTempDir::unlink(), ConfigList::valueRef(), ConfigString::valueRef(), KMessageBox::warningYesNo(), and Config::writeTemplate(). |
Member Data Documentation
|
Definition at line 99 of file doxygenpart.h. |
|
Definition at line 105 of file doxygenpart.h. |
|
Definition at line 108 of file doxygenpart.h. |
|
Definition at line 109 of file doxygenpart.h. |
|
Definition at line 110 of file doxygenpart.h. Referenced by slotActivePartChanged(), and slotDocumentFunction(). |
|
Definition at line 111 of file doxygenpart.h. Referenced by slotActivePartChanged(), and slotDocumentFunction(). |
|
Definition at line 98 of file doxygenpart.h. |
|
Definition at line 103 of file doxygenpart.h. Referenced by slotActivePartChanged(), slotDocumentFunction(), and slotRunPreview(). |
|
Definition at line 102 of file doxygenpart.h. Referenced by slotRunPreview(). |
|
Definition at line 104 of file doxygenpart.h. Referenced by slotPreviewProcessExited(), and slotRunPreview(). |
The documentation for this class was generated from the following files:
- parts/doxygen/doxygenpart.h
- parts/doxygen/doxygenpart.cpp