Commit f3d8f091 authored by Leena Miettinen's avatar Leena Miettinen

Doc: Updated documentation for Beautifier

Change-Id: I3e32e93e41e3835f62884afab17f98fde95ce32c
Reviewed-by: default avatarLorenz Haas <lykurg@gmail.com>
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@digia.com>
parent 0f6846bd
doc/images/beautifier_editor.png

7.99 KB | W: | H:

doc/images/beautifier_editor.png

40.8 KB | W: | H:

doc/images/beautifier_editor.png
doc/images/beautifier_editor.png
doc/images/beautifier_editor.png
doc/images/beautifier_editor.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/beautifier_options.png

41.8 KB | W: | H:

doc/images/beautifier_options.png

22.1 KB | W: | H:

doc/images/beautifier_options.png
doc/images/beautifier_options.png
doc/images/beautifier_options.png
doc/images/beautifier_options.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -52,7 +52,17 @@
\list 1
\li Download and install the tool to use for formatting source code.
\li Download and install the tool to use for formatting source code:
\list
\li \l{http://sourceforge.net/projects/astyle/files/astyle}
{Artistic Style}
\li \l{http://llvm.org/releases/download.html}{ClangFormat}
\li \l{http://sourceforge.net/projects/uncrustify/files/uncrustify}
{Uncrustify}
\endlist
You might have to build the tools from sources for some platforms.
\li Select \gui Help > \gui {About Plugins} > \gui {C++} >
\gui Beautifier to enable the plugin.
......@@ -60,40 +70,51 @@
\li Restart \QC to be able to use the plugin.
\li Select \gui Tools > \gui Options > \gui Beautifier to specify
settings for the tool you want to use. The options you have depend
on the tool.
settings for the tool you want to use.
\li Select \gui Tools > \gui Beautifier > \gui {Artistic Style},
\gui ClangFormat or \gui Uncrustify > \gui {Format Current File}
to format the currently open file.
\image beautifier_options.png
You can \l{Keyboard Shortcuts}{create keyboard shortcuts} for the
functions.
\li In the \gui {Artistic Style command}, \gui {Clang Format command},
or \gui {Uncrustify command} field, specify the path to the tool
executable.
\endlist
\li In the \gui Options group, select the configuration file that
defines the style to use in the source files. If you select several
options, they are applied from top down.
\section1 Specifying Styles
\list
Select \gui Tools > \gui Options > \gui Beautifier to set the configuration
file that defines the style to use in the source files.
\li Select the \gui {Use file defined in project files} option
to use the configuration file defined in the qmake
OTHER_FILES variable as the configuration file for the
selected tool.
\image beautifier_options.png
\li Select the \gui {Use $HOME} option to use the specified file
in the user's home directory as the configuration file for
the selected tool.
Select the \gui {Use file defined in project file} option to use the
configuration file defined in the qmake OTHER_FILES variable as the
configuration file for the selected tool. For example, \c{uncrustify.cfg}.
\li Select the \gui {Use self-defined style} option, and then
\gui Add to define your own style.
Select the \gui {Use $HOME} option to use the specified file in the user's
home directory as the configuration file for the selected tool. For example,
\c{.uncrustify.cgf} or \c{uncrustify.cgf}.
\li Define code formatting in the \gui {Edit Configuration}
dialog. It provides syntax highlighting, auto-completion,
and context-sensitive help. For these features, you must
have the tool installed.
Select the \gui {Use self-defined Style} option, and then \gui Add to define
your own style. The \gui {Edit Configuration} dialog provides syntax
highlighting, auto-completion, and context-sensitive help.
\image beautifier_editor.png
\image beautifier_editor.png
\li Select \gui Tools > \gui Beautifier > \gui {Artistic Style},
\gui ClangFormat, or \gui Uncrustify > \gui {Format Current File}
to format the currently open file.
You can \l{Keyboard Shortcuts}{create keyboard shortcuts} for the
functions.
\endlist
By default, ClangFormat formats only the selected text. To format the entire
file when no text is selected, select the
\gui {Format entire file if no text was selected} check box.
In addition to the \gui {Format Current File} command, ClangFormat provides
the \gui {Format Selected Text} command. If you select it when no text is
selected, nothing happens. To format the entire file in this case, select
the \gui {Format entire file if no text was selected} check box in the
\gui {Clang Format} options.
*/
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