Commit 0191e8e1 authored by Mike Kremer's avatar Mike Kremer
Browse files

Added qmake function Doc() which adds build target doc to build doxygen...

Added qmake function Doc() which adds build target doc to build doxygen documentation of plugin. I also wrote a tutorial on
how to use this function and how to integrate the documentation package into OpenFlipper's help browser.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5676 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5e78d00d
# Doxyfile 1.5.6
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Project related configuration options # Project related configuration options
...@@ -27,11 +27,6 @@ INLINE_INHERITED_MEMB = NO ...@@ -27,11 +27,6 @@ INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES FULL_PATH_NAMES = YES
STRIP_FROM_PATH = STRIP_FROM_PATH =
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
GENERATE_QHP = YES
QHP_NAMESPACE = "com.openflipper.dev"
QHP_VIRTUAL_FOLDER = "openflipper-1.0"
QCH_FILE = developer.qch
QHG_LOCATION = /usr/bin/qhelpgenerator
SHORT_NAMES = NO SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO QT_AUTOBRIEF = NO
...@@ -99,8 +94,7 @@ WARN_LOGFILE = ...@@ -99,8 +94,7 @@ WARN_LOGFILE =
# configuration options related to the input files # configuration options related to the input files
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
INPUT = . \ INPUT = . \
../ObjectTypes #\ ../ObjectTypes
# ../ACG/Scenegraph
INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \ FILE_PATTERNS = *.c \
*.cc \ *.cc \
...@@ -148,7 +142,8 @@ FILE_PATTERNS = *.c \ ...@@ -148,7 +142,8 @@ FILE_PATTERNS = *.c \
*.moc \ *.moc \
*.xpm \ *.xpm \
*.docu \ *.docu \
*.dox *.dox \
*.qhcp
RECURSIVE = YES RECURSIVE = YES
EXCLUDE = EXCLUDE =
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
......
...@@ -28,7 +28,7 @@ FULL_PATH_NAMES = YES ...@@ -28,7 +28,7 @@ FULL_PATH_NAMES = YES
STRIP_FROM_PATH = STRIP_FROM_PATH =
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
GENERATE_QHP = YES GENERATE_QHP = YES
QHP_NAMESPACE = "org.openflipper.doc" QHP_NAMESPACE = "doc.openflipper.dev"
QHP_VIRTUAL_FOLDER = "openflipper-1.0-dev" QHP_VIRTUAL_FOLDER = "openflipper-1.0-dev"
QCH_FILE = developer.qch QCH_FILE = developer.qch
QHG_LOCATION = /usr/bin/qhelpgenerator QHG_LOCATION = /usr/bin/qhelpgenerator
......
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = DocTest-Plugin
PROJECT_NUMBER = 1.0
OUTPUT_DIRECTORY = ./Doc
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class " \
"The $name widget " \
"The $name file " \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
GENERATE_QHP = YES
QHP_NAMESPACE = "doc.openflipper.testplugin"
QHP_VIRTUAL_FOLDER = "doctest-plugin-1.0"
QCH_FILE = plugin-doctest.qch
QHG_LOCATION = /usr/bin/qhelpgenerator
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text "
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = .
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.C \
*.H \
*.tlh \
*.diff \
*.patch \
*.moc \
*.xpm \
*.docu \
*.dox
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */Debian*/* \
*/.svn/* \
SimpleOpt*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = ./Doxygen/example/
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = YES
IMAGE_PATH = ./Doxygen/img/
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = YES
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.openflipper.doc
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE = Subdivision.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = YES
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
<?xml version="1.0" encoding="utf-8" ?>
<QHelpCollectionProject version="1.0">
<docFiles>
<register>
<file>developer.qch</file>
<file>plugin-doctest.qch</file>
</register>
</docFiles>
</QHelpCollectionProject>
################################################################################
#
################################################################################
include( $$TOPDIR/qmake/all.include )
Plugin()
Doc()
DIRECTORIES = .
# Input
HEADERS += $$getFilesFromDir($$DIRECTORIES,*.hh)
SOURCES += $$getFilesFromDir($$DIRECTORIES,*.cc)
FORMS += $$getFilesFromDir($$DIRECTORIES,*.ui)
################################################################################
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
* - \ref ex1b * - \ref ex1b
* - \ref ex2 * - \ref ex2
* - \ref ex3 * - \ref ex3
* - \ref ex4
* *
* \section plugin_sec Plugin Basics * \section plugin_sec Plugin Basics
* *
......
/*! \page ex4 Create documentation for a plugin
*
* In this tutorial we will learn how to create automatically built
* documentation for a custom plugin. We use \c doxygen for this purpose and
* assume that you already made yourself familiar to it.
*
* \section ex4_openFlipperDoc The OpenFlipper documentation
*
* OpenFlipper provides its documentation and API references in two different
* forms:
*
* - As html files generated by doxygen (once generated by calling \c doxygen they
* can be found under the OpenFlipper/Docs directory in OpenFlipper's root folder).
* These are basically the same files as one can find on the website.
* - As compressed qt help file collection integrated into the application. They can be accessed
* by chosing \c Help in OpenFlipper's menu bar.
*
* Now developers have the possibility to deliver their own plugin specific documentation
* and integrate it into OpenFlipper's help system. Generating compressed qt help
* files is supported by doxygen since version 1.5.7, therefore we recommend to use
* the latest doxygen version in order to build compressed help files out of the documentation
* that can be integrated into the application's help browser.
*
* \section ex4_start So let's start...
*
* In this tutorial we want to create the documentation of our plugin that we have
* already created in \ref ex1. For this we go into our plugin's directory (here \c Plugin-SimplePlugin)
* and create a directory named \c Doxygen. This is the directory that will contain all
* the necessary docu-files. In this case we only create the file \c mainpage.docu.
*
* Now copy the file <code><b>Doxyfile.dox</b></code> (which can be found in <code><b>OpenFlipper/Doxygen/example</b></code>)
* into your plugin's directory and name it <code><b>Doxyfile</b></code>.
* Adapt the following project specific settings in the Doxyfile:
*
* \dontinclude Doxyfile.dox
* \skipline PROJECT_NAME
*
* \dontinclude Doxyfile.dox
* \skipline PROJECT_NUMBER
*
* \dontinclude Doxyfile.dox
* \skipline QHP_VIRTUAL_FOLDER
*
* \dontinclude Doxyfile.dox
* \skipline QCH_FILE
*
* \dontinclude Doxyfile.dox
* \skipline QHP_NAMESPACE
*
* The last thing to be done is adding <code><b>Doc()</b></code> to your qmake project file.
* This adds the target <code><b>doc</b></code> to the build system which builds the
* plugin's documentation.
*
* \dontinclude Plugin-DocTest.pro
* \skipline include
* \until DIRECTORIES
*
* After executing qmake (make sure to use qmake version >= 4, some linux distributions
* offer the symlink <code><b>qmake-qt4</b></code>) you just have to enter
*
* <br/><code><b>make doc</b></code><br/>
*
* to generate the documentation.
*
* All the files will be created in the folder Doc/html
* in your plugin's directory. You can now open the index.html to see it.
* When using doxygen >= 1.5.7 an additional .qch file (the filename can be specified
* in the <b>Doxyfile</b>) has been generated and copied to <b>OpenFlipper/Help/</b>
* in OpenFlipper's root directory. To integrate it into OpenFlipper's help browser
* go to <b>OpenFlipper/Help/</b> and open <b>Help.qhcp</b> in a text editor.
* Now add the line
*
* <br/><code><b>&lt;file&gt;plugin-doctest.qch&lt;/file&gt;</b></code><br/>
*
* under the <b>register</b> tag. The file now should look like this:
*
* \include Help.qhcp
*
* Now (still in <b>OpenFlipper/Help/</b>) execute
*
* <br/><code><b>qcollectiongenerator Help.qhcp -o Help.qhc</b></code><br/>
*
* Your documentation should now be available in OpenFlipper's help browser.
*/
No preview for this file type
No preview for this file type
...@@ -57,8 +57,8 @@ void CoreWidget::showHelpBrowser( ) { ...@@ -57,8 +57,8 @@ void CoreWidget::showHelpBrowser( ) {
return; return;
if(helpWidget_ == 0) if(helpWidget_ == 0)
helpWidget_ = new HelpWidget(this, "qthelp://org.openflipper.doc/openflipper-1.0-dev/main.html", helpWidget_ = new HelpWidget(this, "qthelp://doc.openflipper.dev/openflipper-1.0-dev/main.html",
"qthelp://org.openflipper.doc/openflipper-1.0-dev/"); "qthelp://doc.openflipper.dev/openflipper-1.0-dev/");
helpWidget_->show(); helpWidget_->show();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment