qdoc: Implement \uicontrol command.
Change-Id: I10381cd69d32352c590ec5a7d4041465af57b88b Reviewed-by: Martin Smith <martin.smith@nokia.com>bb10
parent
32068cb707
commit
291f436ab6
|
|
@ -39,7 +39,7 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <qregexp.h>
|
||||
#include <QRegExp>
|
||||
#include "atom.h"
|
||||
#include "location.h"
|
||||
#include <stdio.h>
|
||||
|
|
@ -55,6 +55,7 @@ QLatin1String Atom::SPAN_ ("span");
|
|||
QLatin1String Atom::SUBSCRIPT_ ("subscript");
|
||||
QLatin1String Atom::SUPERSCRIPT_ ("superscript");
|
||||
QLatin1String Atom::TELETYPE_ ("teletype");
|
||||
QLatin1String Atom::UICONTROL_ ("uicontrol");
|
||||
QLatin1String Atom::UNDERLINE_ ("underline");
|
||||
|
||||
QLatin1String Atom::BULLET_ ("bullet");
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ public:
|
|||
static QLatin1String SUBSCRIPT_;
|
||||
static QLatin1String SUPERSCRIPT_;
|
||||
static QLatin1String TELETYPE_;
|
||||
static QLatin1String UICONTROL_;
|
||||
static QLatin1String UNDERLINE_;
|
||||
|
||||
static QLatin1String BULLET_;
|
||||
|
|
@ -221,6 +222,7 @@ private:
|
|||
#define ATOM_FORMATTING_SUBSCRIPT "subscript"
|
||||
#define ATOM_FORMATTING_SUPERSCRIPT "superscript"
|
||||
#define ATOM_FORMATTING_TELETYPE "teletype"
|
||||
#define ATOM_FORMATTING_UICONTROL "uicontrol"
|
||||
#define ATOM_FORMATTING_UNDERLINE "underline"
|
||||
|
||||
#define ATOM_LIST_BULLET "bullet"
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ QString DitaXmlGenerator::ditaTags[] =
|
|||
"topicref",
|
||||
"tt",
|
||||
"u",
|
||||
"uicontrol",
|
||||
"ul",
|
||||
"unknown",
|
||||
"vrm",
|
||||
|
|
@ -879,6 +880,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
|
|||
else if (atom->string().startsWith("span ")) {
|
||||
t = DT_keyword;
|
||||
}
|
||||
else if (atom->string() == ATOM_FORMATTING_UICONTROL)
|
||||
t = DT_uicontrol;
|
||||
else if (atom->string() == ATOM_FORMATTING_UNDERLINE)
|
||||
t = DT_u;
|
||||
else if (atom->string() == ATOM_FORMATTING_INDEX)
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ public:
|
|||
DT_topicref,
|
||||
DT_tt,
|
||||
DT_u,
|
||||
DT_uicontrol,
|
||||
DT_ul,
|
||||
DT_unknown,
|
||||
DT_vrm,
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ enum {
|
|||
CMD_TARGET,
|
||||
CMD_TOPICREF,
|
||||
CMD_TT,
|
||||
CMD_UICONTROL,
|
||||
CMD_UNDERLINE,
|
||||
CMD_UNICODE,
|
||||
CMD_VALUE,
|
||||
|
|
@ -285,6 +286,7 @@ static struct {
|
|||
{ "target", CMD_TARGET, 0 },
|
||||
{ "topicref", CMD_TOPICREF, 0 },
|
||||
{ "tt", CMD_TT, 0 },
|
||||
{ "uicontrol", CMD_UICONTROL, 0 },
|
||||
{ "underline", CMD_UNDERLINE, 0 },
|
||||
{ "unicode", CMD_UNICODE, 0 },
|
||||
{ "value", CMD_VALUE, 0 },
|
||||
|
|
@ -1313,6 +1315,9 @@ void DocParser::parse(const QString& source,
|
|||
case CMD_TT:
|
||||
startFormat(ATOM_FORMATTING_TELETYPE, cmd);
|
||||
break;
|
||||
case CMD_UICONTROL:
|
||||
startFormat(ATOM_FORMATTING_UICONTROL, cmd);
|
||||
break;
|
||||
case CMD_UNDERLINE:
|
||||
startFormat(ATOM_FORMATTING_UNDERLINE, cmd);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@
|
|||
\li \l {11-qdoc-commands-specialcontent.html#tableofcontents-command} {\\tableofcontents}
|
||||
\li \l {08-qdoc-commands-creatinglinks.html#target-command} {\\target}
|
||||
\li \l {04-qdoc-commands-textmarkup.html#tt-command} {\\tt}
|
||||
\li \l {04-qdoc-commands-textmarkup.html#uicontrol-command} {\\uicontrol} {(new 25/3/2012)}
|
||||
\li \l {04-qdoc-commands-textmarkup.html#underline-command} {\\underline}
|
||||
\li \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\unicode}
|
||||
\li \l {11-qdoc-commands-specialcontent.html#warning-command} {\\warning}
|
||||
|
|
@ -837,6 +838,15 @@
|
|||
If the argument contains spaces or other punctuation, enclose the
|
||||
argument in curly brackets.
|
||||
|
||||
\target uicontrol-command
|
||||
\section1 \\uicontrol
|
||||
|
||||
The \\uicontrol command is used to mark content as being used for UI
|
||||
control elements. When using HTML the output is rendered in bold.
|
||||
When using DITA XML the content is enclosed in a \c{uicontrol} tag.
|
||||
|
||||
\sa \\b
|
||||
|
||||
\target underline-command
|
||||
\section1 \\underline
|
||||
|
||||
|
|
@ -8751,6 +8761,7 @@
|
|||
\li \l {21-0-qdoc-creating-dita-maps.html#topicref-command} {\\topicref} \span {class="newStuff"} {(new 05/03/12)}
|
||||
\li \l {04-qdoc-commands-textmarkup.html#tt-command} {\\tt}
|
||||
\li \l {13-qdoc-commands-topics.html#typedef-command} {\\typedef}
|
||||
\li \l {04-qdoc-commands-textmarkup.html#uicontrol-command} {\\uicontrol} {(new 25/3/2012)}
|
||||
\li \l {04-qdoc-commands-textmarkup.html#underline-command} {\\underline}
|
||||
\li \l {13-qdoc-commands-topics.html#variable-command} {\\variable}
|
||||
\li \l {10-qdoc-commands-tablesandlists.html#value-command} {\\value}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ void HtmlGenerator::initializeGenerator(const Config &config)
|
|||
{ ATOM_FORMATTING_SUBSCRIPT, "<sub>", "</sub>" },
|
||||
{ ATOM_FORMATTING_SUPERSCRIPT, "<sup>", "</sup>" },
|
||||
{ ATOM_FORMATTING_TELETYPE, "<tt>", "</tt>" },
|
||||
{ ATOM_FORMATTING_UICONTROL, "<b>", "</b>" },
|
||||
{ ATOM_FORMATTING_UNDERLINE, "<u>", "</u>" },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue