diff --git a/breathe/renderer/sphinxrenderer.py b/breathe/renderer/sphinxrenderer.py index ec6a1568..e96be965 100644 --- a/breathe/renderer/sphinxrenderer.py +++ b/breathe/renderer/sphinxrenderer.py @@ -72,6 +72,7 @@ class DomainDirectiveFactory(object): 'interface': (DoxyCPPClassObject, 'interface'), 'function': (cpp.CPPFunctionObject, 'function'), 'friend': (cpp.CPPFunctionObject, 'function'), + 'signal': (cpp.CPPFunctionObject, 'function'), 'slot': (cpp.CPPFunctionObject, 'function'), 'enum': (cpp.CPPTypeObject, 'type'), 'typedef': (cpp.CPPTypeObject, 'type'), @@ -547,7 +548,7 @@ def render_signature(file_data, doxygen_target, name, kind): ("public-func", "Public Functions"), ("public-attrib", "Public Members"), ("public-slot", "Public Slots"), - ("signal", "Signal"), + ("signal", "Signals"), ("dcop-func", "DCOP Function"), ("property", "Property"), ("event", "Event"), @@ -798,7 +799,7 @@ def visit_docformula(self, node): rst_node = self.node_factory.displaymath() # Or multiline - if latex.startswith("\[") and latex.endswith("\]"): + if latex.startswith("\\[") and latex.endswith("\\]"): latex = latex[2:-2:] # Here we steal the core of the mathbase "math" directive handling code from: @@ -1236,7 +1237,7 @@ def dispatch_compound(self, node): def dispatch_memberdef(self, node): """Dispatch handling of a memberdef node to a suitable visit method.""" - if node.kind in ("function", "slot") or \ + if node.kind in ("function", "signal", "slot") or \ (node.kind == 'friend' and node.argsstring): return self.visit_function(node) if node.kind == "enum": diff --git a/documentation/source/class.rst b/documentation/source/class.rst index 962920f4..8c5f28e2 100644 --- a/documentation/source/class.rst +++ b/documentation/source/class.rst @@ -221,23 +221,23 @@ It produces this output: :no-link: -Qt Slots Example ----------------- +Qt Signals & Slots Example +-------------------------- -Doxygen is aware of Qt Slots and so Breathe can pick them up and display them in -the output. They are displayed in appropriate ``Public Slots``, ``Protected -Slots`` and ``Private Slots`` sections. +Doxygen is aware of Qt Signals and Slots and so Breathe can pick them up and +display them in the output. They are displayed in appropriate ``Signals``, +``Public Slots``, ``Protected Slots`` and ``Private Slots`` sections. .. code-block:: rst - .. doxygenclass:: QtSlotExample - :project: qtslots + .. doxygenclass:: QtSignalSlotExample + :project: qtsignalsandslots :members: Produces the following output: -.. doxygenclass:: QtSlotExample - :project: qtslots +.. doxygenclass:: QtSignalSlotExample + :project: qtsignalsandslots :members: :no-link: diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 23700258..5963fc9c 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -206,7 +206,7 @@ "lists":"../../examples/specific/lists/xml/", "group":"../../examples/specific/group/xml/", "union":"../../examples/specific/union/xml/", - "qtslots":"../../examples/specific/qtslots/xml/", + "qtsignalsandslots":"../../examples/specific/qtsignalsandslots/xml/", "array":"../../examples/specific/array/xml/", "c_enum":"../../examples/specific/c_enum/xml/", "c_typedef":"../../examples/specific/c_typedef/xml/", diff --git a/examples/specific/Makefile b/examples/specific/Makefile index fb6773cd..19c2981d 100644 --- a/examples/specific/Makefile +++ b/examples/specific/Makefile @@ -20,7 +20,7 @@ HAVE_DOT = /usr/bin/dot projects = nutshell alias rst inline namespacefile c_file array c_enum inheritance \ members userdefined fixedwidthfont latexmath functionOverload \ - image name union group struct struct_function qtslots lists \ + image name union group struct struct_function qtsignalsandslots lists \ headings links parameters template_class template_class_non_type \ template_function template_specialisation enum c_typedef define interface diff --git a/examples/specific/qtslots.cfg b/examples/specific/qtsignalsandslots.cfg similarity index 59% rename from examples/specific/qtslots.cfg rename to examples/specific/qtsignalsandslots.cfg index 83aa171f..464dace2 100644 --- a/examples/specific/qtslots.cfg +++ b/examples/specific/qtsignalsandslots.cfg @@ -1,10 +1,10 @@ -PROJECT_NAME = "Qt Slots" -OUTPUT_DIRECTORY = qtslots +PROJECT_NAME = "Qt Signals & Slots" +OUTPUT_DIRECTORY = qtsignalsandslots GENERATE_LATEX = NO GENERATE_MAN = NO GENERATE_RTF = NO CASE_SENSE_NAMES = NO -INPUT = qtslots.h +INPUT = qtsignalsandslots.h QUIET = YES JAVADOC_AUTOBRIEF = YES GENERATE_HTML = NO diff --git a/examples/specific/qtslots.h b/examples/specific/qtsignalsandslots.h similarity index 70% rename from examples/specific/qtslots.h rename to examples/specific/qtsignalsandslots.h index 9c281634..af750f0e 100644 --- a/examples/specific/qtslots.h +++ b/examples/specific/qtsignalsandslots.h @@ -3,7 +3,7 @@ #include -class QtSlotExample: public QObject +class QtSignalSlotExample: public QObject { Q_OBJECT @@ -15,6 +15,14 @@ class QtSlotExample: public QObject */ void workingFunction( int iShownParameter ) { Q_UNUSED( iShownParameter ; ) } + signals: + + /*! + *\param iShown + This is in function declaration + */ + void workingSignal( int iShown ); + public slots: /*!