forked from qt-creator/qt-creator
Doc: Use defines in "Indenting Text or Code" topic
To enable single-sourcing Qt Creator Manual and Qt Design Studio Manual. Add the menu path to Typing options. Change-Id: I99708fe39d414462c743b0f01a52dcefcce1d65b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -39,9 +39,13 @@
|
|||||||
You can specify indentation for:
|
You can specify indentation for:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
\if defined(qtcreator)
|
||||||
\li C++ files
|
\li C++ files
|
||||||
|
\endif
|
||||||
\li QML files
|
\li QML files
|
||||||
|
\if defined(qtcreator)
|
||||||
\li Nim files
|
\li Nim files
|
||||||
|
\endif
|
||||||
\li Other text files
|
\li Other text files
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -49,6 +53,7 @@
|
|||||||
specify several sets of code style settings and easily switch between them.
|
specify several sets of code style settings and easily switch between them.
|
||||||
In addition, you can import and export code style settings.
|
In addition, you can import and export code style settings.
|
||||||
|
|
||||||
|
\if defined(qtcreator)
|
||||||
\section1 Indenting C++ Files
|
\section1 Indenting C++ Files
|
||||||
|
|
||||||
To specify indentation settings for the C++ editor:
|
To specify indentation settings for the C++ editor:
|
||||||
@@ -81,6 +86,7 @@
|
|||||||
|
|
||||||
To specify different settings for a particular project, select
|
To specify different settings for a particular project, select
|
||||||
\uicontrol Projects > \uicontrol {Code Style Settings}.
|
\uicontrol Projects > \uicontrol {Code Style Settings}.
|
||||||
|
\endif
|
||||||
|
|
||||||
\section1 Indenting QML Files
|
\section1 Indenting QML Files
|
||||||
|
|
||||||
@@ -103,6 +109,7 @@
|
|||||||
To specify different settings for a particular project, select
|
To specify different settings for a particular project, select
|
||||||
\uicontrol Projects > \uicontrol {Code Style Settings}.
|
\uicontrol Projects > \uicontrol {Code Style Settings}.
|
||||||
|
|
||||||
|
\if defined(qtcreator)
|
||||||
\section1 Indenting Nim Files
|
\section1 Indenting Nim Files
|
||||||
|
|
||||||
To specify settings for the Nim editor (experimental):
|
To specify settings for the Nim editor (experimental):
|
||||||
@@ -122,6 +129,7 @@
|
|||||||
|
|
||||||
To specify different settings for a particular project, select
|
To specify different settings for a particular project, select
|
||||||
\uicontrol Projects > \uicontrol {Code Style}.
|
\uicontrol Projects > \uicontrol {Code Style}.
|
||||||
|
\endif
|
||||||
|
|
||||||
\section1 Indenting Other Text Files
|
\section1 Indenting Other Text Files
|
||||||
|
|
||||||
@@ -142,10 +150,14 @@
|
|||||||
You can specify tab settings at the following levels:
|
You can specify tab settings at the following levels:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
\if defined(qtcreator)
|
||||||
\li For all C++ files
|
\li For all C++ files
|
||||||
|
\endif
|
||||||
\li For all QML files
|
\li For all QML files
|
||||||
\li For all other text files
|
\li For all other text files
|
||||||
|
\if defined(qtcreator)
|
||||||
\li For C++ files in a project
|
\li For C++ files in a project
|
||||||
|
\endif
|
||||||
\li For QML files in a project
|
\li For QML files in a project
|
||||||
\li For other text files in a project
|
\li For other text files in a project
|
||||||
\endlist
|
\endlist
|
||||||
@@ -168,11 +180,14 @@
|
|||||||
select \uicontrol {With Spaces}. To follow the \uicontrol {Tab policy},
|
select \uicontrol {With Spaces}. To follow the \uicontrol {Tab policy},
|
||||||
select \uicontrol {With Regular Indent}.
|
select \uicontrol {With Regular Indent}.
|
||||||
|
|
||||||
\section2 Specifying Typing Options
|
\section1 Specifying Typing Options
|
||||||
|
|
||||||
When you type text or code, it is indented automatically according to the
|
When you type text or code, it is indented automatically according to the
|
||||||
selected text editor or code style options. Specify typing options in the
|
selected text editor or code style options. To specify typing options,
|
||||||
\uicontrol Typing group. To disable automatic indentation, deselect the
|
select \uicontrol Tools > \uicontrol Options > \uicontrol {Text Editor} >
|
||||||
|
\uicontrol Behavior > \uicontrol Typing.
|
||||||
|
|
||||||
|
To disable automatic indentation, deselect the
|
||||||
\uicontrol {Enable automatic indentation} check box.
|
\uicontrol {Enable automatic indentation} check box.
|
||||||
|
|
||||||
You can specify how the indentation is decreased when you press
|
You can specify how the indentation is decreased when you press
|
||||||
@@ -189,6 +204,7 @@
|
|||||||
the cursor is located within leading white space, select \uicontrol {In
|
the cursor is located within leading white space, select \uicontrol {In
|
||||||
Leading White Space}.
|
Leading White Space}.
|
||||||
|
|
||||||
|
\if defined(qtcreator)
|
||||||
\section1 Specifying Settings for Content
|
\section1 Specifying Settings for Content
|
||||||
|
|
||||||
You can indent public, protected, and private statements and declarations
|
You can indent public, protected, and private statements and declarations
|
||||||
@@ -244,4 +260,5 @@
|
|||||||
\uicontrol {Getter and Setter} tab.
|
\uicontrol {Getter and Setter} tab.
|
||||||
|
|
||||||
\image qtcreator-code-style-getter-setter.png
|
\image qtcreator-code-style-getter-setter.png
|
||||||
|
\endif
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user