cppcodestylesettingspage.ui 15.6 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
3 4
 <class>CppTools::Internal::CppCodeStyleSettingsPage</class>
 <widget class="QWidget" name="CppTools::Internal::CppCodeStyleSettingsPage">
5 6 7 8
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
Jarek Kobus's avatar
Jarek Kobus committed
9 10
    <width>463</width>
    <height>314</height>
11 12 13 14 15 16 17 18 19
   </rect>
  </property>
  <property name="windowTitle">
   <string>Form</string>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout_3">
   <item>
    <widget class="QTabWidget" name="categoryTab">
     <property name="currentIndex">
20
      <number>0</number>
21 22 23 24 25
     </property>
     <widget class="QWidget" name="generalTab">
      <attribute name="title">
       <string>General</string>
      </attribute>
Jarek Kobus's avatar
Jarek Kobus committed
26 27 28 29 30 31 32 33 34
      <layout class="QGridLayout" name="gridLayout">
       <item row="0" column="0">
        <widget class="TextEditor::TabSettingsWidget" name="tabSettingsWidget" native="true">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
35 36 37 38 39
         <property name="focusPolicy">
          <enum>Qt::TabFocus</enum>
         </property>
        </widget>
       </item>
Jarek Kobus's avatar
Jarek Kobus committed
40
       <item row="0" column="1" rowspan="2">
41 42 43 44 45 46
        <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditGeneral">
         <property name="plainText">
          <string/>
         </property>
        </widget>
       </item>
Jarek Kobus's avatar
Jarek Kobus committed
47 48 49 50 51 52 53 54 55 56 57 58 59
       <item row="1" column="0">
        <spacer name="verticalSpacer_5">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
           <height>347</height>
          </size>
         </property>
        </spacer>
       </item>
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
      </layout>
     </widget>
     <widget class="QWidget" name="contentTab">
      <attribute name="title">
       <string>Content</string>
      </attribute>
      <layout class="QHBoxLayout" name="horizontalLayout">
       <item>
        <widget class="QGroupBox" name="contentGroupBox">
         <property name="title">
          <string>Indent</string>
         </property>
         <property name="flat">
          <bool>true</bool>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout">
          <property name="leftMargin">
           <number>0</number>
          </property>
          <property name="rightMargin">
           <number>0</number>
          </property>
          <property name="bottomMargin">
           <number>0</number>
          </property>
          <item>
           <widget class="QCheckBox" name="indentAccessSpecifiers">
            <property name="text">
             <string>&quot;public&quot;, &quot;protected&quot; and
&quot;private&quot; within class body</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentDeclarationsRelativeToAccessSpecifiers">
            <property name="text">
             <string>Declarations relative to &quot;public&quot;,
&quot;protected&quot; and &quot;private&quot;</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentFunctionBody">
            <property name="text">
104
             <string>Statements within function body</string>
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentBlockBody">
            <property name="text">
             <string>Statements within blocks</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentNamespaceBody">
            <property name="text">
             <string>Declarations within
&quot;namespace&quot; definition</string>
            </property>
           </widget>
          </item>
          <item>
           <spacer name="verticalSpacer">
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>17</width>
              <height>114</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditContent">
         <property name="plainText">
          <string/>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
     <widget class="QWidget" name="bracesTab">
      <attribute name="title">
       <string>Braces</string>
      </attribute>
      <layout class="QHBoxLayout" name="horizontalLayout_3">
       <item>
        <widget class="QGroupBox" name="bracesGroupBox">
         <property name="title">
          <string>Indent Braces</string>
         </property>
         <property name="flat">
          <bool>true</bool>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_2">
          <property name="leftMargin">
           <number>0</number>
          </property>
          <property name="rightMargin">
           <number>0</number>
          </property>
          <property name="bottomMargin">
           <number>0</number>
          </property>
          <item>
           <widget class="QCheckBox" name="indentClassBraces">
            <property name="text">
             <string>Class declarations</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentNamespaceBraces">
            <property name="text">
             <string>Namespace declarations</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentEnumBraces">
            <property name="text">
             <string>Enum declarations</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentFunctionBraces">
            <property name="text">
195
             <string>Function declarations</string>
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentBlockBraces">
            <property name="text">
             <string>Blocks</string>
            </property>
           </widget>
          </item>
          <item>
           <spacer name="verticalSpacer_3">
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>195</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditBraces">
         <property name="plainText">
          <string/>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
     <widget class="QWidget" name="switchTab">
      <attribute name="title">
       <string>&quot;switch&quot;</string>
      </attribute>
      <layout class="QHBoxLayout" name="horizontalLayout_4">
       <item>
        <widget class="QGroupBox" name="switchGroupBox">
         <property name="title">
          <string>Indent within &quot;switch&quot;</string>
         </property>
         <property name="flat">
          <bool>true</bool>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_4">
          <property name="leftMargin">
           <number>0</number>
          </property>
          <property name="rightMargin">
           <number>0</number>
          </property>
          <property name="bottomMargin">
           <number>0</number>
          </property>
          <item>
           <widget class="QCheckBox" name="indentSwitchLabels">
            <property name="text">
             <string>&quot;case&quot; or &quot;default&quot;</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentCaseStatements">
            <property name="text">
             <string>Statements relative to
&quot;case&quot; or &quot;default&quot;</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentCaseBlocks">
            <property name="text">
             <string>Blocks relative to
&quot;case&quot; or &quot;default&quot;</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="indentCaseBreak">
            <property name="text">
             <string>&quot;break&quot; statement relative to
&quot;case&quot; or &quot;default&quot;</string>
            </property>
           </widget>
          </item>
          <item>
           <spacer name="verticalSpacer_4">
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>143</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditSwitch">
         <property name="plainText">
          <string/>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
     <widget class="QWidget" name="alignmentTab">
      <attribute name="title">
       <string>Alignment</string>
      </attribute>
      <layout class="QHBoxLayout" name="horizontalLayout_5">
       <item>
        <widget class="QGroupBox" name="alignmentGroupBox">
         <property name="title">
          <string>Align</string>
         </property>
         <property name="flat">
          <bool>true</bool>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_5">
          <property name="leftMargin">
           <number>0</number>
          </property>
          <property name="rightMargin">
           <number>0</number>
          </property>
          <property name="bottomMargin">
           <number>0</number>
          </property>
          <item>
           <widget class="QCheckBox" name="alignAssignments">
            <property name="toolTip">
             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
337
Enables alignment to tokens after =, += etc. When the option is disabled, regular continuation line indentation will be used.&lt;br&gt;
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
&lt;br&gt;
With alignment:
&lt;pre&gt;
a = a +
    b
&lt;/pre&gt;
Without alignment:
&lt;pre&gt;
a = a +
        b
&lt;/pre&gt;
&lt;/body&gt;&lt;/html&gt;</string>
            </property>
            <property name="text">
             <string>Align after assignments</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="extraPaddingConditions">
            <property name="toolTip">
             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
360 361 362
Adds an extra level of indentation to multiline conditions in the switch, if, while and foreach statements if they would otherwise have the same or less indentation than a nested statement.

For four-spaces indentation only if statement conditions are affected. Without extra padding:
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
&lt;pre&gt;
if (a &amp;&amp;
    b)
    c;
&lt;/pre&gt;
With extra padding:
&lt;pre&gt;
if (a &amp;&amp;
        b)
    c;
&lt;/pre&gt;
&lt;/body&gt;&lt;/html&gt;</string>
            </property>
            <property name="text">
             <string>Add extra padding to conditions
if they would align to the next line</string>
            </property>
           </widget>
          </item>
          <item>
           <spacer name="verticalSpacer_2">
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>40</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditPadding">
         <property name="plainText">
          <string/>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
     <widget class="QWidget" name="typesTab">
      <attribute name="title">
       <string>Pointers and References</string>
      </attribute>
      <layout class="QHBoxLayout" name="horizontalLayout_2">
       <item>
        <widget class="QGroupBox" name="pointerReferencesGroupBox">
         <property name="title">
          <string>Bind '*' and '&amp;&amp;' in types/declarations to</string>
         </property>
         <property name="flat">
          <bool>true</bool>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_6">
          <item>
           <widget class="QCheckBox" name="bindStarToIdentifier">
            <property name="toolTip">
             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;This does not apply to the star and reference symbol in pointer/reference to functions and arrays, e.g.:
&lt;pre&gt;   int (&amp;rf)() = ...;
   int (*pf)() = ...;

   int (&amp;ra)[2] = ...;
   int (*pa)[2] = ...;

&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</string>
            </property>
            <property name="text">
             <string>Identifier</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="bindStarToTypeName">
            <property name="text">
             <string>Type name</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="bindStarToLeftSpecifier">
            <property name="text">
             <string>Left const/volatile</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QCheckBox" name="bindStarToRightSpecifier">
            <property name="toolTip">
             <string>This does not apply to references.</string>
            </property>
            <property name="text">
             <string>Right const/volatile</string>
            </property>
           </widget>
          </item>
          <item>
           <spacer name="verticalSpacer_6">
            <property name="orientation">
             <enum>Qt::Vertical</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
              <width>20</width>
              <height>40</height>
             </size>
            </property>
           </spacer>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditPointerReferences">
         <property name="plainText">
          <string/>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
487 488 489 490 491 492
    </widget>
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
Jarek Kobus's avatar
Jarek Kobus committed
493
   <class>TextEditor::TabSettingsWidget</class>
494
   <extends>QWidget</extends>
Jarek Kobus's avatar
Jarek Kobus committed
495
   <header location="global">texteditor/tabsettingswidget.h</header>
496 497 498
   <container>1</container>
  </customwidget>
  <customwidget>
Jarek Kobus's avatar
Jarek Kobus committed
499 500 501
   <class>TextEditor::SnippetEditorWidget</class>
   <extends>QPlainTextEdit</extends>
   <header location="global">texteditor/snippets/snippeteditor.h</header>
502 503 504 505 506
  </customwidget>
 </customwidgets>
 <resources/>
 <connections/>
</ui>